{"id":2052,"date":"2021-11-25T15:24:29","date_gmt":"2021-11-25T07:24:29","guid":{"rendered":"https:\/\/laihp.top\/zqb\/?p=2052"},"modified":"2021-11-25T16:29:12","modified_gmt":"2021-11-25T08:29:12","slug":"docker%e9%83%a8%e7%bd%b2shadowsocks","status":"publish","type":"post","link":"https:\/\/www.laihp.top\/zqb\/?p=2052","title":{"rendered":"Docker\u90e8\u7f72Shadowsocks"},"content":{"rendered":"<h3>\u4e00\u3001\u5b89\u88c5docker<\/h3>\n<p>\u5b89\u88c5\u65b9\u6cd5\u6709\u5f88\u591a\uff0c\u4ecb\u7ecd\u4ee5\u4e0b\u4fbf\u6377\u7684\u4e00\u79cd\uff0c\u4f7f\u7528\u56fd\u5185 daocloud \u4e00\u952e\u5b89\u88c5\u547d\u4ee4\uff1a<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"classic\">curl -sSL https:\/\/get.daocloud.io\/docker | sh<\/pre>\n<h3>\u4e8c\u3001\u90e8\u7f72Shadowsocks<\/h3>\n<p>\u62c9\u53d6docker\u7248shadowsocks-libev<\/p>\n<div>\n<figure>\n<div>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"classic\">docker pull appso\/shadowsocks-libev<\/pre>\n<\/div>\n<\/figure>\n<\/div>\n<p>\u521b\u5efashadowssocks\u914d\u7f6e\u6587\u4ef6\uff0c\u4e3b\u8981\u4e0d\u8981\u53d8\u52a8\u914d\u7f6e\u6587\u4ef6\u76ee\u5f55\uff0c\u9ed8\u8ba4\u914d\u7f6e\u8def\u5f84\u4e3a\u00a0<strong>\/etc\/shadowsocks-libev\/config.json<\/strong><\/p>\n<div class=\"highlight-container\">\n<figure class=\"highlight bash\">\n<div class=\"table-container\">\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\" data-enlighter-theme=\"classic\">mkdir -p \/etc\/shadowsocks-libev\/\r\ntouch \/etc\/shadowsocks-libev\/config.json\r\nvi \/etc\/shadowsocks-libev\/config.json<\/pre>\n<\/div>\n<\/figure>\n<\/div>\n<p>config.json \u914d\u7f6e\u5185\u5bb9<\/p>\n<div class=\"highlight-container\">\n<figure class=\"highlight json\">\n<div class=\"table-container\">\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"classic\">{\r\n\"server\":\"0.0.0.0\",\r\n\"server_port\":443,\r\n\"password\":\"your client connection password\",\r\n\"timeout\":300,\r\n\"method\":\"aes-256-cfb\",\r\n\"fast_open\":false,\r\n\"mode\":\"tcp_and_udp\"\r\n}<\/pre>\n<\/div>\n<\/figure>\n<div class=\"copy-btn\"><\/div>\n<\/div>\n<div class=\"table-container\">\n<table>\n<thead>\n<tr>\n<th align=\"center\">\u540d\u79f0<\/th>\n<th align=\"center\">\u89e3\u91ca<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td align=\"center\">server<\/td>\n<td align=\"center\">\u670d\u52a1\u7aef\u76d1\u542c\u5730\u5740<\/td>\n<\/tr>\n<tr>\n<td align=\"center\">server_port<\/td>\n<td align=\"center\">\u5ba2\u6237\u7aef\u7528\u4e8e\u8fde\u63a5\u7684\u7aef\u53e3<\/td>\n<\/tr>\n<tr>\n<td align=\"center\">password<\/td>\n<td align=\"center\">\u5ba2\u6237\u7aef\u7528\u4e8e\u8fde\u63a5\u7684\u5bc6\u7801<\/td>\n<\/tr>\n<tr>\n<td align=\"center\">timeout<\/td>\n<td align=\"center\">\u8d85\u65f6\u65f6\u95f4<\/td>\n<\/tr>\n<tr>\n<td align=\"center\">method<\/td>\n<td align=\"center\">\u9ed8\u8ba4\u4e3a\u00a0aes-256-cfb\uff0c\u53c2\u9605\u00a0<a href=\"https:\/\/github.com\/shadowsocks\/shadowsocks\/wiki\/Encryption\" target=\"_blank\" rel=\"noopener\">Encryption<\/a><\/td>\n<\/tr>\n<tr>\n<td align=\"center\">mode<\/td>\n<td align=\"center\">\u662f\u5426\u542f\u7528 TCP \/ UDP \u8f6c\u53d1\uff0c\u53c2\u9605\u00a0<a href=\"https:\/\/jlk.fjfi.cvut.cz\/arch\/manpages\/man\/shadowsocks-libev.8\" target=\"_blank\" rel=\"noopener\">shadowsocks-libev(8)<\/a><\/td>\n<\/tr>\n<tr>\n<td align=\"center\">fast_open<\/td>\n<td align=\"center\">\u662f\u5426\u542f\u7528\u00a0<a href=\"https:\/\/github.com\/shadowsocks\/shadowsocks\/wiki\/TCP-Fast-Open\" target=\"_blank\" rel=\"noopener\">TCP Fast Open<\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u4f7f\u7528docker\u542f\u52a8shadowsocks<\/p>\n<div class=\"highlight-container\">\n<figure class=\"highlight bash\">\n<div class=\"table-container\">\n<figure class=\"highlight bash\">\n<div class=\"table-container\">\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"classic\">docker run -d -p 443:443 -p 443:443\/udp --name ss-libev -v \/etc\/shadowsocks-libev:\/etc\/shadowsocks-libev appso\/shadowsocks-libev<\/pre>\n<\/div>\n<\/figure>\n<\/div>\n<\/figure>\n<\/div>\n<p>\u67e5\u770b\u5bb9\u5668\u542f\u52a8\u72b6\u6001<\/p>\n<div class=\"highlight-container\">\n<figure class=\"highlight bash\">\n<div class=\"table-container\">\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"classic\">[root@007_centos ~]# docker ps -as\r\nCONTAINER ID        IMAGE                     COMMAND                  CREATED             STATUS                  PORTS                                        NAMES               SIZE\r\n84c3fd45cbea        appso\/shadowsocks-libev   \"ss-server -c \/etc\/s\u2026\"   2 days ago          Up 2 days               0.0.0.0:443-&gt;443\/tcp, 0.0.0.0:443-&gt;443\/udp    ss-libev           0B (virtual 120MB)<\/pre>\n<p>&nbsp;<\/p>\n<\/div>\n<\/figure>\n<\/div>\n<p>\u67e5\u770b\u7aef\u53e3(443)\u76d1\u542c\u72b6\u6001<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"classic\">[root@007_centos ~]# netstat -anp | grep 443\r\ntcp6       0      0 :::443                  :::*                    LISTEN      13435\/docker-proxy  \r\nudp6       0      0 :::443                  :::*                                13446\/docker-proxy<\/pre>\n<p>&nbsp;<\/p>\n<p>\u81f3\u6b64\uff0c\u670d\u52a1\u7aef\u5b89\u88c5\u5b8c\u6bd5\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001\u5b89\u88c5docker \u5b89\u88c5\u65b9\u6cd5\u6709\u5f88\u591a\uff0c\u4ecb\u7ecd\u4ee5\u4e0b\u4fbf\u6377\u7684\u4e00\u79cd\uff0c\u4f7f\u7528\u56fd\u5185 daocloud \u4e00\u952e\u5b89\u88c5\u547d\u4ee4\uff1a curl &#8230; <a title=\"Docker\u90e8\u7f72Shadowsocks\" class=\"read-more\" href=\"https:\/\/www.laihp.top\/zqb\/?p=2052\" aria-label=\"\u7ee7\u7eed\u9605\u8bfbDocker\u90e8\u7f72Shadowsocks\">\u9605\u8bfb\u66f4\u591a<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2052","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.laihp.top\/zqb\/index.php?rest_route=\/wp\/v2\/posts\/2052","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.laihp.top\/zqb\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.laihp.top\/zqb\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.laihp.top\/zqb\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.laihp.top\/zqb\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2052"}],"version-history":[{"count":13,"href":"https:\/\/www.laihp.top\/zqb\/index.php?rest_route=\/wp\/v2\/posts\/2052\/revisions"}],"predecessor-version":[{"id":2065,"href":"https:\/\/www.laihp.top\/zqb\/index.php?rest_route=\/wp\/v2\/posts\/2052\/revisions\/2065"}],"wp:attachment":[{"href":"https:\/\/www.laihp.top\/zqb\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2052"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.laihp.top\/zqb\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2052"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.laihp.top\/zqb\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2052"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}