shadowsocks v0.5.2 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:
typerequiredatom- the connection type,:clientor:serveror custom module nameportrequiredinteger- listen portipoptionaltuple- listen ip, example:{127,0,0,1}methodoptionalstring- encode method, default:"rc4-md5"passwordrequiredstring- encode passwordotaoptionalbool- is force open one time auth, default:falseserveroptionaltuple- required iftypeis: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:
typerequiredatom- the connection type,:clientor:serveror custom module nameThere are currently four built-in
type:Shadowsocks.Conn.Client- general client, alias is:clientShadowsocks.Conn.Server- general server, alias is:serverShadowsocks.Conn.TransparentClient- transparent client, perfect with iptablesShadowsocks.Conn.HTTP302- redirect any http get request to:redirect_url, otherwise drop connectionsShadowsocks.Conn.ObfsServer- simple http obfs server (can both accept http obfs client and original shadowsocks client)
portrequiredinteger- listen portipoptionaltuple- listen ip, example:{127,0,0,1}methodoptionalstring- encode method, default:"aes-256-cfb"passwordrequiredstring- encode passwordotaoptionalbool- is force open one time auth, default:falseserveroptionaltuple- required iftypeis: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