{"id":2890,"date":"2024-06-23T21:50:38","date_gmt":"2024-06-23T13:50:38","guid":{"rendered":"http:\/\/www.plm.cn\/?p=2890"},"modified":"2024-06-23T21:50:38","modified_gmt":"2024-06-23T13:50:38","slug":"%e6%9c%80%e5%ae%8c%e6%95%b4%e7%9a%84frp%e5%86%85%e7%bd%91%e7%a9%bf%e9%80%8f%ef%bc%88%e9%87%87%e7%94%a8toml%e9%85%8d%e7%bd%ae%ef%bc%89windows%e9%83%a8%e7%bd%b2%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"http:\/\/www.plm.cn\/2890\/","title":{"rendered":"\u6700\u5b8c\u6574\u7684frp\u5185\u7f51\u7a7f\u900f\uff08\u91c7\u7528toml\u914d\u7f6e\uff09Windows\u90e8\u7f72\u65b9\u6cd5"},"content":{"rendered":"

FRP\uff08Fast Reverse Proxy\uff09\u662f\u4e00\u4e2a\u9ad8\u6027\u80fd\u7684\u53cd\u5411\u4ee3\u7406\u5e94\u7528\uff0c\u53ef\u4ee5\u5e2e\u52a9\u4f60\u8f7b\u677e\u5730\u5b9e\u73b0\u5185\u7f51\u7a7f\u900f\uff0c\u4ece\u800c\u53ef\u4ee5\u5728\u4e0d\u540c\u7684\u7f51\u7edc\u73af\u5883\u4e2d\u8bbf\u95ee\u5185\u7f51\u670d\u52a1\u5668\u3002\u7f51\u4e0afrp\u914d\u7f6e\u5927\u591a\u662f\u914d\u7f6eini\u6587\u4ef6\uff0c\u800cfrp3.5\u7248\u672c\u540e\u5c31\u4e0d\u652f\u6301ini\u4e86\uff0c\u5fc5\u987b\u91c7\u7528toml\u914d\u7f6e\u4e86\uff0c\u4ee5\u4e0b\u662f\u4e00\u4e2a\u5b8c\u6574\u6848\u4f8b<\/p>\n

\"\"<\/p>\n

\u73af\u5883\uff1a2\u53f0\u670d\u52a1\u5668<\/p>\n

A\uff1a\u963f\u91cc\u4e91\u670d\u52a1\u5668\uff08\u6709\u516c\u7f51\u5730\u5740\uff09\u5982\uff1a32.96.29.82<\/p>\n

B\uff1a\u5c40\u57df\u7f51\u670d\u52a1\u5668\uff08\u4e00\u822c\u662fMobox\u670d\u52a1\u90e8\u7f72\u670d\u52a1\u5668\uff09 \u5982\uff1a192.168.0.66<\/p>\n

\uff08\u670d\u52a1\u5668A \u516c\u7f51\uff09<\/h3>\n

1\u3001\u62f7\u8d1d frp_0.58.1_windows_amd64.zip \u5230\u670d\u52a1\u5668A<\/p>\n

2\u3001\u89e3\u538b\u540e\uff08\u6bd4\u5982 \u89e3\u538b\u5230 frp_0.58.1_windows_amd64 \u76ee\u5f55\uff09\uff0c\u8fd9\u6279\u89e3\u538b\u7684\u6587\u4ef6\u975e\u5e38\u53ef\u80fd\u88abWindows\u81ea\u5e26\u9632\u706b\u5899\u6740\u6389\uff08\u5b83\u8ba4\u4e3a\u662f\u75c5\u6bd2\uff09<\/p>\n

\u6240\u4ee5\uff0c\u8fd9\u4e2a\u89e3\u538b\u7684\u76ee\u5f55\uff0c\u5728windows\u7684\u81ea\u5e26\u9632\u706b\u5899\uff08windows defender\uff09\u5185\u6700\u597d\u8bbe\u7f6e\u5ffd\u7565\u3002 \u5426\u5219\u975e\u5e38\u53ef\u80fd\u88ab\u5220\u9664<\/p>\n

\uff08win+r\uff09\u8fdb\u5165 \uff0cwindows \u8bbe\u7f6e\uff0c\u627e\u5230 windows defender \uff0c\u627e\u5230\u201c\u6392\u9664\u201d \u5c06\u8fd9\u4e2a\u76ee\u524d\u6392\u9664\u6389<\/p>\n

3\u3001\u8fdb\u5165 frp_0.58.1_windows_amd64 \uff0c\u6253\u5f00frps.toml<\/p>\n

\u7f16\u5199\uff1a<\/p>\n

bindPort =7000 \uff08\u8fd9\u4e2a\u7aef\u53e3\u53ef\u4ee5\u6839\u636e\u9700\u8981\u81ea\u5df1\u6539\uff09<\/span><\/p>\n

vhostHTTPPort =7005 \uff08\u6839\u636e\u9700\u8981\u8fdb\u884c\u4fee\u6539\uff09(\u82e5\u662f https \u8981\u6539\u6210\uff1avhostHTTPSPort\uff09<\/span><\/p>\n

auth.method = “token”<\/span><\/p>\n

auth.token = “123456”\u00a0 \u00a0 \u00a0\uff08\u5bc6\u7801\uff09<\/span><\/p>\n

4\u3001\u5f53\u524d\u76ee\u5f55\u4e0b\u7f16\u5199 StartS.bat \u6587\u4ef6\uff0c\u5185\u5bb9<\/p>\n

@echo off<\/span><\/p>\n

:home<\/span><\/p>\n

frps -c frps.toml<\/span><\/p>\n

5\u3001\u8fd0\u884cStartS.bat<\/p>\n

\uff08\u670d\u52a1\u5668B \u5c40\u57df\u7f51\uff0c\u90e8\u7f72\u4e86 Mobox\u7684\u670d\u52a1\u5668\uff09<\/h3>\n

1\u3001\u62f7\u8d1d frp_0.58.1_windows_amd64.zip \u5230\u670d\u52a1\u5668A<\/p>\n

2\u3001\u89e3\u538b\u540e\uff08\u6bd4\u5982 \u89e3\u538b\u5230 frp_0.58.1_windows_amd64 \u76ee\u5f55\uff09\uff0c\u8fd9\u6279\u89e3\u538b\u7684\u6587\u4ef6\u975e\u5e38\u53ef\u80fd\u88abWindows\u81ea\u5e26\u9632\u706b\u5899\u6740\u6389\uff08\u5b83\u8ba4\u4e3a\u662f\u75c5\u6bd2\uff09<\/p>\n

\u6240\u4ee5\uff0c\u8fd9\u4e2a\u89e3\u538b\u7684\u76ee\u5f55\uff0c\u5728windows\u7684\u81ea\u5e26\u9632\u706b\u5899\uff08windows defender\uff09\u5185\u6700\u597d\u8bbe\u7f6e\u5ffd\u7565\u3002 \u5426\u5219\u975e\u5e38\u53ef\u80fd\u88ab\u5220\u9664<\/p>\n

\uff08win+r\uff09\u8fdb\u5165 \uff0cwindows \u8bbe\u7f6e\uff0c\u627e\u5230 windows defender \uff0c\u627e\u5230\u201c\u6392\u9664\u201d \u5c06\u8fd9\u4e2a\u76ee\u524d\u6392\u9664\u6389<\/p>\n

3\u3001\u8fdb\u5165 frp_0.58.1_windows_amd64 \uff0c\u6253\u5f00frpc.toml<\/p>\n

\u5185\u5bb9\uff1a<\/p>\n

serverAddr = 32.96.29.82\u00a0 \u00a0(\u8fd9\u4e2a\u6839\u636e\u5b9e\u9645\u516c\u7f51IP\u8fdb\u884c\u914d\u7f6e)<\/span><\/p>\n

server_port =7000 (\u8fd9\u4e2a\u53ef\u4ee5\u6839\u636e frps.toml \u60c5\u51b5\u8fdb\u884c\u4fee\u6539)<\/span><\/p>\n

auth.method = “token”<\/span><\/p>\n

auth.token = “123456”<\/span><\/p>\n

[proxies] \u91cc\u9762\u5404\u4e2amobox3\u670d\u52a1\u53ca\u7f51\u7ad9\u7684\u7aef\u53e3\uff0c\u6839\u636e\u5b9e\u9645\u7aef\u53e3\u8fdb\u884c\u914d\u7f6e \uff08\u76ee\u524d\u4f8b\u5b50\u91cc\u97627001-7005\uff09<\/p>\n

[[proxies]]<\/span><\/p>\n

name = “wwwSite”<\/span><\/p>\n

type = “http”<\/span><\/p>\n

localIP = “127.0.0.1”<\/span><\/p>\n

localPort = 7110 \uff08\u672c\u673a\u7f51\u7ad9\u7aef\u53e3\uff09<\/span><\/p>\n

customDomains = [“39.99.229.82”]\u00a0 \u00a0 \u00a0 \uff08\u6700\u597d\u662f\u57df\u540d \uff0c\u4e5f\u53ef\u4ee5ip\uff09<\/span><\/p>\n

 <\/p>\n

[[proxies]]<\/span><\/p>\n

name = “OrgAPI”<\/span><\/p>\n

type = “tcp”<\/span><\/p>\n

localIP = “127.0.0.1”<\/span><\/p>\n

localPort = 5101<\/span><\/p>\n

remotePort = 7001<\/span><\/p>\n

 <\/p>\n

4\u3001\u7f16\u5199\u5f53\u524d\u76ee\u5f55\u4e0b\u7684 StartC.bat \u6587\u4ef6<\/p>\n

@echo off<\/span><\/p>\n

:home<\/span><\/p>\n

frpc -c frpc.toml<\/span><\/p>\n

 <\/p>\n

5\u3001\u8fd0\u884cStartC.bat<\/p>\n

\uff08\u5173\u4e8e \u670d\u52a1\u5668A \u516c\u7f51\u8fd9\u53f0\u670d\u52a1\u5668 \u6240\u9700\u8981\u6253\u5f00\u7684\u7aef\u53e3\uff09<\/h3>\n

\u6839\u636e\u76ee\u524d\u914d\u7f6e\u7684\u60c5\u51b5\uff0c\u9700\u8981\u6253\u5f00 7000-7005<\/span><\/p>\n

\u8fd9\u91cc7005\u6bd4\u8f83\u7279\u6b8a\uff1b \u662ffrps.toml \u767b\u5f55\u7684http \u7aef\u53e3<\/p>\n

\u6211\u4eec\u9700\u8981 32.96.29.82:5705\/mobox \u6765\u767b\u5f55\u5185\u7f51\u90e8\u7f72\u7684mobox<\/p>\n

 <\/p>\n","protected":false},"excerpt":{"rendered":"

FRP\uff08Fast Reverse Proxy\uff09\u662f\u4e00\u4e2a\u9ad8\u6027\u80fd\u7684\u53cd\u5411\u4ee3\u7406\u5e94\u7528\uff0c\u53ef\u4ee5\u5e2e\u52a9\u4f60\u8f7b\u677e\u5730\u5b9e\u73b0\u5185\u7f51\u7a7f\u900f\uff0c\u4ece\u800c\u53ef […]<\/p>\n","protected":false},"author":1,"featured_media":2891,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[16],"class_list":["post-2890","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news","tag-xinwen"],"_links":{"self":[{"href":"http:\/\/www.plm.cn\/wp-json\/wp\/v2\/posts\/2890","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.plm.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.plm.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.plm.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.plm.cn\/wp-json\/wp\/v2\/comments?post=2890"}],"version-history":[{"count":1,"href":"http:\/\/www.plm.cn\/wp-json\/wp\/v2\/posts\/2890\/revisions"}],"predecessor-version":[{"id":2892,"href":"http:\/\/www.plm.cn\/wp-json\/wp\/v2\/posts\/2890\/revisions\/2892"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.plm.cn\/wp-json\/wp\/v2\/media\/2891"}],"wp:attachment":[{"href":"http:\/\/www.plm.cn\/wp-json\/wp\/v2\/media?parent=2890"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.plm.cn\/wp-json\/wp\/v2\/categories?post=2890"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.plm.cn\/wp-json\/wp\/v2\/tags?post=2890"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}