{"id":80,"date":"2018-03-10T13:21:28","date_gmt":"2018-03-10T05:21:28","guid":{"rendered":"http:\/\/sirokuma.cc\/?p=80"},"modified":"2018-06-18T17:10:06","modified_gmt":"2018-06-18T09:10:06","slug":"%e7%bf%bb%e6%bb%9a%e5%90%a7%ef%bc%81%e5%a2%99","status":"publish","type":"post","link":"https:\/\/sirokuma.cc\/?p=80","title":{"rendered":"\u7ffb\u6eda\u5427\uff01\u5899"},"content":{"rendered":"<p>\u6709\u4e86VPS\uff0c\u5c31\u6765\u5230\u4e86\u521d\u5fc3SS\u3010<a href=\"https:\/\/shadowsocks.org\/en\/download\/clients.html\">shadowsocks<\/a>\u3011,\u5b83\u6709\u591a\u5e73\u53f0\u7684\u53d1\u884c\u7248\uff0c\u751a\u81f3\u6709\u8def\u7531\u5668\u4e0a\u7684mini linux\u4e0a\u8fd0\u884c\u7684\u7248\u672c\uff0c\u8fd9\u6837\u53ea\u8981\u8fde\u4e0a\u8def\u7531\u5668\u4fbf\u53ef\u7545\u901a\u65e0\u963b\u4e86\u3002\u867d\u7136\u5b98\u7f51\u4e0a\u53ea\u6709<a href=\"https:\/\/baike.baidu.com\/item\/openWRT\/3528947?fr=aladdin\">OpenWrt<\/a>\u7684\u53d1\u884c\u7248\uff0c\u5b9e\u9645\u4e0a\u5927\u591a\u6570\u540c\u7ea7\u7684\u7cfb\u7edf\u4e0a\u90fd\u6709\u76f8\u5173\u5e94\u7528\uff0c\u4e0d\u8fc7OpenWrt\u4e0a\u5f53\u524d\u6700\u65b0\u7684SS\u4e2dspec\u7248\u672c\u7684\u52a0\u5bc6\u65b9\u5f0f\u5e76\u4e0d\u5168\uff0c\u6bd4\u5982\u6ca1\u6709\u4efb\u4f55poly-1305\u7684\u5b57\u773c\u5df2\u7ecf\uff0c\u4f46\u5b8c\u6574\u6ca1\u6709luci\u754c\u9762\u7684\u6ca1\u6709\u8bd5\u8fc7\u3002<\/p>\n<p>\u7f51\u4e0a\u5df2\u7ecf\u6709\u5f88\u591aSS\u642d\u5efa\u6559\u7a0b\u4e86\uff1a\uff08\u4e5f\u6709\u4e00\u952e\u5b89\u88c5\u7684\uff0c\u4ee5\u4e0b\u4e3a\u4e00\u4e2a\u4f8b\u5b50\uff09<\/p>\n<p>\u5f00\u59cb\u642d\u5efa\u4f60\u7684shadowsocks<\/p>\n<p>\u5148\u8f93\u5165<code>apt-get install build-essential<\/code><\/p>\n<p>\u7136\u540e<code>apt-get install python-pip<\/code>\uff0c\u628apip\u7ed9\u88c5\u4e0a<\/p>\n<p>\u7136\u540e\u4f60\u5c31\u53ef\u4ee5\u8f93\u5165<code>pip install shadowsocks<\/code>\uff0c\u4ece\u800c\u5b89\u88c5shadowsocks<\/p>\n<p>\u5982\u6709\u95ee\u9898\u53ef\u4ee5Google or Baidu\uff0c\u6216\u8005\u63d0\u95ee<\/p>\n<p>\u7136\u540e\u4f60\u9700\u8981\u505ashadowsocks\u7684\u914d\u7f6e<\/p>\n<p>\u8f93\u5165<code>vi \/etc\/shadowsocks.json<\/code>\uff0c\u7528vi\u65b0\u5efa\u4e00\u4e2ass\u7684\u914d\u7f6e<\/p>\n<p>&nbsp;<\/p>\n<p>vi\u7684\u4f7f\u7528\uff1a\u7528\u4e0a\u4e0b\u5de6\u53f3\uff08\u6216\u8005kjhl\uff09\u79fb\u52a8\u5149\u6807\uff0c\u6309i\u8fdb\u5165insert\u6a21\u5f0f\u4ece\u5f53\u524d\u5149\u6807\u5f00\u59cb\u8f93\u5165\uff0c\u9700\u8981\u79fb\u52a8\u5149\u6807\u7684\u65f6\u5019\u5c31\u6309ctrl+[\u8fdb\u5165\u5149\u6807\u79fb\u52a8\u6a21\u5f0f\uff0c\u5220\u9664\u5355\u4e2a\u5b57\u7b26\u53ef\u4ee5\u7528del\u6216\u8005\u5149\u6807\u79fb\u52a8\u6a21\u5f0f\u4e0b\u7684x\u952e\uff0c\u8fde\u63092\u6b21d\u5220\u9664\u4e00\u884c\uff0cu\u64a4\u9500\u4e0a\u6b21\u52a8\u4f5c]\uff08\u539f\u6587\u8fd9\u4e2a\u6211\u8bd5\u4e86\u4e0d\u592a\u597d\u4f7f- -\u67e5\u9605\u4e86\u76f8\u5173\u8d44\u6599<a href=\"https:\/\/www.cnblogs.com\/cy163\/archive\/2008\/09\/23\/1296802.html\">Linux vi \u4e2d\u79fb\u52a8\u5149\u6807 \u547d\u4ee4<\/a>\uff09\u53e6\u5916\u4e00\u4e9b\u8f93\u5165\u4e5f\u4f1a\u5f55\u5165backspace(\u5220\u9664\u952e)\u4f7f\u7528Ctrl+backspace\u53ef\u4ee5\u5b8c\u6210\u5220\u9664\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u8f93\u5165\u5982\u4e0b\u5185\u5bb9[\u6ce8\u610f\uff1a\u8fd9\u5e76\u4e0d\u662f\u6700\u7ec8\u7684\u914d\u7f6e\uff0c\u8fd9\u662f\u6700\u57fa\u672c\u7684\u914d\u7f6e\u7684\u4e00\u4e2a\u4f8b\u5b50\uff0c\u770b\u770b\u5c31\u597d]<\/p>\n<p><code>{<\/code><\/p>\n<p><code>\"server\":\"::\", #\u5b9e\u73b0ipv6\u8bbf\u95ee\u53ef\u80fd<\/code><\/p>\n<p><code>\"server_port\": 1234,#\u5f00\u653e\u7684\u7aef\u53e3<\/code><\/p>\n<p><code>\"local_port\": 1080,#linux\u672c\u5730\u5904\u7406\u7aef\u53e3<\/code><\/p>\n<p><code>\"timeout\":300,<\/code><\/p>\n<p><code>\"password\": \"yourpassword\",#\u5bc6\u7801<\/code><\/p>\n<p><code>\"method\":\"aes-256-cfb\",#\u52a0\u5bc6\u65b9\u5f0f\u6709\u5f88\u591a\uff0c\u53ef\u4ee5\u9009\u62e9<\/code><\/p>\n<p><code>\"fast_open\":true,<\/code><\/p>\n<p><code>\"workers\":1<\/code><\/p>\n<p><code>}<\/code><\/p>\n<p>password\u91cc\u8f93\u5165\u7684\u662f\u4f60\u81ea\u5df1\u5b9a\u4e49\u7684\u5bc6\u7801\uff0cserver_port\u8f93\u5165\u7684\u7aef\u53e3\u4f60\u4e5f\u53ef\u4ee5\u81ea\u5df1\u5b9a<\/p>\n<p>ESC\u540e\u901a\u8fc7\u8f93\u5165\u00a0 \u00a0 :wq\uff0c\u5373\u53ef\u4fdd\u5b58\u9000\u51fa\u3010\u4f60\u8f93\u5165:wq\u7684\u65f6\u5019\u5de6\u4e0b\u89d2\u662f\u4f1a\u6709\u5b57\u7b26\u51fa\u73b0\u7684\u3011<\/p>\n<p>\u5982\u679c\u4f60\u8981\u50cf\u6211\u4e00\u6837\u7528\u591a\u4e2a\u7aef\u53e3\uff0c\u5c31\u50cf\u4e0b\u56fe\u8fd9\u4e48\u5199\uff1a<\/p>\n<p><img loading=\"lazy\" class=\"alignnone wp-image-82 size-full\" src=\"http:\/\/sirokuma.cc\/wp-content\/uploads\/2018\/03\/ss\u914d\u7f6e.png\" alt=\"\" width=\"364\" height=\"311\" srcset=\"https:\/\/sirokuma.cc\/wp-content\/uploads\/2018\/03\/ss\u914d\u7f6e.png 364w, https:\/\/sirokuma.cc\/wp-content\/uploads\/2018\/03\/ss\u914d\u7f6e-300x256.png 300w\" sizes=\"(max-width: 364px) 100vw, 364px\" \/><\/p>\n<p><code>{<\/code><br \/>\n<code> \"server\":\"::\",<\/code><br \/>\n<code> \"local_address\":\"127.0.0.1\",<\/code><br \/>\n<code> \"local_port\":1080,<\/code><br \/>\n<code> \"port_password\":<\/code><br \/>\n<code> {<\/code><br \/>\n<code> \"????\":\"?????????\",<\/code><br \/>\n<code> \"????\":\"?????????\",<\/code><br \/>\n<code> \"????\":\"?????????\",<\/code><br \/>\n<code> \"????\":\"?????????\",<\/code><br \/>\n<code> \"????\":\"?????????\",<\/code><br \/>\n<code> \"????\":\"?????????\"<\/code><br \/>\n<code> },<\/code><br \/>\n<code> \"timeout\":300,<\/code><br \/>\n<code> \"method\":\"chacha20-ietf-poly1305\",#\u6211\u4f7f\u7528\u4e86\u6b64\u52a0\u5bc6\u65b9\u5f0f\uff0c\u4e00\u4e9bss\u5ba2\u6237\u7aef\u53ef\u80fd\u6ca1\u6709\u6b64\u52a0\u5bc6\u65b9\u5f0f<\/code><br \/>\n<code> \"fast_open\":false,<\/code><br \/>\n<code> \"log-file\":\"\/dev\/null\"<\/code><br \/>\n<code> }<\/code><\/p>\n<p>\u6211\u89c9\u5f97<code>\"log-file\":\"\/dev\/null\"<\/code>\u770b\u4e2a\u4eba\u9700\u8981\u4e86\uff0c\u6211\u8fd9\u79cd\u957f\u65f6\u95f4\u4e0d\u6e05\u7406\u76848\u4e2a\u6708\u76f4\u63a5\u53d8\u6210\u4e86\u5360\u4e868G\u7684shadowsocks.log\uff0c\u672c\u6765\u5c31\u6ca1\u591a\u5c11\u7a7a\u95f4\uff0c\u4e00\u76f4\u4ee5\u4e3a\u662f\u5176\u4ed6\u7684log\u6587\u4ef6\u5360\u7a7a\u95f4\uff0c\u76f4\u5230\u4f7f\u7528\u4e86<\/p>\n<p><code>find \/ -type f -size +1G<\/code>\u67e5\u627e\u6700\u5927\u6587\u4ef6&#8230;&#8230;<\/p>\n<p>\u81f3\u6b64\u5b8c\u6210\u4e86shadowsocks\u7684\u914d\u7f6e\uff0c<\/p>\n<p>\u7136\u540e\u8f93\u5165 <code>ssserver -c \/etc\/shadowsocks.json -d start<\/code><\/p>\n<p>\u4f60\u670d\u52a1\u5668\u7684ss\u5c31\u8dd1\u8d77\u6765\u5566\uff01\u3010\u6211\u8bb0\u5f97\u5f00\u673a\u81ea\u52a8\u542f\u52a8\u8fd8\u662f\u8981\u81ea\u5df1\u914d\u7f6e\u7684\uff0c\u53e6\u5916\u8fd8\u7aef\u53e3\u7684\u5f00\u653e\u8bbe\u7f6e\u3011<\/p>\n<p>\u63a5\u4e0b\u6765\u5c31\u662f\u5728\u4f60\u7684PC\u4e0a\u7528ss\u5ba2\u6237\u7aef<\/p>\n<p>\u9996\u5148\u4f60\u9700\u8981\u5f04\u5230shadowsocks.exe\u8fd9\u4e2a\u4e1c\u897f\uff0c\u4e0a<a href=\"https:\/\/shadowsocks.org\/en\/download\/clients.html\">\u5b98\u7f51<\/a><\/p>\n<p>windows\u7684github\u7684release: https:\/\/github.com\/shadowsocks\/shadowsocks-windows\/releases<\/p>\n<p>\u7136\u540e\u6253\u5f00shadowsocks.exe\uff0c\u53cc\u51fb\u7cfb\u7edf\u6258\u76d8\u56fe\u6807\u4e2d\u7684\u5c0f\u7eb8\u98de\u673a\uff0c\u6253\u5f00\u7f16\u8f91\u670d\u52a1\u5668\u7684\u7a97\u53e3<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" class=\"alignnone wp-image-83 size-full\" src=\"http:\/\/sirokuma.cc\/wp-content\/uploads\/2018\/03\/ss.png\" alt=\"\" width=\"465\" height=\"363\" srcset=\"https:\/\/sirokuma.cc\/wp-content\/uploads\/2018\/03\/ss.png 465w, https:\/\/sirokuma.cc\/wp-content\/uploads\/2018\/03\/ss-300x234.png 300w\" sizes=\"(max-width: 465px) 100vw, 465px\" \/><\/p>\n<p>\u50cf\u8fd9\u6837\u586b\u4e0a\u4f60\u7684\u670d\u52a1\u5668\u5730\u5740\uff0c\u670d\u52a1\u5668\u7aef\u53e3\u548c\u5bc6\u7801\uff0c\u52a0\u5bc6\u5c31\u9009\u4f60\u9009\u62e9\u7684\u5c31\u597d\u4e86\uff08\u5c31\u662f\u4f60\u521a\u624d\u586b\u7684method\uff09\u70b9\u51fb\u786e\u5b9a\u3002<\/p>\n<p>\u53f3\u952e\u4f60\u7684\u201c\u5c0f\u98de\u673a\u201d\uff1a\u201c\u670d\u52a1\u5668\u201d-\u9009\u62e9\u4f60\u7684\u670d\u52a1\u5668\uff0c\u201c\u7cfb\u7edf\u4ee3\u7406\u6a21\u5f0f\u201d\u6709\u4e24\u79cd\u201c<a href=\"https:\/\/baike.baidu.com\/item\/PAC\/16292100\">PAC<\/a>\u201d\u7b80\u5355\u7684\u8bf4\u662f\u90e8\u5206\u7f51\u7ad9\u8d70\u4ee3\u7406\uff0c\u4e00\u822c\u662f\u90a3\u4e9b\u88ab\u5899\u7684\u7f51\u7ad9\uff0c\u201c\u5168\u5c40\u201d\u5c31\u662f\u6240\u6709\u7f51\u7ad9\u901a\u8fc7\u4ee3\u7406\u8bbf\u95ee\u3002\u201c\u542f\u7528\u7cfb\u7edf\u4ee3\u7406\u201d\u5373\u53ef\u5f00\u542f\u4ee3\u7406\u3002<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"http:\/\/ip111.cn\/\">http:\/\/ip111.cn\/<\/a>\u6d4b\u8bd5<\/p>\n<p><img loading=\"lazy\" class=\"alignnone wp-image-84 size-full\" src=\"http:\/\/sirokuma.cc\/wp-content\/uploads\/2018\/03\/ip.png\" alt=\"\" width=\"1175\" height=\"803\" srcset=\"https:\/\/sirokuma.cc\/wp-content\/uploads\/2018\/03\/ip.png 1175w, https:\/\/sirokuma.cc\/wp-content\/uploads\/2018\/03\/ip-300x205.png 300w, https:\/\/sirokuma.cc\/wp-content\/uploads\/2018\/03\/ip-768x525.png 768w, https:\/\/sirokuma.cc\/wp-content\/uploads\/2018\/03\/ip-1024x700.png 1024w\" sizes=\"(max-width: 1175px) 100vw, 1175px\" \/><\/p>\n<p>\u53d1\u73b0\u81ea\u5df1\u7684ip\u5df2\u7ecf\u53d8\u6210\u81ea\u5df1\u670d\u52a1\u5668ip\u7684\u65f6\u5019\uff0c\u4f60\u7684ipv4\u7684ss\u5c31ok\u5566\uff01<\/p>\n<p>\u4f60\u5982\u679c\u8981\u4f7f\u7528ipv6\uff0c\u9996\u5148\u4f60\u5f97\u6253\u5f00\u4f60\u7684vultr\u670d\u52a1\u5668\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u9009\u62e9settings\u9009\u9879<\/p>\n<p><img src=\"http:\/\/images2015.cnblogs.com\/blog\/831860\/201611\/831860-20161124211153331-1473821840.png\" alt=\"\" \/><\/p>\n<p>\u70b9\u51fb\u56fe\u4e2d\u84dd\u8272\u5b57\u7684configuration examples\uff0c\u4f60\u5c31\u4f1a\u770b\u5230\u8fd9\u4e2a<\/p>\n<p><img src=\"http:\/\/images2015.cnblogs.com\/blog\/831860\/201611\/831860-20161124211244596-840646186.png\" alt=\"\" \/><\/p>\n<p>\u8f93\u5165<code>vi \/etc\/network\/interfaces<\/code><\/p>\n<p>\u7136\u540e\u4f60\u5c31\u53ef\u4ee5\u628a\u6253\u5f00\u7684\u6587\u4ef6\u91cc\u7684\u6587\u672c\u6362\u6210\u4f60\u7f51\u9875\u4e0a\u5bf9\u5e94\u4e0a\u56fe\u7684\u7ea2\u8272\u6587\u672c\uff08\u6bcf\u4e2aip\u7684\u90fd\u4e0d\u4e00\u6837\u7684\uff0c\u522b\u6309\u6211\u7684\u6284\uff0c\u8d85\u4f60\u7f51\u9875\u4e0a\u7684\uff0c\u6211\u7684\u4f60\u7528\u4e0d\u4e86\u7684\uff09\uff0c\u8bb0\u4f4f\u4e00\u5b9a\u662f\u5728\u4f60\u670d\u52a1\u5668\u64cd\u4f5c\u7cfb\u7edf\u5bf9\u5e94\u7684\u65b9\u6846\u91cc\u7684\u7ea2\u8272\u6587\u5b57\uff0cubuntu 16.xx\u548c14.xx 12.xx\u7248\u672c\u7684\u914d\u7f6e\u662f\u4e0d\u4e00\u6837\u7684\u3002<\/p>\n<p>\u7136\u540e\u8001\u529e\u6cd5:wq\u4fdd\u5b58\u9000\u51fa<\/p>\n<p>\u8f93\u5165<code>ssserver -c \/etc\/shadowsocks.json -d stop<\/code><\/p>\n<p>\u518d<code>ssserver -c \/etc\/shadowsocks.json -d start<\/code><\/p>\n<p>\u4f60\u5c31\u53ef\u4ee5\u901a\u8fc7\u628adefult ip\u4e2d\u7684ipv6\u5730\u5740<\/p>\n<p><img src=\"http:\/\/images2015.cnblogs.com\/blog\/831860\/201611\/831860-20161124211736581-19578339.png\" alt=\"\" \/><\/p>\n<p>\u50cf\u8fd9\u6837<\/p>\n<p><img loading=\"lazy\" class=\"alignnone wp-image-85 size-full\" src=\"http:\/\/sirokuma.cc\/wp-content\/uploads\/2018\/03\/ss2.png\" alt=\"\" width=\"465\" height=\"363\" srcset=\"https:\/\/sirokuma.cc\/wp-content\/uploads\/2018\/03\/ss2.png 465w, https:\/\/sirokuma.cc\/wp-content\/uploads\/2018\/03\/ss2-300x234.png 300w\" sizes=\"(max-width: 465px) 100vw, 465px\" \/><\/p>\n<p>\u4f7f\u7528\u65f6\u6ce8\u610f\u9009\u62e9\u4f60\u60f3\u7528\u7684\u670d\u52a1\u5668\uff1a\u53f3\u952e\u4f60\u7684\u201c\u5c0f\u98de\u673a\u201d\uff1a\u201c\u670d\u52a1\u5668\u201d-\u9009\u62e9\u4f60\u7684\u670d\u52a1\u5668\u3002<\/p>\n<h2>\u8865\u5145\uff1a<\/h2>\n<h4>\u5f00\u673a\u542f\u52a8\uff1a<\/h4>\n<p>xshell\u4e2d\u8fde\u63a5vps\uff1aCentOS\u4e2d<\/p>\n<pre class=\"line number1 index0 alt2\"><code>nohup\u00a0sslocal\u00a0-c\u00a0\/etc\/shadowsocks.json\u00a0\/dev\/null\u00a02&gt;&amp;1\u00a0&amp; <\/code>#\u662fshadowsocks\u540e\u53f0\u8fd0\u884c \u00a0 \u7136\u540e\u52a0\u5165\u5f00\u673a\u81ea\u542f\u52a8 \u00a0<code>echo\u00a0\"\u00a0nohup\u00a0sslocal\u00a0-c\u00a0\/etc\/shadowsocks.json\u00a0\/dev\/null\u00a02&gt;&amp;1\u00a0&amp;\"\u00a0\/etc\/rc.local<\/code> <span style=\"color: #ff0000;\"> \u6ca1\u6709\u5c1d\u8bd5\u5176\u6b63\u786e\u6027 \u53e6\u5916\u7684\u65b9\u6cd5<\/span>\uff1a<\/pre>\n<p>\u65b0\u5efa\u542f\u52a8\u811a\u672c\u6587\u4ef6<code>\/etc\/systemd\/system\/shadowsocks.service<\/code>\uff0c\u5185\u5bb9\u5982\u4e0b\uff1a<\/p>\n<pre><code>[Unit]\r\nDescription=Shadowsocks\r\n\r\n[Service]\r\nTimeoutStartSec=0\r\nExecStart=\/usr\/bin\/ssserver -c \/etc\/shadowsocks.json\r\n\r\n[Install]\r\nWantedBy=multi-user.target\r\n<\/code><\/pre>\n<p>\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u542f\u52a8 shadowsocks \u670d\u52a1\uff1a<\/p>\n<pre><code class=\"lang-bash\">systemctl <span class=\"hljs-built_in\">enable<\/span> shadowsocks\r\nsystemctl start shadowsocks\r\n<\/code><\/pre>\n<p>\u4e3a\u4e86\u68c0\u67e5 shadowsocks \u670d\u52a1\u662f\u5426\u5df2\u6210\u529f\u542f\u52a8\uff0c\u53ef\u4ee5\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u67e5\u770b\u670d\u52a1\u7684\u72b6\u6001\uff1a<\/p>\n<pre><code class=\"lang-bash\">systemctl status shadowsocks -l\r\n<\/code><\/pre>\n<p>\u5982\u679c\u670d\u52a1\u542f\u52a8\u6210\u529f\uff0c\u5219\u63a7\u5236\u53f0\u663e\u793a\u7684\u4fe1\u606f\u53ef\u80fd\u7c7b\u4f3c\u8fd9\u6837\uff1a<\/p>\n<pre><code>\u25cf shadowsocks.service - Shadowsocks\r\n   Loaded: loaded (\/etc\/systemd\/system\/shadowsocks.service; enabled; vendor preset: disabled)\r\n   Active: active (running) since Mon 2015-12-21 23:51:48 CST; 11min ago\r\n Main PID: 19334 (ssserver)\r\n   CGroup: \/system.slice\/shadowsocks.service\r\n           \u2514\u250019334 \/usr\/bin\/python \/usr\/bin\/ssserver -c \/etc\/shadowsocks.json\r\n\r\nDec 21 23:51:48 morning.work systemd[1]: Started Shadowsocks.\r\nDec 21 23:51:48 morning.work systemd[1]: Starting Shadowsocks...\r\nDec 21 23:51:48 morning.work ssserver[19334]: INFO: loading config from \/etc\/shadowsocks.json\r\nDec 21 23:51:48 morning.work ssserver[19334]: 2015-12-21 23:51:48 INFO     loading libcrypto from libcrypto.so.10\r\nDec 21 23:51:48 morning.work ssserver[19334]: 2015-12-21 23:51:48 INFO     starting server at 0.0.0.0:8388<\/code><\/pre>\n<pre class=\"line number1 index0 alt2\"><span style=\"color: #ff0000;\">\u00a0<\/span><\/pre>\n<pre class=\"line number1 index0 alt2\"><\/pre>\n<div>\n<div>\n<h4>CentOS\u4e00\u822c\u4f7f\u7528firewall\u6765\u914d\u7f6e\u7aef\u53e3\u95ee\u9898\uff1a<\/h4>\n<p>\u67e5\u770b\u5df2\u7ecf\u5f00\u653e\u7684\u7aef\u53e3\uff1a<\/p>\n<pre class=\"prettyprint\"><code class=\"hljs lasso has-numbering\">firewall<span class=\"hljs-attribute\">-cmd <span class=\"hljs-subst\">--<span class=\"hljs-built_in\">list-ports<\/span><\/span><\/span><\/code><\/pre>\n<p>\u5f00\u542f\u7aef\u53e3<\/p>\n<pre class=\"prettyprint\"><code class=\"hljs brainfuck has-numbering\"><span class=\"hljs-comment\">firewall<span class=\"hljs-literal\">-cmd --zone=public --add-port=80\/tcp --permanent<\/span><\/span><\/code><\/pre>\n<p>\u547d\u4ee4\u542b\u4e49\uff1a<\/p>\n<p>\u2013zone #\u4f5c\u7528\u57df<\/p>\n<p>\u2013add-port=80\/tcp #\u6dfb\u52a0\u7aef\u53e3\uff0c\u683c\u5f0f\u4e3a\uff1a\u7aef\u53e3\/\u901a\u8baf\u534f\u8bae<\/p>\n<p>\u2013permanent #\u6c38\u4e45\u751f\u6548\uff0c\u6ca1\u6709\u6b64\u53c2\u6570\u91cd\u542f\u540e\u5931\u6548<\/p>\n<p>\u91cd\u542f\u9632\u706b\u5899<\/p>\n<pre><code>firewall-cmd --reload<\/code> #\u91cd\u542ffirewall <code>systemctl stop firewalld.service<\/code> #\u505c\u6b62firewall <code>systemctl disable firewalld.service<\/code> #\u7981\u6b62firewall\u5f00\u673a\u542f\u52a8 <code>firewall-cmd --state<\/code> #\u67e5\u770b\u9ed8\u8ba4\u9632\u706b\u5899\u72b6\u6001\uff08\u5173\u95ed\u540e\u663e\u793anotrunning\uff0c\u5f00\u542f\u540e\u663e\u793arunning\uff09<\/pre>\n<p>&nbsp;<\/p>\n<h3>\u5b89\u88c5BBR\u52a0\u901f(\u5b89\u88c5\u6709\u98ce\u9669)\uff1a<\/h3>\n<p>Google BBR\u662f\u4e00\u79cd\u65b0\u5174\u7684TCP\u5355\u8fb9\u52a0\u901f\u65b9\u6848\uff0c\u6548\u679c\u5f88\u68d2\uff0c\u582a\u6bd4\u9510\u901f\u3002\u6240\u4ee5\uff0c\u6bd4\u8f83\u5efa\u8bae\u4f60<a href=\"https:\/\/link.jianshu.com?t=http:\/\/since1989.org\/category\/vultr\" target=\"_blank\" rel=\"nofollow noopener\">\u5f00\u542fBBR\u52a0\u901f\u7b97\u6cd5<\/a>\uff0c\u8ba9\u4f60\u7684\u4ee3\u7406\u901f\u5ea6\u98de\u8d77\u6765\uff0c\u771f\u6b63\u770byoutube 4K\u8d85\u9ad8\u6e05\u753b\u8d28\u4e0d\u5361\u987f\u3002<\/p>\n<p>\u5982\u4f55\u5b89\u88c5BBR\u5462\uff1f\u8d85\u50bb\u74dc\u5f0f\u7684Centos Ubuntu\u4e00\u952e\u5b89\u88c5BBR\u6559\u7a0b\uff1a<\/p>\n<p>\u4f7f\u7528root\u8eab\u4efd\u767b\u5f55\u4f60\u7684vps\uff0c\u8f93\u5165\u4e0b\u9762\u547d\u4ee4\u5c31\u81ea\u52a8\u5b89\u88c5BBR\u7b97\u6cd5\u3002<\/p>\n<p><code>wget \u2013no-check-certificate https:\/\/github.com\/teddysun\/across\/raw\/master\/bbr.sh<\/code><\/p>\n<p><code>chmod +x bbr.sh<\/code><\/p>\n<p><code>.\/bbr.sh<\/code><\/p>\n<p>\u5b89\u88c5\u540e\uff0c\u5efa\u8bae\u91cd\u542f\u4e00\u6b21\u670d\u52a1\u5668\u751f\u6548\u3002<\/p>\n<\/div>\n<\/div>\n<p>&nbsp;<\/p>\n<h3>\u8865\u5145:<\/h3>\n<p>\u914d\u7f6e\u5f00\u673a\u542f\u52a8<\/p>\n<p><code>nano \/etc\/rc.local #\u4fee\u6539\u5f00\u673a\u542f\u52a8\u9879<\/code><\/p>\n<p>\u5c06\u4e0b\u9762\u7684\u8bed\u53e5\u6dfb\u52a0\u5230\u6587\u4ef6\u7684\u6700\u540e\uff0c\u5982\u679c\u6709exit 0\uff0c\u52a0\u5728\u8fd9\u4e00\u884c\u7684\u4e0a\u8fb9\u3002<\/p>\n<p><code>\/usr\/local\/bin\/ssserver -c \/etc\/shadowsocks.json -d start<\/code><\/p>\n<p>\u5f00\u673a\u5373\u53ef\u542f\u52a8Shadowsocks\u670d\u52a1\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u53c2<span style=\"font-family: Consolas, Monaco, monospace;\">\u8003<\/span>\uff1a<\/p>\n<pre class=\"title\"><a href=\"http:\/\/blog.csdn.net\/qingheshijiyuan\/article\/details\/53330581\">\u6821\u56ed\u514d\u6d41\u91cf\u4e0a\u7f51\u6559\u7a0bI\uff1a\u642d\u5efa\u4e00\u4e2a\u652f\u6301ipv6\u7684ss\r\n<\/a><\/pre>\n<pre class=\"title\"><a href=\"https:\/\/www.jianshu.com\/p\/4bd75e5d824a\">linode vultr vps\u642d\u5efass\u5f00\u542f\u9510\u901fBBR\u52a0\u901f\u6559\u7a0b\r\n<\/a><\/pre>\n<pre class=\"title\"><a href=\"http:\/\/www.jb51.net\/article\/108874.htm\">\u89e3\u51b3centos7 \u5f00\u673a\/etc\/rc.local \u4e0d\u6267\u884c\u7684\u95ee\u9898\r\n<\/a><\/pre>\n<pre class=\"title\"><a href=\"https:\/\/segmentfault.com\/a\/1190000010868426\">Linux \u57fa\u672c\u9632\u706b\u5899\u8bbe\u7f6e\u548c\u5f00\u653e\u7aef\u53e3\u547d\u4ee4\r\n<\/a><\/pre>\n<pre class=\"title\"><a href=\"https:\/\/www.cnblogs.com\/eaglezb\/p\/6073739.html\">Centos 7 firewall \u547d\u4ee4\r\n<\/a><\/pre>\n<pre class=\"title\"><a href=\"http:\/\/morning.work\/page\/2015-12\/install-shadowsocks-on-centos-7.html\">\u5728 CentOS 7 \u4e0b\u5b89\u88c5\u914d\u7f6e shadowsocks\r\n<\/a><\/pre>\n<pre class=\"title\"><a href=\"https:\/\/yuyii.com\/2015\/12\/28\/shadowsocks-systemd\/\">Shadowsocks systemd \u914d\u7f6e\r\n<\/a><\/pre>\n<pre class=\"title\"><a href=\"http:\/\/blog.csdn.net\/sodino\/article\/details\/52356472\">\u3010Linux\u3011CentOS 7\u901a\u8fc7Firewall\u5f00\u653e\u9632\u706b\u5899\u7aef\u53e3\r\n<\/a><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u6709\u4e86VPS\uff0c\u5c31\u6765\u5230\u4e86\u521d\u5fc3SS\u3010shadowsocks\u3011,\u5b83\u6709\u591a\u5e73\u53f0\u7684\u53d1\u884c\u7248\uff0c\u751a\u81f3\u6709\u8def\u7531\u5668\u4e0a\u7684mini linux\u4e0a\u8fd0\u884c\u7684\u7248\u672c\uff0c\u8fd9\u6837\u53ea\u8981\u8fde\u4e0a\u8def\u7531\u5668\u4fbf\u53ef\u7545\u901a\u65e0\u963b\u4e86\u3002\u867d\u7136\u5b98\u7f51\u4e0a\u53ea\u6709OpenWrt\u7684\u53d1\u884c\u7248\uff0c\u5b9e\u9645\u4e0a\u5927\u591a\u6570\u540c\u7ea7\u7684\u7cfb\u7edf\u4e0a\u90fd\u6709\u76f8\u5173\u5e94\u7528\uff0c\u4e0d\u8fc7OpenWrt\u4e0a\u5f53\u524d\u6700\u65b0\u7684SS\u4e2dspec\u7248\u672c\u7684\u52a0\u5bc6\u65b9\u5f0f\u5e76\u4e0d\u5168\uff0c\u6bd4\u5982\u6ca1\u6709\u4efb\u4f55poly-1305\u7684\u5b57\u773c\u5df2\u7ecf\uff0c\u4f46\u5b8c\u6574\u6ca1\u6709luci\u754c\u9762\u7684\u6ca1\u6709\u8bd5\u8fc7\u3002 \u7f51\u4e0a\u5df2\u7ecf\u6709\u5f88\u591aSS\u642d\u5efa\u6559\u7a0b\u4e86\uff1a\uff08\u4e5f\u6709\u4e00\u952e\u5b89\u88c5\u7684\uff0c\u4ee5\u4e0b\u4e3a\u4e00\u4e2a\u4f8b\u5b50\uff09 \u5f00\u59cb\u642d\u5efa\u4f60\u7684shadowsocks \u5148\u8f93\u5165apt-get install build-essential \u7136\u540eapt-get install python-pip\uff0c\u628apip\u7ed9\u88c5\u4e0a \u7136\u540e\u4f60\u5c31\u53ef\u4ee5\u8f93\u5165pip install shadowsocks\uff0c\u4ece\u800c\u5b89\u88c5shadowsocks \u5982\u6709\u95ee\u9898\u53ef\u4ee5Google or Baidu\uff0c\u6216\u8005\u63d0\u95ee \u7136\u540e\u4f60\u9700\u8981\u505ashadowsocks\u7684\u914d\u7f6e \u8f93\u5165vi \/etc\/shadowsocks.json\uff0c\u7528vi\u65b0\u5efa\u4e00\u4e2ass\u7684\u914d\u7f6e &nbsp; vi\u7684\u4f7f\u7528\uff1a\u7528\u4e0a\u4e0b\u5de6\u53f3\uff08\u6216\u8005kjhl\uff09\u79fb\u52a8\u5149\u6807\uff0c\u6309i\u8fdb\u5165insert\u6a21\u5f0f\u4ece\u5f53\u524d\u5149\u6807\u5f00\u59cb\u8f93\u5165\uff0c\u9700\u8981\u79fb\u52a8\u5149\u6807\u7684\u65f6\u5019\u5c31\u6309ctrl+[\u8fdb\u5165\u5149\u6807\u79fb\u52a8\u6a21\u5f0f\uff0c\u5220\u9664\u5355\u4e2a\u5b57\u7b26\u53ef\u4ee5\u7528del\u6216\u8005\u5149\u6807\u79fb\u52a8\u6a21\u5f0f\u4e0b\u7684x\u952e\uff0c\u8fde\u63092\u6b21d\u5220\u9664\u4e00\u884c\uff0cu\u64a4\u9500\u4e0a\u6b21\u52a8\u4f5c]\uff08\u539f\u6587\u8fd9\u4e2a\u6211\u8bd5\u4e86\u4e0d\u592a\u597d\u4f7f- -\u67e5\u9605\u4e86\u76f8\u5173\u8d44\u6599Linux vi \u4e2d\u79fb\u52a8\u5149\u6807 \u547d\u4ee4\uff09\u53e6\u5916\u4e00\u4e9b\u8f93\u5165\u4e5f\u4f1a\u5f55\u5165backspace(\u5220\u9664\u952e)\u4f7f\u7528Ctrl+backspace\u53ef\u4ee5\u5b8c\u6210\u5220\u9664\u3002 &nbsp; \u8f93\u5165\u5982\u4e0b\u5185\u5bb9[\u6ce8\u610f\uff1a\u8fd9\u5e76\u4e0d\u662f\u6700\u7ec8\u7684\u914d\u7f6e\uff0c\u8fd9\u662f\u6700\u57fa\u672c\u7684\u914d\u7f6e\u7684\u4e00\u4e2a\u4f8b\u5b50\uff0c\u770b\u770b\u5c31\u597d] { &#8220;server&#8221;:&#8221;::&#8221;, #\u5b9e\u73b0ipv6\u8bbf\u95ee\u53ef\u80fd &#8220;server_port&#8221;: 1234,#\u5f00\u653e\u7684\u7aef\u53e3 &#8220;local_port&#8221;: 1080,#linux\u672c\u5730\u5904\u7406\u7aef\u53e3 &#8220;timeout&#8221;:300, &#8220;password&#8221;: &#8220;yourpassword&#8221;,#\u5bc6\u7801 &#8220;method&#8221;:&#8221;aes-256-cfb&#8221;,#\u52a0\u5bc6\u65b9\u5f0f\u6709\u5f88\u591a\uff0c\u53ef\u4ee5\u9009\u62e9 &#8220;fast_open&#8221;:true, &#8220;workers&#8221;:1 } password\u91cc\u8f93\u5165\u7684\u662f\u4f60\u81ea\u5df1\u5b9a\u4e49\u7684\u5bc6\u7801\uff0cserver_port\u8f93\u5165\u7684\u7aef\u53e3\u4f60\u4e5f\u53ef\u4ee5\u81ea\u5df1\u5b9a ESC\u540e\u901a\u8fc7\u8f93\u5165\u00a0 \u00a0 :wq\uff0c\u5373\u53ef\u4fdd\u5b58\u9000\u51fa\u3010\u4f60\u8f93\u5165:wq\u7684\u65f6\u5019\u5de6\u4e0b\u89d2\u662f\u4f1a\u6709\u5b57\u7b26\u51fa\u73b0\u7684\u3011 \u5982\u679c\u4f60\u8981\u50cf\u6211\u4e00\u6837\u7528\u591a\u4e2a\u7aef\u53e3\uff0c\u5c31\u50cf\u4e0b\u56fe\u8fd9\u4e48\u5199\uff1a { &#8220;server&#8221;:&#8221;::&#8221;, &#8220;local_address&#8221;:&#8221;127.0.0.1&#8243;, &#8220;local_port&#8221;:1080, &#8220;port_password&#8221;: { &#8220;????&#8221;:&#8221;?????????&#8221;, &#8220;????&#8221;:&#8221;?????????&#8221;, &#8220;????&#8221;:&#8221;?????????&#8221;,&#8230;.<\/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:\/\/sirokuma.cc\/index.php?rest_route=\/wp\/v2\/posts\/80"}],"collection":[{"href":"https:\/\/sirokuma.cc\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sirokuma.cc\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sirokuma.cc\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sirokuma.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=80"}],"version-history":[{"count":10,"href":"https:\/\/sirokuma.cc\/index.php?rest_route=\/wp\/v2\/posts\/80\/revisions"}],"predecessor-version":[{"id":1005,"href":"https:\/\/sirokuma.cc\/index.php?rest_route=\/wp\/v2\/posts\/80\/revisions\/1005"}],"wp:attachment":[{"href":"https:\/\/sirokuma.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=80"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sirokuma.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=80"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sirokuma.cc\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=80"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}