id: f5c76b12274f42d3bab449dccdc99502
parent_id: 
item_type: 1
item_id: f2c97221f1244c6788d9c6f25cbe3d82
item_updated_time: 1764345570731
title_diff: "[{\"diffs\":[[1,\"shadowsocksshadowsocks-libev\"]],\"start1\":0,\"start2\":0,\"length1\":0,\"length2\":28}]"
body_diff: "[{\"diffs\":[[1,\"<html>\\\r\\\n<head>\\\r\\\n  <title>shadowsocks/shadowsocks-libev</title>\\\r\\\n  <basefont face=\\\"微软雅黑\\\" size=\\\"2\\\" />\\\r\\\n  <meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html;charset=utf-8\\\" />\\\r\\\n  <meta name=\\\"exporter-version\\\" content=\\\"YXBJ Windows/608924 (zh-CN, DDL); Windows/10.0.0 (Win64); EDAMVersion=V2;\\\"/>\\\r\\\n  <style>\\\r\\\n\\tbody, td {\\\r\\\n\\t  font-family: 微软雅黑;\\\r\\\n\\t  font-size: 12pt;\\\r\\\n\\t}\\\r\\\n  </style>\\\r\\\n</head>\\\r\\\n<body>\\\r\\\n<a name=\\\"11493\\\"></a>\\\r\\\n<h1>shadowsocks/shadowsocks-libev</h1>\\\r\\\n\\\r\\\n<div><span><div style=\\\"-evernote-webclip:true\\\"><br/><div><div><div><div><h1>shadowsocks-libev</h1><div><div></div></div></div>\\\n<h2>Intro</h2>\\\n<p><a href=\\\"https://shadowsocks.org/\\\" target=\\\"_blank\\\">Shadowsocks-libev</a> is a lightweight secured SOCKS5\\\nproxy for embedded devices and low-end boxes.</p>\\\n<p>It is a port of <a href=\\\"https://github.com/shadowsocks/shadowsocks\\\" target=\\\"_blank\\\">Shadowsocks</a>\\\ncreated by <a href=\\\"https://github.com/clowwindy\\\" target=\\\"_blank\\\">@clowwindy</a>, and maintained by\\\n<a href=\\\"https://github.com/madeye\\\" target=\\\"_blank\\\">@madeye</a> and <a href=\\\"https://github.com/linusyang\\\" target=\\\"_blank\\\">@linusyang</a>.</p>\\\n<p>Current version: 3.1.0 | <a href=\\\"https://github.com/shadowsocks/shadowsocks-libev/blob/master/debian/changelog\\\" target=\\\"_blank\\\">Changelog</a></p>\\\n<p>Travis CI: </p>\\\n<h2>Features</h2>\\\n<p>Shadowsocks-libev is written in pure C and depends on <a href=\\\"http://software.schmorp.de/pkg/libev.html\\\" target=\\\"_blank\\\">libev</a>. It's designed\\\nto be a lightweight implementation of shadowsocks protocol, in order to keep the resource usage as low as possible.</p>\\\n<p>For a full list of feature comparison between different versions of shadowsocks,\\\nrefer to the <a href=\\\"https://github.com/shadowsocks/shadowsocks/wiki/Feature-Comparison-across-Different-Versions\\\" target=\\\"_blank\\\">Wiki page</a>.</p>\\\n<h2>Prerequisites</h2>\\\n<h3>Get the latest source code</h3>\\\n<p>To get the latest source code, you should also update the submodules as following:</p>\\\n<div><pre>git clone https://github.com/shadowsocks/shadowsocks-libev.git\\\ncd shadowsocks-libev\\\ngit submodule update --init --recursive</pre></div>\\\n<h3>Build and install with recent libsodium</h3>\\\n<p>You have to install libsodium at least 1.0.8, but recommended 1.0.12 or later version before building. See <a href=\\\"https://github.com/shadowsocks/shadowsocks-libev#linux\\\" target=\\\"_blank\\\">Directly build and install on UNIX-like system</a>.</p>\\\n<h2>Installation</h2>\\\n<h3>Distribution-specific guide</h3>\\\n\\\n<hr/>\\\n<h3>Pre-build configure guide</h3>\\\n<p>For a complete list of available configure-time option,\\\ntry <code>configure --help</code>.</p>\\\n<h3>Debian &amp; Ubuntu</h3>\\\n<h4>Install from repository</h4>\\\n<p>Shadowsocks-libev is available in the official repository for following distributions:</p>\\\n<ul>\\\n<li>Debian 8 or higher, including oldstable (jessie), stable (stretch), testing (buster) and unstable (sid)</li>\\\n<li>Ubuntu 16.10 or higher</li>\\\n</ul>\\\n<div><pre>sudo apt update\\\nsudo apt install shadowsocks-libev</pre></div>\\\n<p>For <strong>Debian 8 (Jessie)</strong> users, please install it from <code>jessie-backports-sloppy</code>:\\\nWe strongly encourage you to install shadowsocks-libev from <code>jessie-backports-sloppy</code>.\\\nFor more info about backports, you can refer <a href=\\\"https://backports.debian.org/\\\" target=\\\"_blank\\\">Debian Backports</a>.</p>\\\n<div><pre>sudo sh -c 'printf &quot;deb http://deb.debian.org/debian jessie-backports main\\\\\n&quot; &gt; /etc/apt/sources.list.d/jessie-backports.list'\\\nsudo sh -c 'printf &quot;deb http://deb.debian.org/debian jessie-backports-sloppy main&quot; &gt;&gt; /etc/apt/sources.list.d/jessie-backports.list'\\\nsudo apt update\\\nsudo apt -t jessie-backports-sloppy install shadowsocks-libev</pre></div>\\\n<p>For <strong>Debian 9 (Stretch)</strong> users, please install it from <code>stretch-backports</code>:\\\nWe strongly encourage you to install shadowsocks-libev from <code>stretch-backports</code>.\\\nFor more info about backports, you can refer <a href=\\\"https://backports.debian.org/\\\" target=\\\"_blank\\\">Debian Backports</a>.</p>\\\n<div><pre>sudo sh -c 'printf &quot;deb http://deb.debian.org/debian stretch-backports main&quot; &gt; /etc/apt/sources.list.d/stretch-backports.list'\\\nsudo apt update\\\nsudo apt -t stretch-backports install shadowsocks-libev</pre></div>\\\n<p><span style=\\\"x-evernote:highlighted;background-color:#F6EE96;\\\">For </span><strong><span style=\\\"x-evernote:highlighted;background-color:#F6EE96;\\\">Ubuntu 14.04 and 16.04</span></strong><span style=\\\"x-evernote:highlighted;background-color:#F6EE96;\\\"> users, please install from PPA:</span></p><span style=\\\"x-evernote:highlighted;background-color:#F6EE96;\\\">\\\n</span><div><pre><span style=\\\"x-evernote:highlighted;background-color:#F6EE96;\\\">sudo apt-get install software-properties-common -y\\\nsudo add-apt-repository ppa:max-c-lv/shadowsocks-libev\\\nsudo apt-get update\\\nsudo apt install shadowsocks-libev</span></pre></div>\\\n<h4>Build deb package from source</h4>\\\n<p>Supported distributions:</p>\\\n<ul>\\\n<li>Debian 8, 9 or higher</li>\\\n<li>Ubuntu 14.04 LTS, 16.04 LTS, 16.10 or higher</li>\\\n</ul>\\\n<p>You can build shadowsocks-libev and all its dependencies by script:</p>\\\n<div><pre>mkdir -p ~/build-area/\\\ncp ./scripts/build_deb.sh ~/build-area/\\\ncd ~/build-area\\\n./build_deb.sh</pre></div>\\\n<p>For older systems, building <code>.deb</code> packages is not supported.\\\nPlease try to build and install directly from source. See the <a href=\\\"https://github.com/shadowsocks/shadowsocks-libev#linux\\\" target=\\\"_blank\\\">Linux</a> section below.</p>\\\n<p><strong>Note for Debian 8 (Jessie) users to build their own deb packages</strong>:</p>\\\n<p>We strongly encourage you to install shadowsocks-libev from <code>jessie-backports-sloppy</code>. If you insist on building from source, you will need to manually install libsodium from <code>jessie-backports-sloppy</code>, <strong>NOT</strong> libsodium in main repository.</p>\\\n<p>For more info about backports, you can refer <a href=\\\"https://backports.debian.org/\\\" target=\\\"_blank\\\">Debian Backports</a>.</p>\\\n<div><pre>cd shadowsocks-libev\\\nsudo sh -c 'printf &quot;deb http://deb.debian.org/debian jessie-backports main&quot; &gt; /etc/apt/sources.list.d/jessie-backports.list'\\\nsudo sh -c 'printf &quot;deb http://deb.debian.org/debian jessie-backports-sloppy main&quot; &gt;&gt; /etc/apt/sources.list.d/jessie-backports.list'\\\nsudo apt-get install --no-install-recommends devscripts equivs\\\nmk-build-deps --root-cmd sudo --install --tool &quot;apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y&quot;\\\n./autogen.sh &amp;&amp; dpkg-buildpackage -b -us -uc\\\ncd ..\\\nsudo dpkg -i shadowsocks-libev*.deb</pre></div>\\\n<p><strong>Note for Debian 9 (Stretch) users to build their own deb packages</strong>:</p>\\\n<p>We strongly encourage you to install shadowsocks-libev from <code>stretch-backports</code>. If you insist on building from source, you will need to manually install libsodium from <code>stretch-backports</code>, <strong>NOT</strong> libsodium in main repository.</p>\\\n<p>For more info about backports, you can refer <a href=\\\"https://backports.debian.org/\\\" target=\\\"_blank\\\">Debian Backports</a>.</p>\\\n<div><pre>cd shadowsocks-libev\\\nsudo sh -c 'printf &quot;deb http://deb.debian.org/debian stretch-backports main&quot; &gt; /etc/apt/sources.list.d/stretch-backports.list'\\\nsudo apt-get install --no-install-recommends devscripts equivs\\\nmk-build-deps --root-cmd sudo --install --tool &quot;apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y&quot;\\\n./autogen.sh &amp;&amp; dpkg-buildpackage -b -us -uc\\\ncd ..\\\nsudo dpkg -i shadowsocks-libev*.deb</pre></div>\\\n<h4><span style=\\\"x-evernote:highlighted;background-color:#F6EE96;\\\">Configure and start the service</span></h4><span style=\\\"x-evernote:highlighted;background-color:#F6EE96;\\\">\\\n</span><pre><code><span style=\\\"x-evernote:highlighted;background-color:#F6EE96;\\\"># Edit the configuration file\\\nsudo vim /etc/shadowsocks-libev/config.json\\\n\\\n# Edit the default configuration for debian\\\nsudo vim /etc/default/shadowsocks-libev\\\n\\\n# Start the service\\\nsudo /etc/init.d/shadowsocks-libev start    # for sysvinit, or\\\nsudo systemctl start shadowsocks-libev      # for systemd</span>\\\n</code></pre>\\\n<h3>Fedora &amp; RHEL</h3>\\\n<p>Supported distributions:</p>\\\n<ul>\\\n<li>Recent Fedora versions (until EOL)</li>\\\n<li>RHEL 6, 7 and derivatives (including CentOS, Scientific Linux)</li>\\\n</ul>\\\n<h4>Build from source with centos</h4>\\\n<p>If you are using CentOS 7, you need to install these prequirement to build from source code:</p>\\\n<div><pre>yum install epel-release -y\\\nyum install gcc gettext autoconf libtool automake make pcre-devel asciidoc xmlto c-ares-devel libev-devel libsodium-devel mbedtls-devel -y</pre></div>\\\n<h4>Install from repository</h4>\\\n<p>Enable repo via <code>dnf</code>:</p>\\\n<pre><code>su -c 'dnf copr enable librehat/shadowsocks'\\\n</code></pre>\\\n<p>Or download yum repo on <a href=\\\"https://copr.fedoraproject.org/coprs/librehat/shadowsocks/\\\" target=\\\"_blank\\\">Fedora Copr</a> and put it inside <code>/etc/yum.repos.d/</code>. The release <code>Epel</code> is for RHEL and its derivatives.</p>\\\n<p>Then, install <code>shadowsocks-libev</code> via <code>dnf</code>:</p>\\\n<div><pre>su -c 'dnf update'\\\nsu -c 'dnf install shadowsocks-libev'</pre></div>\\\n<p>or <code>yum</code>:</p>\\\n<div><pre>su -c 'yum update'\\\nsu -c 'yum install shadowsocks-libev'</pre></div>\\\n<p>The repository is maintained by <a href=\\\"https://github.com/librehat\\\" target=\\\"_blank\\\">@librehat</a>, any issues, please report <a href=\\\"https://github.com/librehat/shadowsocks-libev/issues\\\" target=\\\"_blank\\\">here</a></p>\\\n<h3>Archlinux</h3>\\\n<div><pre>sudo pacman -S shadowsocks-libev</pre></div>\\\n<p>Please refer to downstream <a href=\\\"https://projects.archlinux.org/svntogit/community.git/tree/trunk?h=packages/shadowsocks-libev\\\" target=\\\"_blank\\\">PKGBUILD</a>\\\nscript for extra modifications and distribution-specific bugs.</p>\\\n<h3>NixOS</h3>\\\n<div><pre>nix-env -iA nixos.shadowsocks-libev</pre></div>\\\n<h3>Nix</h3>\\\n<div><pre>nix-env -iA nixpkgs.shadowsocks-libev</pre></div>\\\n<h3>Linux</h3>\\\n<p>In general, you need the following build dependencies:</p>\\\n<ul>\\\n<li><span style=\\\"x-evernote:highlighted;background-color:#F6EE96;\\\">autotools (autoconf, automake, libtool)</span></li><span style=\\\"x-evernote:highlighted;background-color:#F6EE96;\\\">\\\n</span><li><span style=\\\"x-evernote:highlighted;background-color:#F6EE96;\\\">gettext</span></li><span style=\\\"x-evernote:highlighted;background-color:#F6EE96;\\\">\\\n</span><li><span style=\\\"x-evernote:highlighted;background-color:#F6EE96;\\\">pkg-config</span></li><span style=\\\"x-evernote:highlighted;background-color:#F6EE96;\\\">\\\n</span><li><span style=\\\"x-evernote:highlighted;background-color:#F6EE96;\\\">libmbedtls</span></li><span style=\\\"x-evernote:highlighted;background-color:#F6EE96;\\\">\\\n</span><li><span style=\\\"x-evernote:highlighted;background-color:#F6EE96;\\\">libsodium</span></li><span style=\\\"x-evernote:highlighted;background-color:#F6EE96;\\\">\\\n</span><li><span style=\\\"x-evernote:highlighted;background-color:#F6EE96;\\\">libpcre3 (old pcre library)</span></li><span style=\\\"x-evernote:highlighted;background-color:#F6EE96;\\\">\\\n</span><li><span style=\\\"x-evernote:highlighted;background-color:#F6EE96;\\\">libev</span></li><span style=\\\"x-evernote:highlighted;background-color:#F6EE96;\\\">\\\n</span><li><span style=\\\"x-evernote:highlighted;background-color:#F6EE96;\\\">libc-ares</span></li><span style=\\\"x-evernote:highlighted;background-color:#F6EE96;\\\">\\\n</span><li><span style=\\\"x-evernote:highlighted;background-color:#F6EE96;\\\">asciidoc (for documentation only)</span></li><span style=\\\"x-evernote:highlighted;background-color:#F6EE96;\\\">\\\n</span><li><span style=\\\"x-evernote:highlighted;background-color:#F6EE96;\\\">xmlto (for documentation only)</span></li>\\\n</ul>\\\n<p>Notes: Fedora 26  libsodium version &gt;= 1.0.12, so you can install via dnf install libsodium instead build from source.</p>\\\n<p>If your system is too old to provide libmbedtls and libsodium (later than <strong>v1.0.8</strong>), you will need to either install those libraries manually or upgrade your system.</p>\\\n<p>If your system provides with those libraries, you <strong>should not</strong> install them from source. You should jump this section and install them from distribution repository instead.</p>\\\n<p>For some of the distributions, you might install build dependencies like this:</p>\\\n<div><pre># Installation of basic build dependencies\\\n## Debian / Ubuntu\\\nsudo apt-get install --no-install-recommends gettext build-essential autoconf libtool libpcre3-dev asciidoc xmlto libev-dev libc-ares-dev automake libmbedtls-dev libsodium-dev\\\n## CentOS / Fedora / RHEL\\\nsudo yum install gettext gcc autoconf libtool automake make asciidoc xmlto c-ares-devel libev-devel\\\n## Arch\\\nsudo pacman -S gettext gcc autoconf libtool automake make asciidoc xmlto c-ares libev\\\n\\\n# Installation of Libsodium\\\nexport LIBSODIUM_VER=1.0.13\\\nwget https://download.libsodium.org/libsodium/releases/libsodium-$LIBSODIUM_VER.tar.gz\\\ntar xvf libsodium-$LIBSODIUM_VER.tar.gz\\\npushd libsodium-$LIBSODIUM_VER\\\n./configure --prefix=/usr &amp;&amp; make\\\nsudo make install\\\npopd\\\nsudo ldconfig\\\n\\\n# Installation of MbedTLS\\\nexport MBEDTLS_VER=2.6.0\\\nwget https://tls.mbed.org/download/mbedtls-$MBEDTLS_VER-gpl.tgz\\\ntar xvf mbedtls-$MBEDTLS_VER-gpl.tgz\\\npushd mbedtls-$MBEDTLS_VER\\\nmake SHARED=1 CFLAGS=-fPIC\\\nsudo make DESTDIR=/usr install\\\npopd\\\nsudo ldconfig\\\n\\\n# Start building\\\n./autogen.sh &amp;&amp; ./configure &amp;&amp; make\\\nsudo make install</pre></div>\\\n<p>You may need to manually install missing softwares.</p>\\\n<h3>FreeBSD</h3>\\\n<div><pre>su\\\ncd /usr/ports/net/shadowsocks-libev\\\nmake install</pre></div>\\\n<p>Edit your config.json file. By default, it's located in /usr/local/etc/shadowsocks-libev.</p>\\\n<p>To enable shadowsocks-libev, add the following rc variable to your /etc/rc.conf file:</p>\\\n<pre><code>shadowsocks_libev_enable=&quot;YES&quot;\\\n</code></pre>\\\n<p>Start the Shadowsocks server:</p>\\\n<div><pre>service shadowsocks_libev start</pre></div>\\\n<h3>OpenWRT</h3>\\\n<p><span style=\\\"x-evernote:highlighted;background-color:#F6EE96;\\\">The OpenWRT project is maintained here:\\\n</span><a href=\\\"https://github.com/shadowsocks/openwrt-shadowsocks\\\" target=\\\"_blank\\\"><span style=\\\"x-evernote:highlighted;background-color:#F6EE96;\\\">openwrt-shadowsocks</span></a><span style=\\\"x-evernote:highlighted;background-color:#F6EE96;\\\">.</span></p><span style=\\\"x-evernote:highlighted;background-color:#F6EE96;\\\">\\\n</span><h3><span style=\\\"x-evernote:highlighted;background-color:#F6EE96;\\\"></span>OS X</h3>\\\n<p>For OS X, use <a href=\\\"http://brew.sh/\\\" target=\\\"_blank\\\">Homebrew</a> to install or build.</p>\\\n<p>Install Homebrew:</p>\\\n<div><pre>ruby -e &quot;$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)&quot;</pre></div>\\\n<p>Install shadowsocks-libev:</p>\\\n<div><pre>brew install shadowsocks-libev</pre></div>\\\n<h2>Usage</h2>\\\n<p>For a detailed and complete list of all supported arguments,\\\nyou may refer to the man pages of the applications, respectively.</p>\\\n<pre><code>    ss-[local|<span style=\\\"x-evernote:highlighted;background-color:#F6EE96;\\\">redir</span>|server|tunnel|manager]\\\n\\\n       -s &lt;server_host&gt;           host name or ip address of your remote server\\\n\\\n       -p &lt;server_port&gt;           port number of your remote server\\\n\\\n       -l &lt;local_port&gt;            port number of your local server\\\n\\\n       -k &lt;password&gt;              password of your remote server\\\n\\\n       -m &lt;encrypt_method&gt;        Encrypt method: rc4-md5,\\\n                                  aes-128-gcm, aes-192-gcm, aes-256-gcm,\\\n                                  aes-128-cfb, aes-192-cfb, aes-256-cfb,\\\n                                  aes-128-ctr, aes-192-ctr, aes-256-ctr,\\\n                                  camellia-128-cfb, camellia-192-cfb,\\\n                                  camellia-256-cfb, bf-cfb,\\\n                                  chacha20-poly1305, chacha20-ietf-poly1305\\\n                                  salsa20, chacha20 and chacha20-ietf.\\\n\\\n       [-f &lt;pid_file&gt;]            the file path to store pid\\\n\\\n       [-t &lt;timeout&gt;]             socket timeout in seconds\\\n\\\n       [-c &lt;config_file&gt;]         the path to config file\\\n\\\n       [-i &lt;interface&gt;]           network interface to bind,\\\n                                  not available in redir mode\\\n\\\n       [-b &lt;local_address&gt;]       local address to bind\\\n\\\n       [-u]                       enable udprelay mode,\\\n                                  TPROXY is required in redir mode\\\n\\\n       [-U]                       enable UDP relay and disable TCP relay,\\\n                                  not available in local mode\\\n\\\n       [-L &lt;addr&gt;:&lt;port&gt;]         specify destination server address and port\\\n                                  for local port forwarding,\\\n                                  only available in tunnel mode\\\n\\\n       [-d &lt;addr&gt;]                setup name servers for internal DNS resolver,\\\n                                  only available in server mode\\\n\\\n       [--fast-open]              enable TCP fast open,\\\n                                  only available in local and server mode,\\\n                                  with Linux kernel &gt; 3.7.0\\\n\\\n       [--acl &lt;acl_file&gt;]         config file of ACL (Access Control List)\\\n                                  only available in local and server mode\\\n\\\n       [--manager-address &lt;addr&gt;] UNIX domain socket address\\\n                                  only available in server and manager mode\\\n\\\n       [--executable &lt;path&gt;]      path to the executable of ss-server\\\n                                  only available in manager mode\\\n\\\n       [--plugin &lt;name&gt;]          Enable SIP003 plugin. (Experimental)\\\n       [--plugin-opts &lt;options&gt;]  Set SIP003 plugin options. (Experimental)\\\n\\\n       [-v]                       verbose mode\\\n\\\nnotes:\\\n\\\n    ss-redir provides a transparent proxy function and only works on the\\\n    Linux platform with iptables.\\\n\\\n</code></pre>\\\n<h2>Advanced usage</h2>\\\n<p><span style=\\\"x-evernote:highlighted;background-color:#F6EE96;\\\">The latest shadowsocks-libev has provided a </span><em><span style=\\\"x-evernote:highlighted;background-color:#F6EE96;\\\">redir</span></em><span style=\\\"x-evernote:highlighted;background-color:#F6EE96;\\\"> mode. You can configure your Linux-based box or router to proxy all TCP traffic transparently.</span></p>\\\n<pre><code># Create new chain\\\nroot@Wrt:~# iptables -t nat -N SHADOWSOCKS\\\nroot@Wrt:~# iptables -t mangle -N SHADOWSOCKS\\\n\\\n# Ignore your shadowsocks server's addresses\\\n# It's very IMPORTANT, just be careful.\\\nroot@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 123.123.123.123 -j RETURN\\\n\\\n# Ignore LANs and any other addresses you'd like to bypass the proxy\\\n# See Wikipedia and RFC5735 for full list of reserved networks.\\\n# See ashi009/bestroutetb for a highly optimized CHN route list.\\\nroot@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 0.0.0.0/8 -j RETURN\\\nroot@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 10.0.0.0/8 -j RETURN\\\nroot@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 127.0.0.0/8 -j RETURN\\\nroot@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 169.254.0.0/16 -j RETURN\\\nroot@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 172.16.0.0/12 -j RETURN\\\nroot@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 192.168.0.0/16 -j RETURN\\\nroot@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 224.0.0.0/4 -j RETURN\\\nroot@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 240.0.0.0/4 -j RETURN\\\n\\\n# Anything else should be redirected to shadowsocks's local port\\\nroot@Wrt:~# iptables -t nat -A SHADOWSOCKS -p tcp -j REDIRECT --to-ports 12345\\\n\\\n# Add any UDP rules\\\nroot@Wrt:~# ip route add local default dev lo table 100\\\nroot@Wrt:~# ip rule add fwmark 1 lookup 100\\\nroot@Wrt:~# iptables -t mangle -A SHADOWSOCKS -p udp --dport 53 -j TPROXY --on-port 12345 --tproxy-mark 0x01/0x01\\\n\\\n# Apply the rules\\\nroot@Wrt:~# iptables -t nat -A PREROUTING -p tcp -j SHADOWSOCKS\\\nroot@Wrt:~# iptables -t mangle -A PREROUTING -j SHADOWSOCKS\\\n\\\n# Start the shadowsocks-redir\\\nroot@Wrt:~# ss-redir -u -c /etc/config/shadowsocks.json -f /var/run/shadowsocks.pid\\\n</code></pre>\\\n<h2>Shadowsocks over KCP</h2>\\\n<p>It's quite easy to use shadowsocks and <a href=\\\"https://github.com/skywind3000/kcp\\\" target=\\\"_blank\\\">KCP</a> together with <a href=\\\"https://github.com/xtaci/kcptun\\\" target=\\\"_blank\\\">kcptun</a>.</p>\\\n<p>The goal of shadowsocks over KCP is to provide a fully configurable, UDP based protocol to improve poor connections, e.g. a high packet loss 3G network.</p>\\\n<h3>Setup your server</h3>\\\n<div><pre>server_linux_amd64 -l :21 -t 127.0.0.1:443 --crypt none --mtu 1200 --nocomp --mode normal --dscp 46 &amp;\\\nss-server -s 0.0.0.0 -p 443 -k passwd -m chacha20 -u</pre></div>\\\n<h3>Setup your client</h3>\\\n<div><pre>client_linux_amd64 -l 127.0.0.1:1090 -r &lt;server_ip&gt;:21 --crypt none --mtu 1200 --nocomp --mode normal --dscp 46 &amp;\\\nss-local -s 127.0.0.1 -p 1090 -k passwd -m chacha20 -l 1080 -b 0.0.0.0 &amp;\\\nss-local -s &lt;server_ip&gt; -p 443 -k passwd -m chacha20 -l 1080 -U -b 0.0.0.0</pre></div>\\\n<h2>Security Tips</h2>\\\n<p>Although shadowsocks-libev can handle thousands of concurrent connections nicely, we still recommend\\\nsetting up your server's firewall rules to limit connections from each user:</p>\\\n<pre><code># Up to 32 connections are enough for normal usage\\\niptables -A INPUT -p tcp --syn --dport ${SHADOWSOCKS_PORT} -m connlimit --connlimit-above 32 -j REJECT --reject-with tcp-reset\\\n</code></pre>\\\n<h2>License</h2>\\\n<pre><code>Copyright: 2013-2015, Clow Windy &lt;clowwindy42@gmail.com&gt;\\\n           2013-2017, Max Lv &lt;max.c.lv@gmail.com&gt;\\\n           2014, Linus Yang &lt;linusyang@gmail.com&gt;\\\n\\\nThis program is free software: you can redistribute it and/or modify\\\nit under the terms of the GNU General Public License as published by\\\nthe Free Software Foundation, either version 3 of the License, or\\\n(at your option) any later version.\\\n\\\nThis program is distributed in the hope that it will be useful,\\\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\\\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\\nGNU General Public License for more details.\\\n\\\nYou should have received a copy of the GNU General Public License\\\nalong with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.\\\n</code></pre>\\\n</div></div></div><br/></div></span>\\\n</div></body></html>\\u0000\"]],\"start1\":0,\"start2\":0,\"length1\":0,\"length2\":22179}]"
metadata_diff: {"new":{"id":"f2c97221f1244c6788d9c6f25cbe3d82","parent_id":"f67288c3a0be4374b5d532b5dcc3aabc","latitude":"0.00000000","longitude":"0.00000000","altitude":"0.0000","author":"","source_url":"","is_todo":0,"todo_due":0,"todo_completed":0,"source":"joplin-desktop","source_application":"net.cozic.joplin-desktop","application_data":"","order":1764348827839,"markup_language":2,"is_shared":0,"share_id":"","conflict_original_id":"","master_key_id":"","user_data":"","deleted_time":0},"deleted":[]}
encryption_cipher_text: 
encryption_applied: 0
updated_time: 2025-11-28T21:04:03.388Z
created_time: 2025-11-28T21:04:03.388Z
type_: 13