{"id":34,"date":"2025-01-17T10:52:48","date_gmt":"2025-01-17T02:52:48","guid":{"rendered":"https:\/\/halouman.top\/?p=34"},"modified":"2025-03-16T00:03:51","modified_gmt":"2025-03-15T16:03:51","slug":"%e7%88%b1%e5%bf%abdocker%e9%83%a8%e7%bd%b2frpc","status":"publish","type":"post","link":"https:\/\/halouman.top\/?p=34","title":{"rendered":"\u7231\u5febdocker\u90e8\u7f72frpc\u5185\u7f51\u7a7f\u900f"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\">1. \u57df\u540d\u89e3\u6790<\/h3>\n\n\n\n<p>\u5148\u57df\u540d\u6307\u5411\u628afrps\u670d\u52a1\u5668\u7684ip\uff0c\u670d\u52a1\u7aef\u5728vps\u7684\u5c31\u505a\u4e00\u4e2a\u57df\u540d\u89e3\u6790\uff0c\u670d\u52a1\u7aef\u5728\u5bb6\u91cc\u7684nas\uff0c\u5c31\u505a\u4e00\u4e2a\u52a8\u6001\u57df\u540d\u89e3\u6790\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2. \u7f16\u5199 frpc \u914d\u7f6e\u6587\u4ef6<\/h3>\n\n\n\n<p>frp \u6700\u91cd\u8981\u7684\u5c31\u662f frpc \u914d\u7f6e\u6587\u4ef6\uff0c\u4efb\u4f55\u5bb9\u5668\u521b\u5efa\u6216\u8005\u542f\u52a8\u5931\u8d25 99% \u90fd\u662f\u56e0\u4e3a\u914d\u7f6e\u9519\u8bef\u3002<\/p>\n\n\n\n<p><strong>\u521b\u5efa frpc.ini \u6587\u4ef6<\/strong><\/p>\n\n\n\n<p>\u914d\u7f6e\u6587\u4ef6\u4f7f\u7528\u4ec0\u4e48\u540e\u7f00\u90fd\u4e0d\u5f71\u54cd\uff0c\u4f8b\u5982<code>frpc.ini \/ frpc.txt \/ frpc.toml<\/code>\u90fd\u662f\u53ef\u4ee5\u7684\uff0c\u53ea\u662f\u7531\u4e8e\u7fa4\u6656\u7684<code>\u6587\u672c\u7f16\u8f91\u5668<\/code>\u65e0\u6cd5\u9ed8\u8ba4\u6253\u5f00<code>.toml<\/code>\u540e\u7f00\u6587\u4ef6\uff0c\u6240\u4ee5\u9009\u62e9<code>.txt<\/code>\u65b9\u4fbf\u5728\u7fa4\u6656\u5185\u76f4\u63a5\u4fee\u6539\uff0c\u5f53\u7136\u4f60\u4e5f\u53ef\u4ee5\u5728\u7535\u8111\u4e0a\u521b\u5efa\u7f16\u5199\u5b8c\u6bd5\u540e\u5728\u4e0a\u4f20\u5230\u7fa4\u6656\u4e2d\u3002<strong>\u540e\u7eed\u6302\u8f7d\u81f3 docker \u5185\u90e8\u65f6\u4e3a toml \u683c\u5f0f\u5373\u53ef\u3002<\/strong><\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:100%\">\n<pre class=\"wp-block-code\"><code>serverAddr = \"frp.freefrp.net\"\nserverPort = 7000\nauth.method = \"token\"\nauth.token = \"freefrp.net\"\n\n&#91;&#91;proxies]]\nname = \"web1_nas\"\n# name \u552f\u4e00\u5b57\u6bb5\uff0c\u4e0d\u80fd\u548c\u670d\u52a1\u5668\u4e0a\u5176\u4ed6\u7528\u6237\u7684\u670d\u52a1\u540d\u91cd\u590d\u3002\ntype = \"http\"\n# http \u534f\u8bae\nlocalIP = \"192.168.1.8\"\n# \u9700\u8981\u7a7f\u900f\u51fa\u53bb\u7684\u670d\u52a1 IP\uff0c\u4f8b\u5982\u7fa4\u6656\u7684 IP\u3002\nlocalPort = 5000\n# \u9700\u8981\u7a7f\u900f\u51fa\u53bb\u7684\u670d\u52a1\u7aef\u53e3\uff0c\u4f8b\u5982\u7fa4\u6656\u9ed8\u8ba4\u7684 http \u670d\u52a1\u7aef\u53e3 5000\u3002\ncustomDomains = &#91;\"nas.yourdomain.com\"]\n# \u81ea\u5b9a\u4e49\u57df\u540d\uff0c\u4e0a\u8ff0\u5df2\u7ecf\u4fee\u6539\u8fc7 CNAME \u89e3\u6790\u7684\u57df\u540d\uff0c\u4f8b\u5982 nas.yourdomain.com\u3002\n\n&#91;&#91;proxies]]\nname = \"linux1_centos7\"\n# name \u552f\u4e00\u5b57\u6bb5\uff0c\u4e0d\u80fd\u548c\u670d\u52a1\u5668\u4e0a\u5176\u4ed6\u7528\u6237\u7684\u670d\u52a1\u540d\u91cd\u590d\u3002\ntype = \"tcp\"\n# tcp \u534f\u8bae\nlocalIP = \"192.168.1.21\"\n# \u9700\u8981\u7a7f\u900f\u51fa\u53bb\u7684\u670d\u52a1 IP\uff0c\u4f8b\u5982\u6211\u5185\u7f51\u7684\u4e00\u53f0 centos7 \u670d\u52a1\u5668\u7684 IP\u3002\nlocalPort = 22\n# \u9700\u8981\u7a7f\u900f\u51fa\u53bb\u7684\u670d\u52a1\u7aef\u53e3\uff0c\u4f8b\u5982 centos7 \u670d\u52a1\u5668\u7684 ssh \u767b\u5f55\u7aef\u53e3\u3002\nremotePort = 22222\n# \u8fdc\u7a0b\u7a7f\u900f\u7aef\u53e3\uff0c\u6b64\u7aef\u53e3\u4e0d\u80fd\u548c\u670d\u52a1\u5668\u4e0a\u5176\u4ed6\u7528\u6237\u91cd\u590d\uff0c\u4e5f\u8981\u9075\u5faa frps \u670d\u52a1\u5141\u8bb8\u7684\u7aef\u53e3\u8303\u56f4\u3002\n&lt;\/code>&lt;\/pre><\/code><\/pre>\n<\/div>\n<\/div>\n\n\n\n<p>3.\u4e0b\u8f7d\u955c\u50cf<\/p>\n\n\n\n<p>\u9996\u5148\u9700\u8981\u4e00\u4e2a\u53ef\u7528\u955c\u50cf\u6e90\uff1a<a href=\"https:\/\/docker.m.daocloud.io\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/docker.m.daocloud.io<\/a><\/p>\n\n\n\n<p>\u3010\u5728\u6b64\u7279\u522b\u611f\u8c22\u9879\u76ee\u7ef4\u62a4\u8005\uff1aDaoCloud\u3011<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"533\" src=\"https:\/\/halouman.top\/wp-content\/uploads\/2025\/01\/1736411577567-vx8-1024x533.jpg\" alt=\"\" class=\"wp-image-47\" srcset=\"https:\/\/halouman.top\/wp-content\/uploads\/2025\/01\/1736411577567-vx8-1024x533.jpg 1024w, https:\/\/halouman.top\/wp-content\/uploads\/2025\/01\/1736411577567-vx8-300x156.jpg 300w, https:\/\/halouman.top\/wp-content\/uploads\/2025\/01\/1736411577567-vx8-768x400.jpg 768w, https:\/\/halouman.top\/wp-content\/uploads\/2025\/01\/1736411577567-vx8.jpg 1440w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u5176\u6b21\u9700\u8981\u628a\u7231\u5feb docker \u7248\u672c\u5347\u7ea7\u5230\u6700\u65b0\uff01<\/p>\n\n\n\n<p>\u590d\u5236\u955c\u50cf\u540d\u5b57&nbsp; stilleshan\/frpc&nbsp; \u4e0b\u8f7d\u955c\u50cf\uff0c\u8fd9\u662f\u9879\u76ee\u5730\u5740&nbsp; &nbsp;<a href=\"https:\/\/github.com\/stilleshan\/frpc\">https:\/\/github.com\/stilleshan\/frpc<\/a><\/p>\n\n\n\n<p>4.\u6dfb\u52a0\u63a5\u53e3\u3001\u4e0a\u4f20\u914d\u7f6e\u6587\u4ef6<\/p>\n\n\n\n<p>\u5148\u521b\u5efa\u63a5\u53e3\uff0c\u8f93\u5165\u548c\u5f53\u524d\u5c40\u57df\u7f51\u4e0d\u76f8\u540c\u7684\u7f51\u6bb5\u548c\u7f51\u5173<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"533\" src=\"https:\/\/halouman.top\/wp-content\/uploads\/2025\/01\/2-1024x533.jpg\" alt=\"\" class=\"wp-image-48\" srcset=\"https:\/\/halouman.top\/wp-content\/uploads\/2025\/01\/2-1024x533.jpg 1024w, https:\/\/halouman.top\/wp-content\/uploads\/2025\/01\/2-300x156.jpg 300w, https:\/\/halouman.top\/wp-content\/uploads\/2025\/01\/2-768x400.jpg 768w, https:\/\/halouman.top\/wp-content\/uploads\/2025\/01\/2.jpg 1440w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u4e0a\u4f20\u914d\u7f6e\u6587\u4ef6\uff0c\u590d\u5236\u8def\u5f84\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1440\" height=\"750\" src=\"https:\/\/halouman.top\/wp-content\/uploads\/2025\/01\/3-1024x533.jpg\" alt=\"\" class=\"wp-image-50\" srcset=\"https:\/\/halouman.top\/wp-content\/uploads\/2025\/01\/3-1024x533.jpg 1024w, https:\/\/halouman.top\/wp-content\/uploads\/2025\/01\/3-300x156.jpg 300w, https:\/\/halouman.top\/wp-content\/uploads\/2025\/01\/3-768x400.jpg 768w, https:\/\/halouman.top\/wp-content\/uploads\/2025\/01\/3.jpg 1440w\" sizes=\"auto, (max-width: 1440px) 100vw, 1440px\" \/><\/figure>\n\n\n\n<p>5.\u521b\u5efa\u5bb9\u5668<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"533\" src=\"https:\/\/halouman.top\/wp-content\/uploads\/2025\/01\/4-1024x533.jpg\" alt=\"\" class=\"wp-image-51\" srcset=\"https:\/\/halouman.top\/wp-content\/uploads\/2025\/01\/4-1024x533.jpg 1024w, https:\/\/halouman.top\/wp-content\/uploads\/2025\/01\/4-300x156.jpg 300w, https:\/\/halouman.top\/wp-content\/uploads\/2025\/01\/4-768x400.jpg 768w, https:\/\/halouman.top\/wp-content\/uploads\/2025\/01\/4.jpg 1440w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u9009\u4e2d\u955c\u50cf\u548c\u7f51\u7edc\u63a5\u53e3\uff0c\u52fe\u9009\u5f00\u673a\u542f\u52a8\uff0c\u9ad8\u7ea7\u8bbe\u7f6e\u91cc\u9762\u6e90\u8def\u5f84\u7c98\u8d34\u4e0a\u4e00\u6b65\u590d\u5236\u7684\u8def\u5f84\uff0c\u76ee\u6807\u8def\u5f84\u586b&#8221;\/frp\/frpc.toml&#8221;\uff0c\u8fd9\u4e00\u6b65\u5f88\u5173\u952e\uff0c\u5982\u679c\u6ca1\u6709\u914d\u7f6e\u6587\u4ef6\uff0c\u8fde\u5bb9\u5668\u90fd\u542f\u52a8\u4e0d\u8d77\u6765\u3002<\/p>\n\n\n\n<p>\u7231\u5feb\u7684docker\u5bb9\u5668\u4f53\u68c0\u4e4b\u540e\uff0c\u4e0d\u53ef\u4ee5\u518d\u66f4\u6539\u914d\u7f6e\u6587\u4ef6\u4e86\uff0c\u6240\u4ee5\u5982\u679c\u662f\u8981\u4fee\u6539\u914d\u7f6e\u6587\u4ef6\u7684\uff0c\u9700\u8981\u518d\u91cd\u65b0\u5f00\u542f\u65b0\u7684\u5bb9\u5668\u3002<\/p>\n\n\n\n<p>\u542f\u52a8\u6210\u529f\u540e\uff0c\u767b\u5f55frps\u7684luci\u754c\u9762\u5c31\u53ef\u4ee5\u770b\u5230\u5df2\u7ecf\u914d\u7f6e\u6210\u529f\u4e86<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. \u57df\u540d\u89e3\u6790 \u5148\u57df\u540d\u6307\u5411\u628af&hellip;<\/p>\n","protected":false},"author":1,"featured_media":51,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-34","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-docker"],"_links":{"self":[{"href":"https:\/\/halouman.top\/index.php?rest_route=\/wp\/v2\/posts\/34","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/halouman.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/halouman.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/halouman.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/halouman.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=34"}],"version-history":[{"count":6,"href":"https:\/\/halouman.top\/index.php?rest_route=\/wp\/v2\/posts\/34\/revisions"}],"predecessor-version":[{"id":115,"href":"https:\/\/halouman.top\/index.php?rest_route=\/wp\/v2\/posts\/34\/revisions\/115"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/halouman.top\/index.php?rest_route=\/wp\/v2\/media\/51"}],"wp:attachment":[{"href":"https:\/\/halouman.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=34"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/halouman.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=34"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/halouman.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=34"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}