{"id":1827,"date":"2024-12-15T11:45:32","date_gmt":"2024-12-15T03:45:32","guid":{"rendered":"http:\/\/blue.yn.cn\/?p=1827"},"modified":"2026-07-23T17:54:18","modified_gmt":"2026-07-23T09:54:18","slug":"%e9%80%9a%e8%bf%87%e5%9f%9f%e5%90%8d%e8%ae%bf%e9%97%ae%e5%86%85%e7%bd%91web%e4%b8%9a%e5%8a%a1","status":"publish","type":"post","link":"http:\/\/blue.yn.cn\/?p=1827","title":{"rendered":"\u901a\u8fc7\u57df\u540d\u8bbf\u95ee\u5185\u7f51web\u4e1a\u52a1"},"content":{"rendered":"<h3>\u5b89\u88c5frp<\/h3>\n<p>\u4e0b\u8f7d<a href=\"https:\/\/github.com\/fatedier\/frp\/releases\" title=\"frp\">frp<\/a>\u4e8c\u8fdb\u5236\u6587\u4ef6\u3002\u6240\u6709\u7684\u6587\u4ef6\u90fd\u6253\u5305\u5728\u4e00\u4e2a\u538b\u7f29\u5305\u4e2d<br \/>\n\u52a0\u901f\u4e0b\u8f7d<code>wget https:\/\/mirror.ghproxy.com\/https:\/\/github.com\/fatedier\/frp\/releases\/download\/v0.61.0\/frp_0.61.0_linux_amd64.tar.gz<\/code><\/p>\n<ul>\n<li>\n<p>\u670d\u52a1\u7aef\uff08\u817e\u8baf\u4e91\uff09\u914d\u7f6e\uff1a<\/p>\n<ul>\n<li>\u89e3\u538b\uff1a<code>tar xf frp_0.61.0_linux_amd64.tar.gz -C \/etc<\/code><\/li>\n<li>\u521b\u5efa\u8f6f\u94fe\u63a5\uff1a<code>ln -s \/etc\/frp_0.61.0_linux_amd64\/ \/etc\/frp<\/code><\/li>\n<li>\u4f7f\u7528<code>systemd<\/code>\u6765\u7ba1\u7406<code>frps<\/code>\u670d\u52a1\n<pre><code class=\"language-bash\">vim \/usr\/lib\/systemd\/system\/frps.service\n[Unit]\n# \u670d\u52a1\u540d\u79f0\uff0c\u53ef\u81ea\u5b9a\u4e49\nDescription = frp server\nAfter = network.target syslog.target\nWants = network.target\n[Service]\nType = simple\n# \u542f\u52a8frps\u7684\u547d\u4ee4\uff0c\u9700\u4fee\u6539\u4e3a\u60a8\u7684frps\u7684\u5b89\u88c5\u8def\u5f84\nExecStart = \/etc\/frp\/frps -c \/etc\/frp\/frps.toml\n[Install]\nWantedBy = multi-user.target<\/code><\/pre>\n<\/li>\n<li>\u4f7f\u7528<code>systemctl<\/code>\u547d\u4ee4\u7ba1\u7406<code>frps<\/code>\u670d\u52a1\n<pre><code class=\"language-bash\"># \u542f\u52a8frps\nsystemctl start frps\n# \u5f00\u673a\u81ea\u542f\u52a8\nsystemctl enable frps\n# \u91cd\u542ffrps\nsystemctl restart frps\n# \u67e5\u770bfrps\u72b6\u6001\nsystemctl status frps<\/code><\/pre>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u5185\u7f51<code>web<\/code>\u4e1a\u52a1\u4e3b\u673a\u914d\u7f6e\uff1a<\/p>\n<ul>\n<li>\u89e3\u538b\uff1a<code>tar xf frp_0.61.0_linux_amd64.tar.gz -C \/etc<\/code><\/li>\n<li>\u521b\u5efa\u8f6f\u94fe\u63a5\uff1a<code>ln -s \/etc\/frp_0.61.0_linux_amd64\/ \/etc\/frp<\/code><\/li>\n<li>\u4f7f\u7528<code>systemd<\/code>\u6765\u7ba1\u7406<code>frpc<\/code>\u670d\u52a1\n<pre><code class=\"language-bash\">vim \/usr\/lib\/systemd\/system\/frpc.service\n[Unit]\n# \u670d\u52a1\u540d\u79f0\uff0c\u53ef\u81ea\u5b9a\u4e49\nDescription = frp server\nAfter = network.target syslog.target\nWants = network.target\n[Service]\nType = simple\n# \u542f\u52a8frpc\u7684\u547d\u4ee4\uff0c\u9700\u4fee\u6539\u4e3a\u60a8\u7684frpc\u7684\u5b89\u88c5\u8def\u5f84\nExecStart = \/etc\/frp\/frpc -c \/etc\/frp\/frpc.toml\n[Install]\nWantedBy = multi-user.target<\/code><\/pre>\n<\/li>\n<li>\u4f7f\u7528<code>systemctl<\/code>\u547d\u4ee4\u7ba1\u7406<code>frpc<\/code>\u670d\u52a1\n<pre><code class=\"language-bash\"># \u542f\u52a8frpc\nsystemctl start frpc\n# \u5f00\u673a\u81ea\u542f\u52a8\nsystemctl enable frpc\n# \u91cd\u542ffrpc\nsystemctl restart frpc\n# \u67e5\u770bfrpc\u72b6\u6001\nsystemctl status frpc<\/code><\/pre>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3>\u901a\u8fc7\u81ea\u5b9a\u4e49\u57df\u540d\u8bbf\u95ee\u5185\u7f51\u7684 Web \u670d\u52a1<\/h3>\n<ul>\n<li>\n<p>\u914d\u7f6e<code>frps.toml<\/code>\uff1a\u5728 <code>frps.toml<\/code> \u6587\u4ef6\u4e2d\u6dfb\u52a0\u4ee5\u4e0b\u5185\u5bb9\uff0c\u4ee5\u6307\u5b9a <code>HTTP<\/code> \u8bf7\u6c42\u7684\u76d1\u542c\u7aef\u53e3\u4e3a<code>80<\/code>\uff1a<\/p>\n<pre><code class=\"language-bash\">vim \/etc\/frp\/frps.toml\nbindPort = 7000\nvhostHTTPPort = 80<\/code><\/pre>\n<\/li>\n<li>\n<p>\u914d\u7f6e<code>frpc.toml<\/code>\uff1a\u5728 <code>frpc.toml<\/code> \u6587\u4ef6\u4e2d\u6dfb\u52a0\u4ee5\u4e0b\u5185\u5bb9\uff0c\u786e\u4fdd\u8bbe\u7f6e\u4e86\u6b63\u786e\u7684\u670d\u52a1\u5668 <code>IP<\/code> \u5730\u5740\u3001\u672c\u5730 <code>Web<\/code> \u670d\u52a1\u76d1\u542c\u7aef\u53e3\u548c\u81ea\u5b9a\u4e49\u57df\u540d\uff1a<\/p>\n<pre><code class=\"language-bash\">vim \/etc\/frp\/frpc.toml\nserverAddr = &quot;x.x.x.x&quot;\nserverPort = 7000\n[[proxies]]\nname = &quot;web&quot;\ntype = &quot;http&quot;\nlocalPort = 80\ncustomDomains = [&quot;x.com.cn&quot;]<\/code><\/pre>\n<\/li>\n<li>\n<p>\u901a\u8fc7\u6d4f\u89c8\u5668\u8bbf\u95ee\uff1a\u4f7f\u7528\u6d4f\u89c8\u5668\u8bbf\u95ee <code>x.com.cn<\/code> \u5373\u53ef\u8bbf\u95ee\u5185\u7f51\u673a\u5668\u4e0a\u7684 <code>80<\/code> \u7aef\u53e3\u670d\u52a1<\/p>\n<\/li>\n<\/ul>\n<h3>\u5185\u7f51\u7a7f\u900f\uff08\u8fdc\u7a0b\u684c\u9762\uff09<\/h3>\n<ol>\n<li>\u4e0b\u8f7d<code>frp_0.64.0_windows_amd64.zip<\/code><\/li>\n<li>\u5c06\u4e0b\u8f7d\u7684\u538b\u7f29\u5305\u89e3\u538b\u5230\u4efb\u610f\u76ee\u5f55\uff0c\u4f8b\u5982 <code>C:\\frp<\/code><\/li>\n<li>\u914d\u7f6e<code>frpc.toml<\/code><\/li>\n<\/ol>\n<pre><code class=\"language-yaml\">serverAddr = &quot;x.x.x.x&quot;\nserverPort = 7000\n\n[[proxies]]\nname = &quot;rdp&quot;\ntype = &quot;tcp&quot;\nlocalIP = &quot;127.0.0.1&quot;\nlocalPort = xxx\nremotePort = xxx<\/code><\/pre>\n<ol start=\"4\">\n<li>\u8fd0\u884c\u5ba2\u6237\u7aef\uff0c<code>cd C:\\frp<\/code>\uff0c\u7136\u540e<code>frpc.exe -c frpc.toml<\/code><\/li>\n<\/ol>\n<h3>\u4f7f\u7528openssh\u65b9\u6848<\/h3>\n<ol>\n<li>\u817e\u8baf\u4e91\u670d\u52a1\u5668\u914d\u7f6e<code>sshd<\/code><\/li>\n<\/ol>\n<pre><code class=\"language-bash\"># \u5141\u8bb8TCP\u7aef\u53e3\u8f6c\u53d1\uff08\u9ed8\u8ba4\u5927\u591a\u4e3ayes\uff0c\u52a0\u56fa\u8fc7\u7684\u670d\u52a1\u5668\u9700\u8981\u624b\u52a8\u5f00\u542f\uff09\nAllowTcpForwarding yes\n\n# \u3010\u6838\u5fc3\u5fc5\u5f00\u3011\u5141\u8bb8\u53cd\u5411\u96a7\u9053\u7aef\u53e3\u7ed1\u5b9a\u5230 0.0.0.0\uff0c\u5bf9\u5916\u7f51\u5f00\u653e\n# \u9ed8\u8ba4\u503c\u4e3a no\uff0c\u6b64\u65f6\u6620\u5c04\u7684\u7aef\u53e3\u53ea\u80fd\u670d\u52a1\u5668\u672c\u5730\u8bbf\u95ee\uff0c\u5916\u7f51\u8fde\u4e0d\u4e0a\nGatewayPorts yes<\/code><\/pre>\n<ol start=\"2\">\n<li><code>windows10<\/code>\u8fd0\u884c<\/li>\n<\/ol>\n<p><code>ssh -N -C -R 15969:127.0.0.1:15969 root@x.x.x.x<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5b89\u88c5frp \u4e0b\u8f7dfrp\u4e8c\u8fdb\u5236\u6587\u4ef6\u3002\u6240\u6709\u7684\u6587\u4ef6\u90fd\u6253\u5305\u5728\u4e00\u4e2a\u538b\u7f29\u5305\u4e2d \u52a0\u901f\u4e0b\u8f7dwget https:\/\/mirro&#8230; &raquo; <a class=\"read-more-link\" href=\"http:\/\/blue.yn.cn\/?p=1827\">\u9605\u8bfb\u5168\u6587<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22],"tags":[],"class_list":["post-1827","post","type-post","status-publish","format-standard","hentry","category-frp"],"_links":{"self":[{"href":"http:\/\/blue.yn.cn\/index.php?rest_route=\/wp\/v2\/posts\/1827","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/blue.yn.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blue.yn.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blue.yn.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/blue.yn.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1827"}],"version-history":[{"count":7,"href":"http:\/\/blue.yn.cn\/index.php?rest_route=\/wp\/v2\/posts\/1827\/revisions"}],"predecessor-version":[{"id":2776,"href":"http:\/\/blue.yn.cn\/index.php?rest_route=\/wp\/v2\/posts\/1827\/revisions\/2776"}],"wp:attachment":[{"href":"http:\/\/blue.yn.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1827"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blue.yn.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1827"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blue.yn.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1827"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}