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.

174 lines
5.1 KiB

  1. .ig
  2. . manual page for shadowsocks-libev
  3. .
  4. . Copyright (c) 2012-2015, 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" "September 10, 2015" "SHADOWSOCKS-LIBEV"
  29. .SH NAME
  30. ss-manager \- ss-server controller for multi-user management and traffic statistics
  31. .SH SYNOPSIS
  32. \*(Ma
  33. [\fB\-AhuUv\fR]
  34. [\fB\-s\fR \fIserver_host\fR] [\fB\-p\fR \fIserver_port\fR] [\fB\-l\fR \fIlocal_port\fR]
  35. [\fB\-k\fR \fIpassword\fR] [\fB\-m\fR \fIencrypt_method\fR] [\fB\-f\fR \fIpid_file\fR]
  36. [\fB\-t\fR \fItimeout\fR] [\fB\-c\fR \fIconfig_file\fR] [\fB\-i\fR \fIinterface\fR]
  37. [\fB\-b\fR \fIlocal_addr\fR] [\fB\-a\fR \fIuser_name\fR]
  38. [\fB\-\-manager\-address\fR \fIpath_to_unix_domain\fR]
  39. [\fB\-\-executable\fR \fIpath_to_server_executable\fR]
  40. .SH DESCRIPTION
  41. \*(Me is a lightweight and secure socks5 proxy. It is a port of the original
  42. shadowsocks created by clowwindy. \*(Me is written in pure C and takes advantage
  43. of \fBlibev\fP to achieve both high performance and low resource consumption.
  44. .PP
  45. \*(Me consists of five components.
  46. \*(Ma(1) is a controller for multi-user management and traffic statistics, using UNIX
  47. domain socket to talk with \*(Se(1). Also, it provides a UNIX domain socket or IP based
  48. API for other software. About the details of this API, please refer to the following
  49. \fBPROTOCOL\fR section.
  50. .SH OPTIONS
  51. .TP
  52. .B \-s \fIserver_host\fP
  53. Set the server's hostname or IP.
  54. .TP
  55. .B \-p \fIserver_port\fP
  56. Set the server's port number.
  57. .TP
  58. .B \-l \fIlocal_port\fP
  59. Set the local port number.
  60. .TP
  61. .B \-k \fIpassword\fP
  62. Set the password. The server and the client should use the same password.
  63. .TP
  64. .B \-m \fIencrypt_method\fP
  65. Set the cipher.
  66. Shadowsocks accepts 16 different ciphers: table, rc4, rc4-md5,
  67. aes-128-cfb, aes-192-cfb, aes-256-cfb, bf-cfb, camellia-128-cfb,
  68. camellia-192-cfb, camellia-256-cfb, cast5-cfb, des-cfb, idea-cfb, rc2-cfb,
  69. seed-cfb, salsa20 and chacha20. The default cipher is \fItable\fP.
  70. If built with PolarSSL or custom OpenSSL libraries, some of these ciphers may
  71. not work.
  72. .TP
  73. .B \-f \fIpid_file\fP
  74. Start shadowsocks as a daemon with specific pid file.
  75. .TP
  76. .B \-t \fItimeout\fP
  77. Set the socket timeout in seconds. The default value is 10.
  78. .TP
  79. .B \-c \fIconfig_file\fP
  80. Use a configuration file.
  81. .TP
  82. .B \-i \fIinterface\fP
  83. Specify network interface to bind.
  84. .TP
  85. .B \-b \fIlocal_address\fP
  86. Specify local address to bind.
  87. .TP
  88. .B \-a \fIuser_name\fP
  89. Run as a specific user.
  90. .TP
  91. .B \-u
  92. Enable UDP relay.
  93. .TP
  94. .B \-U
  95. Enable UDP relay and disable TCP relay.
  96. .TP
  97. .B \-A
  98. Enable onetime authentication.
  99. .TP
  100. .B \--manager-address \fIpath_to_unix_domain\fP
  101. Specify UNIX domain socket address for the communication between ss-manager and
  102. ss-server.
  103. Only available in server and manager mode.
  104. .TP
  105. .B \--executable \fIpath_to_server_executable\fP
  106. Specify the executable path of ss-server.
  107. Only available in manager mode.
  108. .TP
  109. .B \-v
  110. Enable verbose mode.
  111. .SH PROTOCOL
  112. \*(Ma(1) provides several APIs through UDP protocol:
  113. Send UDP commands in the following format to the manager-address provided to \*(Ma(1).
  114. command: [JSON data]
  115. To add a port:
  116. add: {"server_port": 8001, "password":"7cd308cc059"}
  117. To remove a port:
  118. remove: {"server_port": 8001}
  119. To receive a pong:
  120. ping
  121. Then \*(Ma(1) will send back the traffic statistics:
  122. stat: {"8001":11370}
  123. .SH EXAMPLE
  124. To use \*(Ma(1), First start it and specify necessary information.
  125. Then communicate with \*(Ma(1) through UNIX Domain Socket using UDP protocol:
  126. # Start the manager. Arguments for ss-server will be passed to generated
  127. # ss-server process(es) respectively.
  128. ss-manager --manager-address /tmp/manager.sock --executable \
  129. $(which ss-server) -s example.com -m aes-256-cfb -c /path/to/config.json
  130. # Connect to the socket. Using netcat-openbsd as an example.
  131. # You should use scripts or other programs for further management.
  132. nc -Uu /tmp/ss.socket
  133. After that, you may communicate with \*(Ma(1) as described above in the
  134. \fBPROTOCOL\fR section.
  135. .SH SEE ALSO
  136. .BR \*(Lo (1),
  137. .BR \*(Se (1),
  138. .BR \*(Tu (1),
  139. .BR \*(Re (1),
  140. .BR shadowsocks-libev (8),
  141. .BR iptables (8),
  142. /etc/shadowsocks-libev/config.json
  143. .br
  144. .SH AUTHOR
  145. shadowsocks was created by clowwindy <clowwindy42@gmail.com> and
  146. shadowsocks-libev was maintained by Max Lv <max.c.lv@gmail.com> and Linus Yang
  147. <laokongzi@gmail.com>.
  148. .PP
  149. This manual page was written by Max Lv <max.c.lv@gmail.com>.
  150. .PP
  151. The manual pages were rearranged by hosiet <073plan@gmail.com>.