{"id":1845,"date":"2022-04-05T13:52:44","date_gmt":"2022-04-05T05:52:44","guid":{"rendered":"https:\/\/dasmz.com\/?p=1845"},"modified":"2022-05-09T14:09:15","modified_gmt":"2022-05-09T06:09:15","slug":"%e6%95%85%e9%9a%9c%e5%a4%84%e7%90%86%ef%bc%8cshadowsocks%e6%9c%8d%e5%8a%a1%e7%ab%af%ef%bc%8c%e5%8a%a0%e5%af%86%e7%ae%97%e6%b3%95%e4%b8%8d%e6%94%af%e6%8c%81-2022-4-5","status":"publish","type":"post","link":"https:\/\/dasmz.com\/?p=1845","title":{"rendered":"\u7f16\u8bd1\u5b89\u88c5Shadowsocks-libev\u670d\u52a1\u7aef\uff0cAEAD\u52a0\u5bc6\u7b97\u6cd5\u652f\u6301 2022-4-5"},"content":{"rendered":"\n<p>\u6bb5\u843d1\u3001\u9700\u6c42\u63cf\u8ff0<\/p>\n\n\n\n<p>\u5728\u670d\u52a1\u5668\u4e0a\u901a\u8fc7apt-get install shadowsocks-libev\u5b89\u88c5\u4e86Shadowsocks\uff0c\u7b97\u6cd5\u8bbe\u7f6e\u4e3aaes-128-gcm\uff0c\u91cd\u542f\u670d\u52a1\u7aef\uff0c\u67e5\u770b\u72b6\u6001\uff0c\u53d1\u73b0<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ERROR: Invalid cipher name: aes-128-gcm, use rc4-md5 instead\n<\/pre>\n\n\n\n<p>\u62a5\u9519\u63d0\u793a\u7684\u610f\u601d\u662f\uff0c\u52a0\u5bc6\u7b97\u6cd5\uff0c\u672c\u7248\u672c\u7684\u670d\u52a1\u7aef\u4e0d\u652f\u6301\uff0c\u7528rc4-md5\u8fd9\u4e2a\u7b80\u5355\u7b97\u6cd5\u4ee3\u66ff\u4e86<\/p>\n\n\n\n<p>\u6bb5\u843d2\u3001\u5206\u6790<\/p>\n\n\n\n<p>\u67e5\u770b\u670d\u52a1\u5668\u7aef\u7684shadowsocks\u7684\u7248\u672c<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">root@c501:\uff5e# ss-server -help\nshadowsocks-libev 2.6.3 with mbed TLS 2.4.2\n\n  maintained by Max Lv &lt;max.c.lv@gmail.com> and Linus Yang &lt;laokongzi@gmail.com>\n\n  usage:\n\n    ss-server\n\n       -s &lt;server_host>           Host name or IP address of your remote server.\n       -p &lt;server_port>           Port number of your remote server.\n       -l &lt;local_port>            Port number of your local server.\n       -k &lt;password>              Password of your remote server.\n       -m &lt;encrypt_method>        Encrypt method: table, rc4, rc4-md5,\n                                  aes-128-cfb, aes-192-cfb, aes-256-cfb,\n                                  aes-128-ctr, aes-192-ctr, aes-256-ctr,\n                                  bf-cfb, camellia-128-cfb, camellia-192-cfb,\n                                  camellia-256-cfb, cast5-cfb, des-cfb,\n                                  idea-cfb, rc2-cfb, seed-cfb, salsa20 and\n                                  chacha20.\n                                  The default cipher is rc4-md5.\n<\/pre>\n\n\n\n<p>\u53ef\u4ee5\u770b\u5230\uff0c\u6211\u8fd9\u53f0\u670d\u52a1\u5668\u4e0a\uff0c\u901a\u8fc7apt-get install shadowsocks-libev\u5b89\u88c5\u7684\u7248\u672c\u662f2.6.3\uff0c\u652f\u6301\u7684\u52a0\u5bc6\u7b97\u6cd5\u4e3a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">rc4, 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, cast5-cfb, des-cfb, idea-cfb, rc2-cfb, seed-cfb, salsa20 and chacha20\n<\/pre>\n\n\n\n<p>\u7b80\u5355\u70b9\u8bf4\uff0c\u5c31\u662f\u6ca1\u6709\u5e26AEAD\u7b97\u6cd5\u7684\u5e93\uff0c \u81ea\u5df1\u7f16\u8bd1\u5b89\u88c5\u4e00\u4e0b\u5c31\u884c<\/p>\n\n\n\n<p>\u6bb5\u843d3\u3001\u9700\u8865\u5145\u5b89\u88c5\u7684Mbed-TLS\u548clibsodium\u4e24\u4e2a\u9879\u76ee\u7684\u4fe1\u606f<\/p>\n\n\n\n<p>libsodium \u9879\u76ee\u5730\u5740 <a href=\"https:\/\/github.com\/jedisct1\/libsodium\" data-type=\"URL\" data-id=\"https:\/\/github.com\/jedisct1\/libsodium\">https:\/\/github.com\/jedisct1\/libsodium<\/a><\/p>\n\n\n\n<p>Mbed-TLS \u9879\u76ee\u5730\u5740 <a href=\"https:\/\/github.com\/Mbed-TLS\/mbedtls\" data-type=\"URL\" data-id=\"https:\/\/github.com\/Mbed-TLS\/mbedtls\">https:\/\/github.com\/Mbed-TLS\/mbedtls<\/a><\/p>\n\n\n\n<p>Shadowsocks-libev \u9879\u76ee\u5730\u5740 <a href=\"https:\/\/github.com\/shadowsocks\/shadowsocks-libev\" data-type=\"URL\" data-id=\"https:\/\/github.com\/shadowsocks\/shadowsocks-libev\">https:\/\/github.com\/shadowsocks\/shadowsocks-libev<\/a><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>\u5199\u8fd9\u7bc7\u6587\u7ae0\u7684\u65f6\u95f4\u662f 2022-4-5 13:59\uff0c\u5f53\u524d\u6700\u65b0\u7684\u7248\u672c <\/p>\n\n\n\n<p>Mbed-TLS 2.28.0\uff0c\u8fd9\u4e2a\u75282.X.X\u7684\u6700\u9ad8\u7248\u672c<\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/Mbed-TLS\/mbedtls\/archive\/refs\/tags\/v2.28.0.tar.gz\">https:\/\/github.com\/Mbed-TLS\/mbedtls\/archive\/refs\/tags\/v2.28.0.tar.gz<\/a><\/p>\n\n\n\n<p>libsodium 1.0.18<\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/jedisct1\/libsodium\/releases\/download\/1.0.18-RELEASE\/libsodium-1.0.18.tar.gz\">https:\/\/github.com\/jedisct1\/libsodium\/releases\/download\/1.0.18-RELEASE\/libsodium-1.0.18.tar.gz<\/a><\/p>\n\n\n\n<p>shadowsocks-libev 3.3.5<\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/shadowsocks\/shadowsocks-libev\/releases\/download\/v3.3.5\/shadowsocks-libev-3.3.5.tar.gz\">https:\/\/github.com\/shadowsocks\/shadowsocks-libev\/releases\/download\/v3.3.5\/shadowsocks-libev-3.3.5.tar.gz<\/a><\/p>\n\n\n\n<p>\u6bb5\u843d4\u3001\u5b9e\u65bd\u90e8\u7f72<\/p>\n\n\n\n<p>\u5b89\u88c5\u5fc5\u8981\u7684\u4f9d\u8d56<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">apt-get update\napt-get install gettext build-essential unzip gzip python3 curl openssl libssl-dev autoconf automake libtool gcc make perl cpio libpcre3 libpcre3-dev zlib1g-dev libev-dev libc-ares-dev<\/pre>\n\n\n\n<p>\u4e0b\u8f7d\u6e90\u4ee3\u7801<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mkdir -p \/root\/src\n\ncd \/root\/src\/\n\n# Mbed-TLS 2.28.0\nwget https:\/\/github.com\/Mbed-TLS\/mbedtls\/archive\/refs\/tags\/v2.28.0.tar.gz\n# libsodium 1.0.18\nwget https:\/\/github.com\/jedisct1\/libsodium\/releases\/download\/1.0.18-RELEASE\/libsodium-1.0.18.tar.gz\n# shadowsocks-libev 3.3.5\nwget https:\/\/github.com\/shadowsocks\/shadowsocks-libev\/releases\/download\/v3.3.5\/shadowsocks-libev-3.3.5.tar.gz\n<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"># \u5b89\u88c5 Mbed-TLS 2.28.0\ncd \/root\/src\ntar -zxf v2.28.0.tar.gz\ncd mbedtls-2.28.0\nmake SHARED=1 CFLAGS=-fPIC\nmake DESTDIR=\/usr install<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"># \u5b89\u88c5 libsodium 1.0.18\ncd \/root\/src\ntar -zxf libsodium-1.0.18.tar.gz\ncd libsodium-1.0.18\n.\/configure --prefix=\/usr &amp;&amp; make &amp;&amp; make install\nldconfig -p\necho '\/usr\/lib' &gt; \/etc\/ld.so.conf.d\/usr_lib.conf\nldconfig<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"># \u5b89\u88c5 shadowsocks-libev 3.3.5\nmkdir -p \/etc\/shadowsocks-libev\ncd \/root\/src\ntar -zxf shadowsocks-libev-3.3.5.tar.gz\ncd shadowsocks-libev-3.3.5\n.\/configure --prefix=\/usr --disable-documentation &amp;&amp; make &amp;&amp; make install<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"># \u914d\u7f6e\u670d\u52a1\uff0c\u4fee\u6539\u914d\u7f6e\u6587\u4ef6\uff0c\u8bbe\u7f6e\u5f00\u673a\u542f\u52a8\n\u521b\u5efa \/etc\/systemd\/system\/shadowsocks-libev.service\n\n[Unit]\nDescription=Shadowsocks-libev Default Server Service\nAfter=network-online.target network-online.target \n\n[Service]\nType=simple\nLimitNOFILE=32768\nExecStart=\/usr\/bin\/ss-server -c \/etc\/shadowsocks-libev\/config.json\nCapabilityBoundingSet=CAP_NET_BIND_SERVICE\n\n[Install]\nWantedBy=multi-user.target<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"># \u670d\u52a1\u7aef\u7684\u4e00\u4e2a\u793a\u4f8b\u914d\u7f6e \/etc\/shadowsocks-libev\/config.json\n{\n    \"server\":[\"[::0]\", \"0.0.0.0\"],\n    \"server_port\":16805,\n    \"local_port\":1080,\n    \"password\":\"P1122330099\",\n    \"timeout\":60,\n    \"method\":\"aes-128-gcm\",\n    \"nameserver\":\"1.1.1.1\",\n    \"mode\":\"tcp_only\",\n    \"ipv6_first\": true\n}<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"># \u5982\u679c\u4e0d\u9700\u8981IPv6\u4f18\u5148\uff0c\u5219\u628a\u5bf9\u5e94\u89c4\u5219\u5220\u9664\u5373\u53ef\n# \u5982\u679c\u4ec5\u9700\u8981IPv4,\u76d1\u542c\u4e3a\"0.0.0.0\"\n# \u5982\u679c\u8981UDP\uff0c\u5219mode\u4e3a tcp_and_udp\n# \u670d\u52a1\u7aef\u7684\u4e00\u4e2a\u793a\u4f8b\u914d\u7f6e \/etc\/shadowsocks-libev\/config.json\n{\n    \"server\":\"0.0.0.0\",\n    \"server_port\":16805,\n    \"local_port\":1080,\n    \"password\":\"P1122330099\",\n    \"timeout\":60,\n    \"method\":\"aes-128-gcm\",\n    \"nameserver\":\"1.1.1.1\",\n    \"mode\":\"tcp_and_udp\"\n}<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"># \u5982\u679c\u4e0d\u9700\u8981IPv6\u4f18\u5148\uff0c\u5219\u628a\u5bf9\u5e94\u89c4\u5219\u5220\u9664\u5373\u53ef\n# \u5982\u679c\u4ec5\u9700\u8981IPv4,\u76d1\u542c\u4e3a\"0.0.0.0\"\n# \u5982\u679c\u8981UDP\uff0c\u5219mode\u4e3a tcp_and_udp\n# \u5982\u679c\u9700\u6c42\u4e3a\uff0c\u56fd\u5185\u670d\u52a1\u5668\u7684\uff0c\u56fd\u5185\u4ee3\u7406\uff0cnameserver\u9700\u4e3a\u56fd\u5185\u7684DNS\u670d\u52a1\u5668\n# \u670d\u52a1\u7aef\u7684\u4e00\u4e2a\u793a\u4f8b\u914d\u7f6e \/etc\/shadowsocks-libev\/config.json\n{\n    \"server\":\"0.0.0.0\",\n    \"server_port\":16805,\n    \"local_port\":1080,\n    \"password\":\"P1122330099\",\n    \"timeout\":60,\n    \"method\":\"aes-128-gcm\",\n    \"nameserver\":\"114.114.114.114\",\n    \"mode\":\"tcp_and_udp\"\n}<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">\u652f\u6301\u7684\u52a0\u5bc6\u7b97\u6cd5<br>Encrypt method: rc4-md5,<br>aes-128-gcm, aes-192-gcm, aes-256-gcm,<br>aes-128-cfb, aes-192-cfb, aes-256-cfb,<br>aes-128-ctr, aes-192-ctr, aes-256-ctr,<br>camellia-128-cfb, camellia-192-cfb,<br>camellia-256-cfb, bf-cfb,<br>chacha20-ietf-poly1305,<br>xchacha20-ietf-poly1305,<br>salsa20, chacha20 and chacha20-ietf.<br>The default cipher is chacha20-ietf-poly1305<\/pre>\n\n\n\n<p><strong>\u9644\u5f551\u3001\u53ef\u80fd\u7684\u62a5\u9519<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">checking whether mbedtls supports Cipher Feedback mode or not\u2026 configure: error: MBEDTLS_CIPHER_MODE_CFB required<\/pre>\n\n\n\n<p>\u8fd9\u4e2a\u62a5\u9519\uff0c\u8bf4\u660embedtls\u6ca1\u6709\u5b89\u88c5\uff0c\u6216\u8005mbedtls \u6ca1\u6709\u7528\u5bf92.X.Y\u7248\u672c<\/p>\n\n\n\n<p><strong>\u9644\u5f552\u3001\u53c2\u8003\u94fe\u63a5<\/strong><br>\u53c2\u8003\u94fe\u63a5 https:\/\/raw.githubusercontent.com\/teddysun\/shadowsocks_install\/master\/shadowsocks-all.sh<br>\u53c2\u8003\u94fe\u63a5 https:\/\/github.com\/shadowsocks\/shadowsocks-libev\/issues\/663<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6bb5\u843d1\u3001\u9700\u6c42\u63cf\u8ff0 \u5728\u670d\u52a1\u5668\u4e0a\u901a\u8fc7apt-get install shadowsocks-libev\u5b89\u88c5\u4e86Sha [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"_links":{"self":[{"href":"https:\/\/dasmz.com\/index.php?rest_route=\/wp\/v2\/posts\/1845"}],"collection":[{"href":"https:\/\/dasmz.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dasmz.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dasmz.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dasmz.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1845"}],"version-history":[{"count":22,"href":"https:\/\/dasmz.com\/index.php?rest_route=\/wp\/v2\/posts\/1845\/revisions"}],"predecessor-version":[{"id":2316,"href":"https:\/\/dasmz.com\/index.php?rest_route=\/wp\/v2\/posts\/1845\/revisions\/2316"}],"wp:attachment":[{"href":"https:\/\/dasmz.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1845"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dasmz.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1845"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dasmz.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1845"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}