{"id":56400,"date":"2025-02-22T12:13:30","date_gmt":"2025-02-22T04:13:30","guid":{"rendered":"https:\/\/fwq.ai\/blog\/56400\/"},"modified":"2025-02-22T12:13:30","modified_gmt":"2025-02-22T04:13:30","slug":"%e6%b7%b1%e5%85%a5%e4%ba%86%e8%a7%a3shadowsocks-rust%ef%bc%9a%e5%ae%89%e8%a3%85%e4%b8%8e%e4%bd%bf%e7%94%a8%e5%85%a8%e6%94%bb%e7%95%a5","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/56400\/","title":{"rendered":"\u6df1\u5165\u4e86\u89e3Shadowsocks-Rust\uff1a\u5b89\u88c5\u4e0e\u4f7f\u7528\u5168\u653b\u7565"},"content":{"rendered":"<h2>\u4ec0\u4e48\u662fShadowsocks-Rust\uff1f<\/h2>\n<p>Shadowsocks-Rust\u662f\u4e00\u4e2a\u9ad8\u6027\u80fd\u7684\u4ee3\u7406\u5de5\u5177\uff0c\u4f7f\u7528Rust\u8bed\u8a00\u7f16\u5199\uff0c\u65e8\u5728\u5b9e\u73b0\u5b89\u5168\u3001\u5feb\u901f\u7684\u7f51\u7edc\u8bbf\u95ee\u3002\u76f8\u6bd4\u4e8e\u5176\u4ed6\u7248\u672c\u7684Shadowsocks\uff0cRust\u7248\u672c\u5177\u6709\u66f4\u597d\u7684\u6027\u80fd\u548c\u7a33\u5b9a\u6027\u3002<\/p>\n<h2>Shadowsocks-Rust\u7684\u4e3b\u8981\u7279\u70b9<\/h2>\n<ul>\n<li><strong>\u9ad8\u6027\u80fd<\/strong>\uff1aRust\u7684\u5e76\u53d1\u6027\u80fd\u548c\u5185\u5b58\u5b89\u5168\u7279\u6027\uff0c\u4f7f\u5f97Shadowsocks-Rust\u5728\u9ad8\u8d1f\u8f7d\u60c5\u51b5\u4e0b\u4f9d\u7136\u80fd\u591f\u4fdd\u6301\u826f\u597d\u7684\u8868\u73b0\u3002<\/li>\n<li><strong>\u8de8\u5e73\u53f0\u652f\u6301<\/strong>\uff1a\u652f\u6301Windows\u3001Linux\u548cmacOS\u7b49\u591a\u79cd\u64cd\u4f5c\u7cfb\u7edf\uff0c\u7528\u6237\u53ef\u6839\u636e\u81ea\u5df1\u7684\u9700\u6c42\u9009\u62e9\u76f8\u5e94\u7684\u7248\u672c\u3002<\/li>\n<li><strong>\u7b80\u6613\u914d\u7f6e<\/strong>\uff1a\u63d0\u4f9b\u7b80\u5355\u660e\u4e86\u7684\u914d\u7f6e\u6587\u4ef6\uff0c\u8ba9\u7528\u6237\u80fd\u591f\u5feb\u901f\u4e0a\u624b\u3002<\/li>\n<li><strong>\u7075\u6d3b\u6027<\/strong>\uff1a\u7528\u6237\u53ef\u4ee5\u6839\u636e\u81ea\u5df1\u7684\u9700\u6c42\u8fdb\u884c\u81ea\u5b9a\u4e49\u8bbe\u7f6e\uff0c\u5305\u62ec\u52a0\u5bc6\u65b9\u5f0f\u3001\u7aef\u53e3\u7b49\u3002<\/li>\n<\/ul>\n<h2>Shadowsocks-Rust\u7684\u5b89\u88c5\u6b65\u9aa4<\/h2>\n<h3>\u5728Linux\u4e0a\u5b89\u88c5Shadowsocks-Rust<\/h3>\n<ol>\n<li>\n<p><strong>\u66f4\u65b0\u7cfb\u7edf<\/strong>\uff1a\u5728\u7ec8\u7aef\u4e2d\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff0c\u786e\u4fdd\u7cfb\u7edf\u4e3a\u6700\u65b0\u7248\u672c\u3002 bash sudo apt update &amp;&amp; sudo apt upgrade<\/p>\n<\/li>\n<li>\n<p><strong>\u5b89\u88c5Rust<\/strong>\uff1a\u4f7f\u7528Rust\u7684\u5b89\u88c5\u5de5\u5177<code>rustup<\/code>\u8fdb\u884c\u5b89\u88c5\u3002 bash curl \u2013proto \u2018=https\u2019 \u2013tlsv1.2 -sSf https:\/\/sh.rustup.rs | sh<\/p>\n<\/li>\n<li>\n<p><strong>\u4e0b\u8f7dShadowsocks-Rust<\/strong>\uff1a\u5728\u7ec8\u7aef\u4e2d\u514b\u9686Shadowsocks-Rust\u7684GitHub\u5e93\u3002 bash git clone https:\/\/github.com\/shadowsocks\/shadowsocks-rust.git cd shadowsocks-rust<\/p>\n<\/li>\n<li>\n<p><strong>\u7f16\u8bd1\u548c\u5b89\u88c5<\/strong>\uff1a\u4f7f\u7528Cargo\u8fdb\u884c\u7f16\u8bd1\u548c\u5b89\u88c5\u3002 bash cargo build \u2013release<\/p>\n<\/li>\n<li>\n<p><strong>\u8fd0\u884cShadowsocks-Rust<\/strong>\uff1a\u8fdb\u5165release\u76ee\u5f55\uff0c\u8fd0\u884c\u7a0b\u5e8f\u3002 bash .\/target\/release\/ssserver -c config.json<\/p>\n<\/li>\n<\/ol>\n<h3>\u5728Windows\u4e0a\u5b89\u88c5Shadowsocks-Rust<\/h3>\n<ol>\n<li><strong>\u5b89\u88c5Rust<\/strong>\uff1a\u8bbf\u95ee\uff0c\u4e0b\u8f7d\u5e76\u8fd0\u884c\u5b89\u88c5\u7a0b\u5e8f\u3002<\/li>\n<li><strong>\u4e0b\u8f7dShadowsocks-Rust<\/strong>\uff1a\u5728GitHub\u4e0a\u4e0b\u8f7d\u9884\u7f16\u8bd1\u7684Windows\u7248\u672c\u3002<\/li>\n<li><strong>\u914d\u7f6e\u7a0b\u5e8f<\/strong>\uff1a\u7f16\u8f91\u914d\u7f6e\u6587\u4ef6<code>config.json<\/code>\uff0c\u6839\u636e\u9700\u8981\u8fdb\u884c\u4fee\u6539\u3002<\/li>\n<li><strong>\u8fd0\u884c\u7a0b\u5e8f<\/strong>\uff1a\u53cc\u51fb\u6267\u884c\u7a0b\u5e8f\uff0c\u542f\u52a8Shadowsocks-Rust\u3002<\/li>\n<\/ol>\n<h2>\u4f7f\u7528Shadowsocks-Rust<\/h2>\n<h3>\u914d\u7f6e\u6587\u4ef6\u8be6\u89e3<\/h3>\n<ul>\n<li><strong>Server<\/strong>\uff1a\u6307\u5b9a\u670d\u52a1\u5668\u5730\u5740\u3002<\/li>\n<li><strong>Port<\/strong>\uff1a\u6307\u5b9a\u670d\u52a1\u5668\u7aef\u53e3\u3002<\/li>\n<li><strong>Password<\/strong>\uff1a\u8bbe\u7f6e\u8fde\u63a5\u7684\u5bc6\u7801\uff0c\u786e\u4fdd\u5b89\u5168\u6027\u3002<\/li>\n<li><strong>Method<\/strong>\uff1a\u52a0\u5bc6\u65b9\u6cd5\uff0c\u5e38\u7528\u7684\u6709<code>aes-256-gcm<\/code>\u7b49\u3002<\/li>\n<\/ul>\n<h3>\u5982\u4f55\u8fde\u63a5\u5230Shadowsocks-Rust<\/h3>\n<ol>\n<li>\u5728\u672c\u5730\u8bbe\u5907\u4e0a\u914d\u7f6e\u76f8\u5e94\u7684\u5ba2\u6237\u7aef\uff0c\u8f93\u5165\u670d\u52a1\u5668\u5730\u5740\u3001\u7aef\u53e3\u3001\u5bc6\u7801\u53ca\u52a0\u5bc6\u65b9\u6cd5\u3002<\/li>\n<li>\u901a\u8fc7\u6d4f\u89c8\u5668\u6216\u5e94\u7528\u8bbf\u95ee\u88ab\u5c4f\u853d\u7684\u7f51\u7ad9\uff0c\u786e\u4fdd\u80fd\u987a\u5229\u3002<\/li>\n<\/ol>\n<h2>Shadowsocks-Rust\u7684\u5e38\u89c1\u95ee\u9898\u89e3\u7b54<\/h2>\n<h3>1. Shadowsocks-Rust\u4e0e\u5176\u4ed6\u4ee3\u7406\u5de5\u5177\u6709\u4ec0\u4e48\u533a\u522b\uff1f<\/h3>\n<p>Shadowsocks-Rust\u76f8\u6bd4\u4e8e\u5176\u4ed6\u4ee3\u7406\u5de5\u5177\uff0c\u5177\u6709\u66f4\u9ad8\u7684\u6027\u80fd\u548c\u66f4\u597d\u7684\u5b89\u5168\u6027\u3002\u540c\u65f6\uff0c\u5b83\u4e5f\u63d0\u4f9b\u4e86\u66f4\u591a\u7684\u7075\u6d3b\u914d\u7f6e\u9009\u9879\uff0c\u9002\u5408\u9ad8\u7ea7\u7528\u6237\u3002<\/p>\n<h3>2. Shadowsocks-Rust\u80fd\u5426\u7ed5\u8fc7\u9632\u706b\u5899\uff1f<\/h3>\n<p>\u662f\u7684\uff0cShadowsocks-Rust\u8bbe\u8ba1\u7684\u521d\u8877\u5c31\u662f\u4e3a\u4e86\u5e2e\u52a9\u7528\u6237\u7ed5\u8fc7\u7f51\u7edc\u5ba1\u67e5\u548c\u9632\u706b\u5899\uff0c\u4f46\u8bf7\u786e\u4fdd\u60a8\u9075\u5faa\u5f53\u5730\u6cd5\u5f8b\u6cd5\u89c4\u3002<\/p>\n<h3>3. \u5982\u4f55\u9009\u62e9\u52a0\u5bc6\u65b9\u6cd5\uff1f<\/h3>\n<p>\u9009\u62e9\u52a0\u5bc6\u65b9\u6cd5\u65f6\uff0c\u5efa\u8bae\u4f7f\u7528<code>aes-256-gcm<\/code>\u7b49\u9ad8\u5b89\u5168\u6027\u7b97\u6cd5\uff0c\u4ee5\u4fdd\u62a4\u60a8\u7684\u6570\u636e\u9690\u79c1\u3002\u540c\u65f6\uff0c\u67d0\u4e9b\u52a0\u5bc6\u65b9\u6cd5\u5728\u7279\u5b9a\u73af\u5883\u4e0b\u7684\u6027\u80fd\u8868\u73b0\u66f4\u4f73\u3002<\/p>\n<h3>4. \u662f\u5426\u652f\u6301\u591a\u7528\u6237\uff1f<\/h3>\n<p>\u662f\u7684\uff0cShadowsocks-Rust\u652f\u6301\u591a\u7528\u6237\u914d\u7f6e\uff0c\u7528\u6237\u53ef\u4ee5\u5728\u914d\u7f6e\u6587\u4ef6\u4e2d\u4e3a\u4e0d\u540c\u7684\u7528\u6237\u8bbe\u7f6e\u4e0d\u540c\u7684\u5bc6\u7801\u548c\u7aef\u53e3\u3002<\/p>\n<h2>\u5c0f\u7ed3<\/h2>\n<p>Shadowsocks-Rust\u4f5c\u4e3a\u4e00\u6b3e\u9ad8\u6548\u7684\u4ee3\u7406\u5de5\u5177\uff0c\u63d0\u4f9b\u4e86\u5feb\u901f\u3001\u5b89\u5168\u7684\u7f51\u7edc\u8bbf\u95ee\u89e3\u51b3\u65b9\u6848\u3002\u901a\u8fc7\u4e0a\u8ff0\u6b65\u9aa4\uff0c\u60a8\u53ef\u4ee5\u8f7b\u677e\u5b89\u88c5\u548c\u4f7f\u7528\u8fd9\u4e00\u5de5\u5177\u3002\u5982\u679c\u60a8\u6709\u5176\u4ed6\u95ee\u9898\uff0c\u8bf7\u968f\u65f6\u67e5\u9605\u5b98\u65b9\u6587\u6863\u6216\u76f8\u5173\u8bba\u575b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4ec0\u4e48\u662fShadowsocks-Rust\uff1f Shadowsocks-Rust\u662f\u4e00\u4e2a\u9ad8\u6027\u80fd\u7684\u4ee3\u7406\u5de5\u5177\uff0c\u4f7f\u7528Rust\u8bed\u8a00\u7f16\u5199\uff0c\u65e8\u5728\u5b9e\u73b0\u5b89\u5168\u3001\u5feb\u901f\u7684\u7f51\u7edc\u8bbf\u95ee\u3002\u76f8\u6bd4\u4e8e\u5176\u4ed6\u7248\u672c\u7684Shadowsocks\uff0cRust\u7248\u672c\u5177\u6709\u66f4\u597d\u7684\u6027\u80fd\u548c\u7a33\u5b9a\u6027\u3002 Shadowsocks-Rust\u7684\u4e3b\u8981\u7279\u70b9 \u9ad8\u6027\u80fd\uff1aRust\u7684\u5e76\u53d1\u6027\u80fd\u548c\u5185\u5b58\u5b89\u5168\u7279\u6027\uff0c\u4f7f\u5f97Shadowsocks-Rust\u5728\u9ad8\u8d1f\u8f7d\u60c5\u51b5\u4e0b\u4f9d\u7136\u80fd\u591f\u4fdd\u6301\u826f\u597d\u7684\u8868\u73b0\u3002 \u8de8\u5e73\u53f0\u652f\u6301\uff1a\u652f\u6301Windows\u3001Linux\u548cmacOS\u7b49\u591a\u79cd\u64cd\u4f5c\u7cfb\u7edf\uff0c\u7528\u6237\u53ef\u6839\u636e\u81ea\u5df1\u7684\u9700\u6c42\u9009\u62e9\u76f8\u5e94\u7684\u7248\u672c\u3002 \u7b80\u6613\u914d\u7f6e\uff1a\u63d0\u4f9b\u7b80\u5355\u660e\u4e86\u7684\u914d\u7f6e\u6587\u4ef6\uff0c\u8ba9\u7528\u6237\u80fd\u591f\u5feb\u901f\u4e0a\u624b\u3002 \u7075\u6d3b\u6027\uff1a\u7528\u6237\u53ef\u4ee5\u6839\u636e\u81ea\u5df1\u7684\u9700\u6c42\u8fdb\u884c\u81ea\u5b9a\u4e49\u8bbe\u7f6e\uff0c\u5305\u62ec\u52a0\u5bc6\u65b9\u5f0f\u3001\u7aef\u53e3\u7b49\u3002 Shadowsocks-Rust\u7684\u5b89\u88c5\u6b65\u9aa4 \u5728Linux\u4e0a\u5b89\u88c5Shadowsocks-Rust \u66f4\u65b0\u7cfb\u7edf\uff1a\u5728\u7ec8\u7aef\u4e2d\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff0c\u786e\u4fdd\u7cfb\u7edf\u4e3a\u6700\u65b0\u7248\u672c\u3002 bash sudo apt update &amp;&amp; sudo apt upgrade \u5b89\u88c5Rust\uff1a\u4f7f\u7528Rust\u7684\u5b89\u88c5\u5de5\u5177rustup\u8fdb\u884c\u5b89\u88c5\u3002 bash curl \u2013proto \u2018=https\u2019 \u2013tlsv1.2 -sSf https:\/\/sh.rustup.rs | sh \u4e0b\u8f7dShadowsocks-Rust\uff1a\u5728\u7ec8\u7aef\u4e2d\u514b\u9686Shadowsocks-Rust\u7684GitHub\u5e93\u3002 bash git clone https:\/\/github.com\/shadowsocks\/shadowsocks-rust.git cd shadowsocks-rust \u7f16\u8bd1\u548c\u5b89\u88c5\uff1a\u4f7f\u7528Cargo\u8fdb\u884c\u7f16\u8bd1\u548c\u5b89\u88c5\u3002 bash cargo build \u2013release \u8fd0\u884cShadowsocks-Rust\uff1a\u8fdb\u5165release\u76ee\u5f55\uff0c\u8fd0\u884c\u7a0b\u5e8f\u3002 bash .\/target\/release\/ssserver -c config.json \u5728Windows\u4e0a\u5b89\u88c5Shadowsocks-Rust \u5b89\u88c5Rust\uff1a\u8bbf\u95ee\uff0c\u4e0b\u8f7d\u5e76\u8fd0\u884c\u5b89\u88c5\u7a0b\u5e8f\u3002 \u4e0b\u8f7dShadowsocks-Rust\uff1a\u5728GitHub\u4e0a\u4e0b\u8f7d\u9884\u7f16\u8bd1\u7684Windows\u7248\u672c\u3002 \u914d\u7f6e\u7a0b\u5e8f\uff1a\u7f16\u8f91\u914d\u7f6e\u6587\u4ef6config.json\uff0c\u6839\u636e\u9700\u8981\u8fdb\u884c\u4fee\u6539\u3002 \u8fd0\u884c\u7a0b\u5e8f\uff1a\u53cc\u51fb\u6267\u884c\u7a0b\u5e8f\uff0c\u542f\u52a8Shadowsocks-Rust\u3002 \u4f7f\u7528Shadowsocks-Rust \u914d\u7f6e\u6587\u4ef6\u8be6\u89e3 Server\uff1a\u6307\u5b9a\u670d\u52a1\u5668\u5730\u5740\u3002 Port\uff1a\u6307\u5b9a\u670d\u52a1\u5668\u7aef\u53e3\u3002 Password\uff1a\u8bbe\u7f6e\u8fde\u63a5\u7684\u5bc6\u7801\uff0c\u786e\u4fdd\u5b89\u5168\u6027\u3002 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21],"tags":[],"class_list":["post-56400","post","type-post","status-publish","format-standard","hentry","category-vpn"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/56400","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=56400"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/56400\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=56400"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=56400"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=56400"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}