Module shadowsocks_service::config

source ·
Expand description

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": [
        {
            "server": "127.0.0.1",
            "server_port": 1080,
            "password": "hellofuck",
            "method": "bf-cfb"
        },
        {
            "server": "127.0.0.1",
            "server_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§

Enums§

Functions§