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.

189 lines
5.7 KiB

  1. .ig
  2. . manual page for shadowsocks-libev
  3. .
  4. . Copyright (c) 2012-2016, by: Max Lv
  5. . All rights reserved.
  6. .
  7. . Permission is granted to copy, distribute and/or modify this document
  8. . under the terms of the GNU Free Documentation License, Version 1.1 or
  9. . any later version published by the Free Software Foundation;
  10. . with no Front-Cover Texts, no Back-Cover Texts, and with the following
  11. . Invariant Sections (and any sub-sections therein):
  12. . all .ig sections, including this one
  13. . STUPID TRICKS Sampler
  14. . AUTHOR
  15. .
  16. . A copy of the Free Documentation License is included in the section
  17. . entitled "GNU Free Documentation License".
  18. .
  19. ..
  20. \# - these two are for chuckles, makes great grammar
  21. .ds Lo \fBss-local\fR
  22. .ds Re \fBss-redir\fR
  23. .ds Se \fBss-server\fR
  24. .ds Tu \fBss-tunnel\fR
  25. .ds Ma \fBss-manager\fR
  26. .ds Me \fBShadowsocks-libev\fR
  27. .
  28. .TH "SS-MANAGER" "1" "April 19, 2016" "SHADOWSOCKS-LIBEV"
  29. .SH NAME
  30. ss-manager \- ss-server controller for multi-user management and traffic
  31. statistics
  32. .SH SYNOPSIS
  33. \*(Ma
  34. [\fB\-AuUv\fR] [\fB\-h\fR|\fB\--help\fR]
  35. [\fB\-s\fR \fIserver_host\fR] [\fB\-p\fR \fIserver_port\fR] [\fB\-l\fR \fIlocal_port\fR]
  36. [\fB\-k\fR \fIpassword\fR] [\fB\-m\fR \fIencrypt_method\fR] [\fB\-f\fR \fIpid_file\fR]
  37. [\fB\-t\fR \fItimeout\fR] [\fB\-c\fR \fIconfig_file\fR] [\fB\-i\fR \fIinterface\fR]
  38. [\fB\-b\fR \fIlocal_addr\fR] [\fB\-a\fR \fIuser_name\fR]
  39. [\fB\-\-manager\-address\fR \fIpath_to_unix_domain\fR]
  40. [\fB\-\-executable\fR \fIpath_to_server_executable\fR]
  41. .SH DESCRIPTION
  42. \*(Me is a lightweight and secure socks5 proxy. It is a port of the original
  43. shadowsocks created by clowwindy. \*(Me is written in pure C and takes advantage
  44. of \fBlibev\fP to achieve both high performance and low resource consumption.
  45. .PP
  46. \*(Me consists of five components.
  47. \*(Ma(1) is a controller for multi-user management and traffic statistics, using
  48. UNIX domain socket to talk with \*(Se(1). Also, it provides a UNIX domain socket
  49. or IP based API for other software. About the details of this API, please refer
  50. to the following \fBPROTOCOL\fR section.
  51. .SH OPTIONS
  52. .TP
  53. .B \-s \fIserver_host\fP
  54. Set the server's hostname or IP.
  55. .TP
  56. .B \-k \fIpassword\fP
  57. Set the password. The server and the client should use the same password.
  58. .TP
  59. .B \-m \fIencrypt_method\fP
  60. Set the cipher.
  61. \*(Me accepts 18 different ciphers: table, rc4, rc4-md5, aes-128-cfb,
  62. aes-192-cfb, aes-256-cfb, bf-cfb, camellia-128-cfb, camellia-192-cfb,
  63. camellia-256-cfb, cast5-cfb, des-cfb, idea-cfb, rc2-cfb, seed-cfb, salsa20,
  64. chacha20 and chacha20-ietf. The default cipher is \fItable\fP.
  65. If built with PolarSSL or custom OpenSSL libraries, some of these ciphers may
  66. not work.
  67. .TP
  68. .B \-a \fIuser_name\fP
  69. Run as a specific user.
  70. .TP
  71. .B \-f \fIpid_file\fP
  72. Start shadowsocks as a daemon with specific pid file.
  73. .TP
  74. .B \-t \fItimeout\fP
  75. Set the socket timeout in seconds. The default value is 60.
  76. .TP
  77. .B \-c \fIconfig_file\fP
  78. Use a configuration file.
  79. .TP
  80. .B \-i \fIinterface\fP
  81. Send traffic through specific network interface.
  82. For example, there are three interfaces in your device, which is lo (127.0.0.1),
  83. eth0 (192.168.0.1) and eth1 (192.168.0.2). Meanwhile, you configure \*(Ma to
  84. listen on 0.0.0.0:8388 and bind to eth1. That results the traffic go out through
  85. eth1, but not lo nor eth0. This option is useful to control traffic in
  86. multi-interface environment.
  87. .TP
  88. .B \-u
  89. Enable UDP relay.
  90. .TP
  91. .B \-U
  92. Enable UDP relay and disable TCP relay.
  93. .TP
  94. .B \-A
  95. Enable onetime authentication.
  96. .TP
  97. .B \-d \fIaddr\fP
  98. Setup name servers for internal DNS resolver (libudns). The default server is
  99. fetched from /etc/resolv.conf.
  100. .TP
  101. .B \--fast-open
  102. Enable TCP fast open.
  103. Only available with Linux kernel > 3.7.0.
  104. .TP
  105. .B \--acl \fIacl_config\fP
  106. Enable ACL (Access Control List) and specify config file.
  107. .TP
  108. .B \--manager-address \fIpath_to_unix_domain\fP
  109. Specify UNIX domain socket address for the communication between \*(Ma(1) and
  110. \*(Se(1).
  111. Only available in server and manager mode.
  112. .TP
  113. .B \--executable \fIpath_to_server_executable\fP
  114. Specify the executable path of ss-server.
  115. Only available in manager mode.
  116. .TP
  117. .B \-v
  118. Enable verbose mode.
  119. .TP
  120. .B \-h, --help
  121. Print help message.
  122. .SH PROTOCOL
  123. \*(Ma(1) provides several APIs through UDP protocol:
  124. .in +4n
  125. Send UDP commands in the following format to the manager-address provided to
  126. \*(Ma(1).
  127. command: [JSON data]
  128. To add a port:
  129. add: {"server_port": 8001, "password":"7cd308cc059"}
  130. To remove a port:
  131. remove: {"server_port": 8001}
  132. To receive a pong:
  133. ping
  134. Then \*(Ma(1) will send back the traffic statistics:
  135. stat: {"8001":11370}
  136. .SH EXAMPLE
  137. To use \*(Ma(1), First start it and specify necessary information.
  138. Then communicate with \*(Ma(1) through UNIX Domain Socket using UDP protocol:
  139. # Start the manager. Arguments for ss-server will be passed to generated
  140. # ss-server process(es) respectively.
  141. ss-manager --manager-address /tmp/manager.sock --executable \
  142. $(which ss-server) -s example.com -m aes-256-cfb -c /path/to/config.json
  143. # Connect to the socket. Using netcat-openbsd as an example.
  144. # You should use scripts or other programs for further management.
  145. nc -Uu /tmp/manager.sock
  146. After that, you may communicate with \*(Ma(1) as described above in the
  147. \fBPROTOCOL\fR section.
  148. .SH SEE ALSO
  149. .BR \*(Lo (1),
  150. .BR \*(Se (1),
  151. .BR \*(Tu (1),
  152. .BR \*(Re (1),
  153. .BR shadowsocks-libev (8),
  154. .BR iptables (8),
  155. /etc/shadowsocks-libev/config.json
  156. .br
  157. .SH AUTHOR
  158. shadowsocks was created by clowwindy <clowwindy42@gmail.com> and
  159. shadowsocks-libev was maintained by Max Lv <max.c.lv@gmail.com> and Linus Yang
  160. <laokongzi@gmail.com>.
  161. .PP
  162. This manual page was written by Max Lv <max.c.lv@gmail.com>.
  163. .PP
  164. The manual pages were rearranged by hosiet <073plan@gmail.com>.