Module shadowsocks::config
[−]
[src]
This is a mod for storing and parsing configuration
According to shadowsocks' official documentation, the standard configuration file should be in JSON format:
{ "server": "127.0.0.1", "server_port": 1080, "local_port": 8388, "password": "the-password", "timeout": 300, "method": "aes-256-cfb", "local_address": "127.0.0.1" }
But this configuration is not for using multiple shadowsocks server, so we introduce an extended configuration file format:
{ "servers": [ { "address": "127.0.0.1", "port": 1080, "password": "hellofuck", "method": "bf-cfb" }, { "address": "127.0.0.1", "port": 1081, "password": "hellofuck", "method": "aes-128-cfb" } ], "local_port": 8388, "local_address": "127.0.0.1" }
These defined server will be used with a load balancing algorithm.
Structs
Config |
Configuration |
Error |
Configuration parsing error |
ServerAddrError |
Parse |
ServerConfig |
Configuration for a server |
Enums
ConfigType |
Server config type |
ErrorKind |
Configuration parsing error kind |
ServerAddr |
Server address |
Type Definitions
ClientConfig |
Listening address |