Open Mygod opened 5 years ago
Propose some useful fields that are used in shadowsocks-rust:
{
"ipv6_first": true, // Resolve domains to IPv6 first if possible, maybe we could have an "ipv6_only", too
"udp_timeout": 5, // Durations of seconds that a UDP associations will be kept alive
"udp_max_associations": 100, // Maximum number of UDP associations will be kept in server
"dns": "8.8.8.8", // An IP address
"no_delay": true, // sockopt TCP_NODELAY
"nofile": 10240, // rlimit file descriptor soft & hard limit in *NIX system
"manager_address": "/tmp/shadowsocks-manager.sock", // The address of manager
"manager_port": 6300, // If manager_address is an IP address, then this field sets the port that manager is listening to
// Multiple servers
"servers": [
{
"address": "127.0.0.1", // The same as "server"
"port": 1234, // The same as "server_port"
"method": "plain",
"password": "pwd",
"timeout": 5,
"plugin": "plugin",
"plugin_opts": "plugin_opts"
}
]
}
Currently official doc only lists a few field, however, these fields are widely used in implementations:
plugin
andplugin_opts
: see #28;remarks
: accepted and used by both shadowsocks-windows and shadowsocks-android;We should probably standardize these as well.
Furthermore, I should probably mention that shadowsocks-android also uses a number of other extensions as evidenced here. Maybe we should have some ways to allow for extended fields as well.