Skip to content
徐宇楠 edited this page Jun 10, 2019 · 3 revisions

Config file

# use ${...} to load predefined values.

pluginRoot: ${appRoot}/plugins #path to search plugins, default ${appRoot}/plugins.
backlog: ~ #bind backlog, default `SocketOptionName.MaxConnections`.
logLevel: 2 #log level, 0-6 OR string value of `Microsoft.Extensions.Logging.LogLevel`, default `Debug` for release build, `Information` for debug build.

shark:
  host: 127.0.0.1 # server address, for server will bind the address, for client will connect to target.
  port: 12306 # server port, for server will bind the port, for client will connect to the port.
  max: 0 # client only, max server connections, client will reuse the connections if possible, 0 for unlimited, default 0.
  auth: none # auth function, default `none`, matched by name.
  keygen: scrypt # key generation function to produce crypto key and iv, default `scrypt`, matched by name.
  crypto: aes-256-cbc # crypto function, default `aes-256-cbc`, matched by name.

client: # client only
  host: 127.0.0.1 # client bind address, for proxy protocol
  port: 1080 # client bind port, for proxy protocol
  protocol: Socks5 # proxy protocol, available `Socks5`, `Http` default `Socks5`

# other configurations.....

Predefined values

  • appRoot = AppContext.BaseDirectory, root of the execution, no tailing '/'
  • configRoot, directory which contains config file, no tailing '/', eg. for shark -c /a/b/c/configA.yml, configRoot = /a/b/c

Clone this wiki locally