{"id":315,"date":"2025-09-05T17:17:39","date_gmt":"2025-09-05T10:17:39","guid":{"rendered":"https:\/\/byso.top\/?p=315"},"modified":"2025-10-21T00:02:44","modified_gmt":"2025-10-20T17:02:44","slug":"%e5%ae%89%e8%a3%85shadowsocks-rust%e7%89%88","status":"publish","type":"post","link":"https:\/\/byso.top\/?p=315","title":{"rendered":"\u5b89\u88c5shadowsocks-rust\u7248"},"content":{"rendered":"\n<p>apt -y update &amp;&amp; apt -y upgrade<\/p>\n\n\n\n<p><strong># \u793a\u4f8b\u547d\u4ee4\uff0c\u8bf7\u52a1\u5fc5\u66ff\u6362\u4e3a\u6700\u65b0\u7684 URL\uff01 <\/strong><\/p>\n\n\n\n<p>wget  <a href=\"https:\/\/github.com\/shadowsocks\/shadowsocks-rust\/releases\/download\/v1.23.5\/shadowsocks-v1.23.5.x86_64-unknown-linux-gnu.tar.xz\">https:\/\/github.com\/shadowsocks\/shadowsocks-rust\/releases\/download\/v1.23.5\/shadowsocks-v1.23.5.x86_64-unknown-linux-gnu.tar.xz<\/a><\/p>\n\n\n\n<p><strong>#\u89e3\u538b\u4e0b\u8f7d\u7684\u6587\u4ef6 <\/strong><\/p>\n\n\n\n<p>tar -xf shadowsocks-v*.tar.xz<\/p>\n\n\n\n<p><strong># \u5c06 ssserver \u4ee5\u53ca\u5176\u4ed6\u6709\u7528\u7684\u5de5\u5177\uff08\u5982 sslocal, ssurl\uff09\u79fb\u52a8\u5230 \/usr\/local\/bin <\/strong><\/p>\n\n\n\n<p>mv ssserver sslocal ssurl \/usr\/local\/bin\/<\/p>\n\n\n\n<p>mkdir \/etc\/shadowsocks-rust<\/p>\n\n\n\n<p>vim \/etc\/shadowsocks-rust\/config.json<\/p>\n\n\n\n<p><strong>#\u5c06\u4e0b\u9762\u7684 JSON \u5185\u5bb9\u7c98\u8d34\u5230\u6587\u4ef6\u4e2d<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n    \"server\": \"::\",\n    \"server_port\": 8388,\n    \"password\": \"your_very_strong_password\",\n    \"method\": \"aes-256-gcm\",\n    \"mode\": \"tcp_and_udp\"\n}<\/code><\/pre>\n\n\n\n<p>#<strong>\u8bf7\u52a1\u5fc5\u4fee\u6539\uff1a<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>&#8220;server&#8221;:&nbsp;&#8220;::&#8221;&nbsp;\u662f\u4e00\u4e2a\u63a8\u8350\u7684\u8bbe\u7f6e\uff0c\u5b83\u4f1a\u540c\u65f6\u76d1\u542c IPv4 \u548c IPv6 \u5730\u5740\u3002\u5982\u679c\u60a8\u786e\u5b9a\u53ea\u9700\u8981 IPv4\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528&nbsp;&#8220;0.0.0.0&#8221;\u3002<\/li>\n\n\n\n<li>&#8220;server_port&#8221;: \u60a8\u53ef\u4ee5\u4fdd\u6301&nbsp;8388&nbsp;\u6216\u66f4\u6539\u4e3a\u60a8\u559c\u6b22\u7684\u4efb\u4f55\u6709\u6548\u7aef\u53e3\u3002<\/li>\n\n\n\n<li>&#8220;password&#8221;:&nbsp;<strong>\u8fd9\u662f\u6700\u91cd\u8981\u7684\uff01\u8bf7\u52a1\u5fc5\u5c06\u5176\u66ff\u6362\u4e3a\u60a8\u81ea\u5df1\u751f\u6210\u7684\u3001\u8db3\u591f\u5f3a\u5927\u7684\u5bc6\u7801\u3002<\/strong><\/li>\n\n\n\n<li>&#8220;method&#8221;:&nbsp;aes-256-gcm&nbsp;\u662f\u76ee\u524d\u517c\u5177\u5b89\u5168\u548c\u6027\u80fd\u7684\u7edd\u4f73\u9009\u62e9\u3002\u5176\u4ed6\u63a8\u8350\u7684\u9009\u9879\u5305\u62ec&nbsp;chacha20-ietf-poly1305\u3002<\/li>\n\n\n\n<li>&#8220;mode&#8221;:&nbsp;&#8220;tcp_and_udp&#8221;&nbsp;\u786e\u4fdd\u540c\u65f6\u652f\u6301 TCP \u548c UDP \u6d41\u91cf\u3002<\/li>\n<\/ul>\n\n\n\n<p>#<strong>\u7f16\u8f91\u5b8c\u6210\u540e\uff0c\u4fdd\u5b58\u5e76\u9000\u51fa\uff08\u5728&nbsp;nano&nbsp;\u4e2d\u6309&nbsp;Ctrl + X\uff0c\u7136\u540e\u6309&nbsp;Y\uff0c\u518d\u6309&nbsp;Enter\uff09\u3002<\/strong><\/p>\n\n\n\n<p>vim \/etc\/systemd\/system\/shadowsocks-rust.service<\/p>\n\n\n\n<p><strong>#\u5c06\u4ee5\u4e0b\u5185\u5bb9\u590d\u5236\u5e76\u7c98\u8d34\u5230\u6587\u4ef6\u4e2d<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;Unit]\nDescription=shadowsocks-rust server\nAfter=network.target\n\n&#91;Service]\nExecStart=\/usr\/local\/bin\/ssserver -c \/etc\/shadowsocks-rust\/config.json\nRestart=on-failure\nUser=root\n\n&#91;Install]\nWantedBy=multi-user.target<\/code><\/pre>\n\n\n\n<p><strong># \u91cd\u65b0\u52a0\u8f7d systemd \u914d\u7f6e\uff0c\u4f7f\u5176\u8bc6\u522b\u65b0\u670d\u52a1 <\/strong><\/p>\n\n\n\n<p>systemctl daemon-reload<\/p>\n\n\n\n<p><strong># \u7acb\u5373\u542f\u52a8 shadowsocks-rust \u670d\u52a1 <\/strong><\/p>\n\n\n\n<p>systemctl start shadowsocks-rust<\/p>\n\n\n\n<p><strong># \u5c06\u670d\u52a1\u8bbe\u7f6e\u4e3a\u5f00\u673a\u81ea\u542f <\/strong><\/p>\n\n\n\n<p>systemctl enable shadowsocks-rust<\/p>\n\n\n\n<p><strong>#\u68c0\u67e5\u670d\u52a1\u72b6\u6001<\/strong><\/p>\n\n\n\n<p>systemctl status shadowsocks-rust<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>apt -y update &amp;&amp; apt -y upgrade # \u793a\u4f8b\u547d\u4ee4\uff0c\u8bf7\u52a1\u5fc5\u66ff\u6362\u4e3a\u6700\u65b0 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-315","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/byso.top\/index.php?rest_route=\/wp\/v2\/posts\/315","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/byso.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/byso.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/byso.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/byso.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=315"}],"version-history":[{"count":5,"href":"https:\/\/byso.top\/index.php?rest_route=\/wp\/v2\/posts\/315\/revisions"}],"predecessor-version":[{"id":333,"href":"https:\/\/byso.top\/index.php?rest_route=\/wp\/v2\/posts\/315\/revisions\/333"}],"wp:attachment":[{"href":"https:\/\/byso.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=315"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/byso.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=315"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/byso.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=315"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}