You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

161 lines
4.3 KiB

Asciidoc man page rework (#699) * Add 'tunnel_address' support for json config parser And allow ss-tunnel to use the newly introduced parser. Signed-off-by: Adam Anonymous <anonymous_temp_user@yahoo.co.jp> * Add "mode" support for jconf Now jconf supports "mode" setting, allowed values are "tcp_only", "tcp_and_udp" and "udp_only". Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Use jconf "mode" for server/local/tunnel/manager Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Add per-project vimrc to gitignore As the coding style differs from kernel and other projects, so such project vimrc should be helpful. Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Introduce asciidoc based documentation framework Use asciidoc for new documentation framework, which could not only output man pages, but also htmls. And asciidoc documentation is much more human-readable than roff man pages. Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert shadowsocks-libev man page to asciidoc The port to asciidoc has some format change compared to old one. The most obvious one is the options listed in SYNOPSIS. Now the options list is not split into 2/3 columns, or we must use asciidoc tables and introduce table frames. Other small change includes the removal of AUTHOR sector, as it's not an expendable method to update AUTHOR sector every time it gets updated. Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert ss-local man page to asciidoc Also modify gitignore, since it use too generic rules to ignore such documentation. Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert ss-manager man page to asciidoc Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert ss-nat man page to asciidoc Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert ss-redir man page to asciidoc Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert ss-server man page to asciidoc Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert ss-tunnel man page to asciidoc Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Remove old roff man pages Welcome to the new age of asciidoc. Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Add equivalent tables for command line options and config file Now user can get a more clear view of config file and command line options. Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp>
8 years ago
  1. ss-manager(1)
  2. =============
  3. NAME
  4. ----
  5. ss-manager - ss-server controller for multi-user management and traffic statistics
  6. SYNOPSIS
  7. --------
  8. *ss-manager*
  9. [-AuUv] [-h|--help]
  10. [-s <server_host>] [-p <server_port>] [-l <local_port>]
  11. [-k <password>] [-m <encrypt_method>] [-f <pid_file>]
  12. [-t <timeout>] [-c <config_file>] [-i <interface>]
  13. [-b <local_addr>] [-a <user_name>]
  14. [--manager-address <path_to_unix_domain>]
  15. [--executable <path_to_server_executable>]
  16. DESCRIPTION
  17. -----------
  18. *Shadowsocks-libev* is a lightweight and secure socks5 proxy.
  19. It is a port of the original shadowsocks created by clowwindy.
  20. *Shadowsocks-libev* is written in pure C and takes advantage of libev to
  21. achieve both high performance and low resource consumption.
  22. *Shadowsocks-libev* consists of five components.
  23. `ss-manager`(1) is a controller for multi-user management and
  24. traffic statistics, using UNIX domain socket to talk with `ss-server`(1).
  25. Also, it provides a UNIX domain socket or IP based API for other software.
  26. About the details of this API, please refer to the following 'PROTOCOL'
  27. section.
  28. OPTIONS
  29. -------
  30. -s <server_host>::
  31. Set the server's hostname or IP.
  32. -k <password>::
  33. Set the password. The server and the client should use the same password.
  34. -m <encrypt_method>::
  35. Set the cipher.
  36. +
  37. *Shadowsocks-libev* accepts 18 different ciphers:
  38. +
  39. table, rc4, rc4-md5, aes-128-cfb, aes-192-cfb, aes-256-cfb, bf-cfb,
  40. camellia-128-cfb, camellia-192-cfb, camellia-256-cfb, cast5-cfb, des-cfb,
  41. idea-cfb, rc2-cfb, seed-cfb, salsa20, chacha20 and chacha20-ietf.
  42. +
  43. The default cipher is 'table'.
  44. +
  45. If built with PolarSSL or custom OpenSSL libraries, some of
  46. these ciphers may not work.
  47. -a <user_name>::
  48. Run as a specific user.
  49. -f <pid_file>::
  50. Start shadowsocks as a daemon with specific pid file.
  51. -t <timeout>::
  52. Set the socket timeout in seconds. The default value is 60.
  53. -c <config_file>::
  54. Use a configuration file.
  55. -i <interface>::
  56. Send traffic through specific network interface.
  57. +
  58. For example, there are three interfaces in your device,
  59. which is lo (127.0.0.1), eth0 (192.168.0.1) and eth1 (192.168.0.2).
  60. Meanwhile, you configure `ss-local` to listen on 0.0.0.0:8388 and bind to eth1.
  61. That results the traffic go out through eth1, but not lo nor eth0.
  62. This option is useful to control traffic in multi-interface environment.
  63. -u::
  64. Enable UDP relay.
  65. -U::
  66. Enable UDP relay and disable TCP relay.
  67. -A::
  68. Enable onetime authentication.
  69. -d <addr>::
  70. Setup name servers for internal DNS resolver (libudns).
  71. The default server is fetched from `/etc/resolv.conf`.
  72. --fast-open::
  73. Enable TCP fast open.
  74. +
  75. Only available with Linux kernel > 3.7.0.
  76. --acl <acl_config>::
  77. Enable ACL (Access Control List) and specify config file.
  78. --manager-address <path_to_unix_domain>::
  79. Specify UNIX domain socket address for the communication between ss-manager(1) and ss-server(1).
  80. +
  81. Only available in server and manager mode.
  82. --executable <path_to_server_executable>::
  83. Specify the executable path of ss-server.
  84. +
  85. Only available in manager mode.
  86. -v::
  87. Enable verbose mode.
  88. -h|--help::
  89. Print help message.
  90. PROTOCOL
  91. --------
  92. `ss-manager`(1) provides several APIs through UDP protocol:
  93. Send UDP commands in the following format to the manager-address provided to ss-manager(1): ::::
  94. command: [JSON data]
  95. To add a port: ::::
  96. add: {"server_port": 8001, "password":"7cd308cc059"}
  97. To remove a port: ::::
  98. remove: {"server_port": 8001}
  99. To receive a pong: ::::
  100. ping
  101. Then `ss-manager`(1) will send back the traffic statistics: ::::
  102. stat: {"8001":11370}
  103. EXAMPLE
  104. -------
  105. To use `ss-manager`(1), First start it and specify necessary information.
  106. Then communicate with `ss-manager`(1) through UNIX Domain Socket using UDP
  107. protocol:
  108. ....
  109. # Start the manager. Arguments for ss-server will be passed to generated
  110. # ss-server process(es) respectively.
  111. ss-manager --manager-address /tmp/manager.sock --executable $(which ss-server) -s example.com -m aes-256-cfb -c /path/to/config.json
  112. # Connect to the socket. Using netcat-openbsd as an example.
  113. # You should use scripts or other programs for further management.
  114. nc -Uu /tmp/manager.sock
  115. ....
  116. After that, you may communicate with `ss-manager`(1) as described above in the
  117. 'PROTOCOL' section.
  118. SEE ALSO
  119. --------
  120. `ss-local`(1),
  121. `ss-server`(1),
  122. `ss-tunnel`(1),
  123. `ss-redir`(1),
  124. `shadowsocks-libev`(8),
  125. `iptables`(8),
  126. /etc/shadowsocks-libev/config.json