{"id":1363,"date":"2024-04-02T12:41:53","date_gmt":"2024-04-02T04:41:53","guid":{"rendered":"https:\/\/hkc.nasclub.vip\/?p=1363"},"modified":"2024-04-02T12:41:53","modified_gmt":"2024-04-02T04:41:53","slug":"%e5%9c%a8docker%e4%b8%8a%e9%83%a8%e7%bd%b2v2ray","status":"publish","type":"post","link":"https:\/\/hkc.nasclub.vip\/?p=1363","title":{"rendered":"\u5728Docker\u4e0a\u90e8\u7f72v2ray"},"content":{"rendered":"<h3 id=\"\u4e00-\u5728docker-hub\u4e0a\u62c9\u53d6v2ray\u6700\u65b0\u7248\u955c\u50cf\" class=\"wp-block-heading\" style=\"padding: 0px; margin: 0px 0px 12px; box-sizing: inherit; color: #444444; font-family: monda, sans-serif; font-size: 22px; line-height: 1.4; text-wrap: wrap; background-color: rgba(255, 255, 255, 0.93);\">\u4e00\u3001\u5728docker hub\u4e0a\u62c9\u53d6v2ray\u6700\u65b0\u7248\u955c\u50cf<\/h3>\n<pre class=\"wp-block-code prettyprinted\" style=\"padding: 1.6em; margin-top: 0px; margin-bottom: 1.6em; box-sizing: border-box; overflow: auto; font-family: 'courier 10 pitch', Courier, monospace; font-size: 0.9375rem; background-color: rgba(226, 224, 224, 0.67); line-height: 1.6; max-width: 100%; color: #333333;\">docker pull v2ray\/official:latest<\/pre>\n<h3 id=\"\u4e8c-\u521b\u5efav2ray\u914d\u7f6e\" class=\"wp-block-heading\" style=\"padding: 0px; margin: 0px 0px 12px; box-sizing: inherit; color: #444444; font-family: monda, sans-serif; font-size: 22px; line-height: 1.4; text-wrap: wrap; background-color: rgba(255, 255, 255, 0.93);\">\u4e8c\u3001\u521b\u5efav2ray\u914d\u7f6e<\/h3>\n<p style=\"padding: 0px; margin-top: 0px; margin-bottom: 20px; box-sizing: inherit; color: #333333; font-family: SimSun, Arial, sans-serif; text-wrap: wrap; background-color: rgba(255, 255, 255, 0.93);\">1\u3001\u521b\u5efa\u6587\u4ef6\u5939\uff0c\u628av2ray\u914d\u7f6e\u548c\u65e5\u5fd7\u6587\u4ef6\u5939\u521b\u5efa\u5230\u672c\u5730<\/p>\n<pre class=\"wp-block-code prettyprinted\" style=\"padding: 1.6em; margin-top: 0px; margin-bottom: 1.6em; box-sizing: border-box; overflow: auto; font-family: 'courier 10 pitch', Courier, monospace; font-size: 0.9375rem; background-color: rgba(226, 224, 224, 0.67); line-height: 1.6; max-width: 100%; color: #333333;\">mkdir \/www\/wwwroot\/v2ray\r\nmkdir \/www\/wwwroot\/log\/v2ray<\/pre>\n<p style=\"padding: 0px; margin-top: 0px; margin-bottom: 20px; box-sizing: inherit; color: #333333; font-family: SimSun, Arial, sans-serif; text-wrap: wrap; background-color: rgba(255, 255, 255, 0.93);\">2\u3001\u521b\u5efa\u914d\u7f6e<\/p>\n<p style=\"padding: 0px; margin-top: 0px; margin-bottom: 20px; box-sizing: inherit; color: #333333; font-family: SimSun, Arial, sans-serif; text-wrap: wrap; background-color: rgba(255, 255, 255, 0.93);\">\u6267\u884c\uff1a<\/p>\n<pre class=\"wp-block-code prettyprinted\" style=\"padding: 1.6em; margin-top: 0px; margin-bottom: 1.6em; box-sizing: border-box; overflow: auto; font-family: 'courier 10 pitch', Courier, monospace; font-size: 0.9375rem; background-color: rgba(226, 224, 224, 0.67); line-height: 1.6; max-width: 100%; color: #333333;\">vi \/www\/wwwroot\/v2ray\/config.json<\/pre>\n<p style=\"padding: 0px; margin-top: 0px; margin-bottom: 20px; box-sizing: inherit; color: #333333; font-family: SimSun, Arial, sans-serif; text-wrap: wrap; background-color: rgba(255, 255, 255, 0.93);\">\u7136\u540e\u628a\u4e0b\u9762\u4ee3\u7801\u62f7\u8d1d\u8fdb\u53bb<\/p>\n<pre class=\"wp-block-code prettyprinted\" style=\"padding: 1.6em; margin-top: 0px; margin-bottom: 1.6em; box-sizing: border-box; overflow: auto; font-family: 'courier 10 pitch', Courier, monospace; font-size: 0.9375rem; background-color: rgba(226, 224, 224, 0.67); line-height: 1.6; max-width: 100%; color: #333333;\">{\r\n  \"log\" : {\r\n    \"access\": \"\/var\/log\/v2ray\/access.log\",\r\n    \"error\": \"\/var\/log\/v2ray\/error.log\",\r\n    \"loglevel\": \"warning\"\r\n  },\r\n  \"inbounds\": [{\r\n    \"port\": 8888,\/\/\u7aef\u53e3\r\n    \"protocol\": \"vmess\",\/\/\u4f20\u8f93\u534f\u8bae\r\n    \"settings\": {\r\n      \"clients\": [\r\n        {\r\n          \"id\": \"179afce3-97e8-36ce-3fd3-48579b84b6ee\",\/\/\u8fd9\u91ccGUID\u8bf7\u901a\u8fc7\u5de5\u5177\u751f\u6210\r\n          \"level\": 1,\r\n          \"alterId\": 64\r\n        }\r\n      ]\r\n    }\r\n  }],\r\n  \"outbounds\": [{\r\n    \"protocol\": \"freedom\",\r\n    \"settings\": {}\r\n  }]}<\/pre>\n<p style=\"padding: 0px; margin-top: 0px; margin-bottom: 20px; box-sizing: inherit; color: #333333; font-family: SimSun, Arial, sans-serif; text-wrap: wrap; background-color: rgba(255, 255, 255, 0.93);\">\u9700\u8981\u6ce8\u610f\u7684\u662fclients\u8282\u70b9\u91cc\u7684id\u9700\u8981\u81ea\u884c\u751f\u6210\u5e76\u66ff\u6362\uff0c<a href=\"https:\/\/bt.phjf.site:15013\/uuid\/\" target=\"_blank\" rel=\"noopener\">\u751f\u6210\u5de5\u5177<\/a><\/p>\n<h3 id=\"\u4e09-\u8fd0\u884cv2ray\" class=\"wp-block-heading\" style=\"padding: 0px; margin: 0px 0px 12px; box-sizing: inherit; color: #444444; font-family: monda, sans-serif; font-size: 22px; line-height: 1.4; text-wrap: wrap; background-color: rgba(255, 255, 255, 0.93);\">\u4e09\u3001\u8fd0\u884cv2ray<\/h3>\n<p style=\"padding: 0px; margin-top: 0px; margin-bottom: 20px; box-sizing: inherit; color: #333333; font-family: SimSun, Arial, sans-serif; text-wrap: wrap; background-color: rgba(255, 255, 255, 0.93);\">1\u3001\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u8fd0\u884c<\/p>\n<pre class=\"wp-block-code prettyprinted\" style=\"padding: 1.6em; margin-top: 0px; margin-bottom: 1.6em; box-sizing: border-box; overflow: auto; font-family: 'courier 10 pitch', Courier, monospace; font-size: 0.9375rem; background-color: rgba(226, 224, 224, 0.67); line-height: 1.6; max-width: 100%; color: #333333;\">docker run --restart=always --name=v2ray --net=host -v \/www\/wwwroot\/v2ray\/config.json:\/etc\/v2ray\/config.json -v \/www\/wwwroot\/log\/v2ray:\/var\/log\/v2ray -i -t -d \r\nv2ray\/official:latest<\/pre>\n<p style=\"padding: 0px; margin-top: 0px; margin-bottom: 20px; box-sizing: inherit; color: #333333; font-family: SimSun, Arial, sans-serif; text-wrap: wrap; background-color: rgba(255, 255, 255, 0.93);\">-p \u4e3adocker\u5bb9\u5668\u7aef\u53e3\u6620\u5c04\uff0c\u5b9e\u4f8b\u4e2d8888\u4e3av2ray\u9ed8\u8ba4\u751f\u6210\u7aef\u53e3\uff0c\u53ef\u4ee5\u81ea\u884c\u66f4\u6539\u6210\u60f3\u8981\u7684\u7aef\u53e3\uff0c\u672c\u5730\u7aef\u53e3\uff1a\u5bb9\u5668\u7aef\u53e3<\/p>\n<p style=\"padding: 0px; margin-top: 0px; margin-bottom: 20px; box-sizing: inherit; color: #333333; font-family: SimSun, Arial, sans-serif; text-wrap: wrap; background-color: rgba(255, 255, 255, 0.93);\">-v \u4e3adocker\u5bb9\u5668\u8def\u5f84\u6620\u5c04\uff0c\u652f\u6301\u6587\u4ef6\u548c\u6587\u4ef6\u5939\uff0c\u672c\u5730\u8def\u5f84\uff1a\u5bb9\u5668\u8def\u5f84<\/p>\n<p style=\"padding: 0px; margin-top: 0px; margin-bottom: 20px; box-sizing: inherit; color: #333333; font-family: SimSun, Arial, sans-serif; text-wrap: wrap; background-color: rgba(255, 255, 255, 0.93);\">2\u3001\u68c0\u67e5\u5f53\u524d\u8fd0\u884c\u72b6\u6001<\/p>\n<pre class=\"wp-block-code prettyprinted\" style=\"padding: 1.6em; margin-top: 0px; margin-bottom: 1.6em; box-sizing: border-box; overflow: auto; font-family: 'courier 10 pitch', Courier, monospace; font-size: 0.9375rem; background-color: rgba(226, 224, 224, 0.67); line-height: 1.6; max-width: 100%; color: #333333;\">docker container ls<\/pre>\n<figure class=\"wp-block-image size-large\" style=\"margin: 0px 0px 1em; padding: 0px; box-sizing: inherit; color: #333333; font-family: SimSun, Arial, sans-serif; text-wrap: wrap; background-color: rgba(255, 255, 255, 0.93);\"><\/figure>\n<p style=\"padding: 0px; margin-top: 0px; margin-bottom: 20px; box-sizing: inherit; color: #333333; font-family: SimSun, Arial, sans-serif; text-wrap: wrap; background-color: rgba(255, 255, 255, 0.93);\">\u597d\u4e86\uff0c\u5728docker\u4e0a\u8fd0\u884cv2ray\u57fa\u672c\u5b8c\u6210\u4e86<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001\u5728docker hub\u4e0a\u62c9\u53d6&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,4,6],"tags":[],"class_list":["post-1363","post","type-post","status-publish","format-standard","hentry","category-hkc","category-linux","category-synology"],"_links":{"self":[{"href":"https:\/\/hkc.nasclub.vip\/index.php?rest_route=\/wp\/v2\/posts\/1363","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hkc.nasclub.vip\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hkc.nasclub.vip\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hkc.nasclub.vip\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hkc.nasclub.vip\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1363"}],"version-history":[{"count":1,"href":"https:\/\/hkc.nasclub.vip\/index.php?rest_route=\/wp\/v2\/posts\/1363\/revisions"}],"predecessor-version":[{"id":1364,"href":"https:\/\/hkc.nasclub.vip\/index.php?rest_route=\/wp\/v2\/posts\/1363\/revisions\/1364"}],"wp:attachment":[{"href":"https:\/\/hkc.nasclub.vip\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1363"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hkc.nasclub.vip\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1363"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hkc.nasclub.vip\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1363"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}