[−][src]Module shadowsocks::config
This is a mod for storing and parsing configuration
According to shadowsocks' official documentation, the standard configuration file should be in JSON format:
ⓘThis example is not tested
{ "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:
ⓘThis example is not tested
{ "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 |
InvalidRedirType | |
ManagerAddrError | Error for parsing |
ManagerConfig | Configuration for Manager |
RedirTypeIter | |
ServerAddrError | Parse |
ServerConfig | Configuration for a server |
Enums
ConfigType | Server config type |
ErrorKind | Configuration parsing error kind |
ManagerAddr | Address for Manager server |
ManagerServerHost | Host for servers to bind |
Mode | Server mode |
RedirType | Transparent Proxy type |
ServerAddr | Server address |
UrlParseError | Shadowsocks URL parsing Error |
Type Definitions
ClientConfig | Listening address |