shadowsocks v0.3.3 Shadowsocks View Source
The Shadowsocks.
This module defines common apis to start,update,stop shadowsocks listeners.
start a listener
Shadowsocks.start(args)
the args
is a keyword list, fields:
type
requiredatom
- the connection type,:client
or:server
or custom module nameport
requiredinteger
- listen portip
optionaltuple
- listen ip, example:{127,0,0,1}
method
optionalstring
- encode method, default:"rc4-md5"
password
requiredstring
- encode passwordota
optionalbool
- is force open one time auth, default:false
server
optionaltuple
- required iftype
is:client
, example:{"la.ss.org", 8388}
stop a listener
Shadowsocks.stop(port)
stop listener by listen port, always return :ok
update listener args
Shadowsocks.update(port, args)
the args
is a keyword list, see Shadowsocks.start/1
method
Link to this section Summary
Functions
get listener pid
check port is running
start a listener
stop a listener
update listener args
Link to this section Functions
get listener pid
check port is running
start a listener
the args
is a keyword list, fields:
type
requiredatom
- the connection type,:client
or:server
or custom module nameThere are currently four built-in
type
:Shadowsocks.Conn.Client
- general client, alias is:client
Shadowsocks.Conn.Server
- general server, alias is:server
Shadowsocks.Conn.TransparentClient
- transparent client, perfect with iptablesShadowsocks.Conn.HTTP302
- redirect any http get request to:redirect_url
, otherwise drop connections
port
requiredinteger
- listen portip
optionaltuple
- listen ip, example:{127,0,0,1}
method
optionalstring
- encode method, default:"aes-256-cfb"
password
requiredstring
- encode passwordota
optionalbool
- is force open one time auth, default:false
server
optionaltuple
- required iftype
is:client
, example:{"la.ss.org", 8388}
stop a listener
stop listener by listen port, always return :ok
update listener args
the args
is a keyword list, see Shadowsocks.start/1
method