shadowsocks v0.2.1 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 required atom - the connection type, :client or :server or custom module name
  • port required integer - listen port
  • ip optional tuple - listen ip, example: {127,0,0,1}
  • method optional string - encode method, default: "rc4-md5"
  • password required string - encode password
  • ota optional bool - is force open one time auth, default: false
  • server optional tuple - required if type 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 required atom - the connection type, :client or :server or custom module name
  • port required integer - listen port
  • ip optional tuple - listen ip, example: {127,0,0,1}
  • method optional string - encode method, default: "aes-256-cfb"
  • password required string - encode password
  • ota optional bool - is force open one time auth, default: false
  • server optional tuple - required if type 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