docs(readme): update
This commit is contained in:
parent
15a47ce39a
commit
5baf1e73d2
2
bin/bootstrap.js
vendored
2
bin/bootstrap.js
vendored
@ -33,7 +33,7 @@ const examples = `
|
||||
Examples:
|
||||
|
||||
As simple as possible:
|
||||
$ blinksocks client -c config.json
|
||||
$ blinksocks client -c config.json --watch
|
||||
|
||||
To start a server:
|
||||
$ blinksocks server --host 0.0.0.0 --port 7777 --key password
|
||||
|
@ -26,6 +26,7 @@ $ blinksocks -c config.json
|
||||
"protocol_params": "aes-256-cbc,sha256",
|
||||
"obfs": "",
|
||||
"obfs_params": "",
|
||||
"redirect": "",
|
||||
"profile": false,
|
||||
"watch": true,
|
||||
"log_level": "info"
|
||||
@ -34,27 +35,28 @@ $ blinksocks -c config.json
|
||||
|
||||
## Description
|
||||
|
||||
| FIELD | DESCRIPTION | EXAMPLE |
|
||||
|:-----------------|:------------------------------------------|:------------------------|
|
||||
| *host | local ip address or domain name | "localhost" |
|
||||
| *port | local port to bind | 1024-65535 |
|
||||
| servers | a list of blinksocks server | - |
|
||||
| *key | for encryption and decryption | - |
|
||||
| frame | frame preset | "origin" |
|
||||
| frame_params | parameters for frame preset | "" |
|
||||
| crypto | crypto preset | "" |
|
||||
| crypto_params | parameters for crypto preset | "" |
|
||||
| protocol | protocol preset | "ss-aead" |
|
||||
| protocol_params | parameters for protocol preset | "aes-256-gcm,ss-subkey" |
|
||||
| obfs | obfs preset | "" |
|
||||
| obfs_params | parameters for obfs preset | "" |
|
||||
| profile | whether profile or not | false |
|
||||
| watch | watch --config for changes | true |
|
||||
| log_level | log level | "info" |
|
||||
| FIELD | DESCRIPTION | EXAMPLE |
|
||||
|:-----------------|:-------------------------------------------|:------------------------|
|
||||
| *host | local ip address or domain name | "localhost" |
|
||||
| *port | local port to bind | 1024-65535 |
|
||||
| servers | a list of blinksocks server | - |
|
||||
| *key | for encryption and decryption | - |
|
||||
| frame | frame preset | "origin" |
|
||||
| frame_params | parameters for frame preset | "" |
|
||||
| crypto | crypto preset | "" |
|
||||
| crypto_params | parameters for crypto preset | "" |
|
||||
| protocol | protocol preset | "ss-aead" |
|
||||
| protocol_params | parameters for protocol preset | "aes-256-gcm,ss-subkey" |
|
||||
| obfs | obfs preset | "" |
|
||||
| obfs_params | parameters for obfs preset | "" |
|
||||
| redirect | redirect requests to here when preset fail | "127.0.0.1:80" |
|
||||
| profile | whether profile or not | false |
|
||||
| watch | watch --config for changes | true |
|
||||
| log_level | log level | "info" |
|
||||
|
||||
> NOTE: `host`, `port`, and `key` must be set.
|
||||
|
||||
* Servers
|
||||
* Servers(Client Side Only)
|
||||
|
||||
`servers` includes multiple servers, a server must either be formed with `ip:port` or `hostname:port`.
|
||||
|
||||
@ -103,6 +105,34 @@ npm logging levels by default, you can choose one of them demand:
|
||||
{ error: 0, warn: 1, info: 2, verbose: 3, debug: 4, silly: 5 }
|
||||
```
|
||||
|
||||
## Hot reload config.json
|
||||
|
||||
`--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 client -c config.json --watch
|
||||
```
|
||||
|
||||
> NOTE that if you change `host` or `port`, a restart is required.
|
||||
|
||||
## Redirect(Server Side Only)
|
||||
|
||||
You can specify a `redirect` location to tell blinksocks **server** where to relay unexpected data received
|
||||
from client.
|
||||
|
||||
`redirect` must either be formed with `ip:port` or `hostname:port`. For example:
|
||||
|
||||
```
|
||||
{
|
||||
...
|
||||
"redirect": "localhost:80"
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
If `redirect` is not provided, connection will be closed after random seconds when server fail to process.
|
||||
|
||||
## Work with shadowsocks
|
||||
|
||||
To work with **shadowsocks**, please choose one of the following configuration:
|
||||
|
@ -54,10 +54,11 @@ $ blinksocks server --help
|
||||
--protocol-params [protocol-params] parameters for protocol, default: 'aes-256-gcm,ss-subkey'
|
||||
--obfs [obfs] a preset used in obfs middleware, default: ''
|
||||
--obfs-params [obfs-params] parameters for obfs, default: ''
|
||||
--redirect [redirect] redirect stream to here when any preset fail to process, default: ''
|
||||
--log-level [log-level] log level, default: 'silly'
|
||||
-q, --quiet force log level to 'error', default: false
|
||||
-w, --watch hot reload config.json specified via -c, default: true
|
||||
--profile generate performance statistics, store at blinksocks.profile.log once exit, default: false
|
||||
-q, --quiet [quiet] force log level to 'error', default: false
|
||||
-w, --watch [watch] hot reload config.json specified via -c, default: true
|
||||
--profile [profile] generate performance statistics, store at blinksocks.profile.log once exit, default: false
|
||||
|
||||
|
||||
Examples:
|
||||
|
Loading…
Reference in New Issue
Block a user