docs: add "workers" option

This commit is contained in:
Micooz 2017-08-14 15:54:48 +08:00
parent 3c3aa46a2e
commit d728156158
2 changed files with 6 additions and 18 deletions

@ -57,8 +57,8 @@ $ blinksocks init
"dns_expire": 3600, "dns_expire": 3600,
// close inactive connection after timeout seconds // close inactive connection after timeout seconds
"timeout": 600, "timeout": 600,
// hot-reload when this file changed // how many sub processes to create, default is the number of CPU cores
"watch": false, "workers": 2,
// log at the level, "error", "warn", "info", "verbose", "debug" or "silly" // log at the level, "error", "warn", "info", "verbose", "debug" or "silly"
"log_level": "info" "log_level": "info"
} }
@ -105,8 +105,8 @@ $ blinksocks init
"redirect": "", "redirect": "",
// close inactive connection after timeout seconds // close inactive connection after timeout seconds
"timeout": 600, "timeout": 600,
// hot-reload when this file changed // how many sub processes to create, default is the number of CPU cores
"watch": false, "workers": 2,
// log at the level, "error", "warn", "info", "verbose", "debug" or "silly" // log at the level, "error", "warn", "info", "verbose", "debug" or "silly"
"log_level": "info" "log_level": "info"
} }
@ -154,17 +154,6 @@ npm logging levels by default, you can choose one of them demand:
{ error: 0, warn: 1, info: 2, verbose: 3, debug: 4, silly: 5 } { error: 0, warn: 1, info: 2, verbose: 3, debug: 4, silly: 5 }
``` ```
## Hot reload
`watch` is enabled by default, this means when file specified by `-c` or `--config` has been modified,
blinksocks will hot-reload it without stop-the-world.
```
$ blinksocks -c config.json --watch
```
> NOTE that if you change `host` or `port`, a restart is required.
## Redirect(Server Side Only) ## Redirect(Server Side Only)
You can specify a `redirect` location to tell blinksocks **server** where to relay unexpected data received You can specify a `redirect` location to tell blinksocks **server** where to relay unexpected data received

@ -269,9 +269,8 @@ export default class CustomPreset extends IPreset {
| \_\_KEY\_\_ | | \_\_KEY\_\_ |
| \_\_PRESETS\_\_ | | \_\_PRESETS\_\_ |
| \_\_DNS\_\_ | | \_\_DNS\_\_ |
| \_\_DNS_EXPIRE\_\_ | | \_\_DNS_EXPIRE\_\_ |
| \_\_REDIRECT\_\_ | | \_\_REDIRECT\_\_ |
| \_\_TIMEOUT\_\_ | | \_\_TIMEOUT\_\_ |
| \_\_LOG_LEVEL\_\_ | | \_\_LOG_LEVEL\_\_ |
| \_\_PROFILE\_\_ | | \_\_WORKERS\_\_ |
| \_\_IS_WATCH\_\_ |