
| Current Path : /usr/share/doc/shadowsocks-libev/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : //usr/share/doc/shadowsocks-libev/ss-manager.html |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="generator" content="AsciiDoc 9.0.0rc1">
<title>ss-manager(1)</title>
</head>
<body>
<h1>ss-manager(1)</h1>
<p>
</p>
<hr>
<h2><a name="_name"></a>NAME</h2>
<p>ss-manager - ss-server controller for multi-user management and traffic statistics</p>
<hr>
<h2><a name="_synopsis"></a>SYNOPSIS</h2>
<p><strong>ss-manager</strong>
[-AuUv] [-h|--help]
[-s <emphasis><server_host></emphasis>] [-p <emphasis><server_port></emphasis>] [-l <emphasis><local_port></emphasis>]
[-k <emphasis><password></emphasis>] [-m <emphasis><encrypt_method></emphasis>] [-f <emphasis><pid_file></emphasis>]
[-t <emphasis><timeout></emphasis>] [-c <emphasis><config_file></emphasis>] [-i <emphasis><interface></emphasis>]
[-b <emphasis><local_addr></emphasis>] [-a <emphasis><user_name></emphasis>] [-D <emphasis><path></emphasis>]
[--manager-address <emphasis><path_to_unix_domain></emphasis>]
[--executable <emphasis><path_to_server_executable></emphasis>]
[--fast-open] [--reuse-port]
[--plugin <emphasis><plugin_name></emphasis>] [--plugin-opts <emphasis><plugin_options></emphasis>]</p>
<hr>
<h2><a name="_description"></a>DESCRIPTION</h2>
<p><strong>Shadowsocks-libev</strong> is a lightweight and secure socks5 proxy.
It is a port of the original shadowsocks created by clowwindy.
<strong>Shadowsocks-libev</strong> is written in pure C and takes advantage of libev to
achieve both high performance and low resource consumption.</p>
<p><strong>Shadowsocks-libev</strong> consists of five components.
<code>ss-manager</code>(1) is a controller for multi-user management and
traffic statistics, using UNIX domain socket to talk with <code>ss-server</code>(1).
Also, it provides a UNIX domain socket or IP based API for other software.
About the details of this API, please refer to the following <em>PROTOCOL</em>
section.</p>
<hr>
<h2><a name="_options"></a>OPTIONS</h2>
<dl>
<dt>
-s <emphasis><server_host></emphasis>
</dt>
<dd>
<p>
Set the server’s hostname or IP.
</p>
</dd>
<dt>
-k <emphasis><password></emphasis>
</dt>
<dd>
<p>
Set the password. The server and the client should use the same password.
</p>
</dd>
<dt>
-m <emphasis><encrypt_method></emphasis>
</dt>
<dd>
<p>
Set the cipher.
</p>
<p><strong>Shadowsocks-libev</strong> accepts 18 different ciphers:</p>
<p>aes-128-gcm, aes-192-gcm, aes-256-gcm,
rc4-md5, aes-128-cfb, aes-192-cfb, aes-256-cfb,
aes-128-ctr, aes-192-ctr, aes-256-ctr, bf-cfb,
camellia-128-cfb, camellia-192-cfb, camellia-256-cfb,
chacha20-ietf-poly1305, salsa20, chacha20 and chacha20-ietf.</p>
<p>The default cipher is <em>chacha20-ietf-poly1305</em>.</p>
<p>If built with PolarSSL or custom OpenSSL libraries, some of
these ciphers may not work.</p>
</dd>
<dt>
-a <emphasis><user_name></emphasis>
</dt>
<dd>
<p>
Run as a specific user.
</p>
</dd>
<dt>
-f <emphasis><pid_file></emphasis>
</dt>
<dd>
<p>
Start shadowsocks as a daemon with specific pid file.
</p>
</dd>
<dt>
-t <emphasis><timeout></emphasis>
</dt>
<dd>
<p>
Set the socket timeout in seconds. The default value is 60.
</p>
</dd>
<dt>
-c <emphasis><config_file></emphasis>
</dt>
<dd>
<p>
Use a configuration file.
</p>
<p>You may use "port_password" field inside this configuration file to bring up
multiple ss-server instances together.</p>
</dd>
<dt>
-i <emphasis><interface></emphasis>
</dt>
<dd>
<p>
Send traffic through specific network interface.
</p>
<p>For example, there are three interfaces in your device,
which is lo (127.0.0.1), eth0 (192.168.0.1) and eth1 (192.168.0.2).
Meanwhile, you configure <code>ss-local</code> to listen on 0.0.0.0:8388 and bind to eth1.
That results the traffic go out through eth1, but not lo nor eth0.
This option is useful to control traffic in multi-interface environment.</p>
</dd>
<dt>
-u
</dt>
<dd>
<p>
Enable UDP relay.
</p>
</dd>
<dt>
-U
</dt>
<dd>
<p>
Enable UDP relay and disable TCP relay.
</p>
</dd>
<dt>
-A
</dt>
<dd>
<p>
Enable onetime authentication.
</p>
</dd>
<dt>
-d <emphasis><addr></emphasis>
</dt>
<dd>
<p>
Setup name servers for internal DNS resolver (libc-ares).
The default server is fetched from <code>/etc/resolv.conf</code>.
</p>
</dd>
<dt>
--fast-open
</dt>
<dd>
<p>
Enable TCP fast open.
</p>
<p>Only available with Linux kernel > 3.7.0.</p>
</dd>
<dt>
--reuse-port
</dt>
<dd>
<p>
Enable port reuse.
</p>
<p>Only available with Linux kernel > 3.9.0.</p>
</dd>
<dt>
--acl <emphasis><acl_config></emphasis>
</dt>
<dd>
<p>
Enable ACL (Access Control List) and specify config file.
</p>
</dd>
<dt>
--manager-address <emphasis><path_to_unix_domain></emphasis>
</dt>
<dd>
<p>
Specify UNIX domain socket address for the communication between ss-manager(1) and ss-server(1).
</p>
<p>Only available in server and manager mode.</p>
</dd>
<dt>
--executable <emphasis><path_to_server_executable></emphasis>
</dt>
<dd>
<p>
Specify the executable path of ss-server.
</p>
<p>Only available in manager mode.</p>
</dd>
<dt>
--executable <emphasis><path_to_server_executable></emphasis>
</dt>
<dd>
<p>
Specify the working directory of ss-manager.
</p>
<p>Only available in manager mode.</p>
</dd>
<dt>
--plugin <emphasis><plugin_name></emphasis>
</dt>
<dd>
<p>
Enable SIP003 plugin. (Experimental)
</p>
</dd>
<dt>
--plugin-opts <emphasis><plugin_options></emphasis>
</dt>
<dd>
<p>
Set SIP003 plugin options. (Experimental)
</p>
</dd>
<dt>
-v
</dt>
<dd>
<p>
Enable verbose mode.
</p>
</dd>
<dt>
-h|--help
</dt>
<dd>
<p>
Print help message.
</p>
</dd>
</dl>
<hr>
<h2><a name="_protocol"></a>PROTOCOL</h2>
<p><code>ss-manager</code>(1) provides several APIs through UDP protocol:</p>
<dl>
<dt>
Send UDP commands in the following format to the manager-address provided to ss-manager(1):
</dt>
<dd>
<p>
command: [JSON data]
</p>
</dd>
<dt>
To add a port:
</dt>
<dd>
<p>
add: {"server_port": 8001, "password":"7cd308cc059"}
</p>
</dd>
<dt>
To remove a port:
</dt>
<dd>
<p>
remove: {"server_port": 8001}
</p>
</dd>
<dt>
To receive the traffic statistics:
</dt>
<dd>
<p>
ping
</p>
</dd>
<dt>
The format of the traffic statistics:
</dt>
<dd>
<p>
stat: {"8001":11370}
</p>
</dd>
</dl>
<p>There is no way to reset the traffic statistics, unless you remove the port and add it again</p>
<hr>
<h2><a name="_example"></a>EXAMPLE</h2>
<p>To use <code>ss-manager</code>(1), First start it and specify necessary information.</p>
<p>Then communicate with <code>ss-manager</code>(1) through UNIX Domain Socket using UDP
protocol:</p>
<pre><code># Start the manager. Arguments for ss-server will be passed to generated
# ss-server process(es) respectively.
ss-manager --manager-address /tmp/manager.sock --executable $(which ss-server) -s example.com -m aes-256-cfb -c /path/to/config.json
# Connect to the socket. Using netcat-openbsd as an example.
# You should use scripts or other programs for further management.
nc -Uu /tmp/manager.sock</code></pre>
<p>After that, you may communicate with <code>ss-manager</code>(1) as described above in the
<em>PROTOCOL</em> section.</p>
<hr>
<h2><a name="_see_also"></a>SEE ALSO</h2>
<p><code>ss-local</code>(1),
<code>ss-server</code>(1),
<code>ss-tunnel</code>(1),
<code>ss-redir</code>(1),
<code>shadowsocks-libev</code>(8),
<code>iptables</code>(8),
/etc/shadowsocks-libev/config.json</p>
<p></p>
<p></p>
<hr><p><small>
Last updated
2020-01-10 01:48:42 UTC
</small></p>
</body>
</html>