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.

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