{"id":533,"date":"2020-05-10T23:53:34","date_gmt":"2020-05-10T15:53:34","guid":{"rendered":"https:\/\/www.iotch.xyz\/?p=533"},"modified":"2020-05-10T23:53:34","modified_gmt":"2020-05-10T15:53:34","slug":"frp%e4%bd%bf%e7%94%a8","status":"publish","type":"post","link":"https:\/\/www.iotch.xyz\/?p=533","title":{"rendered":"frp\u4f7f\u7528"},"content":{"rendered":"\n<p> frp: \u5185\u7f51\u7a7f\u900f<\/p>\n\n\n\n<p>\u5b98\u65b9\u4f7f\u7528\u6559\u7a0b\uff1a<a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/fatedier\/frp\/blob\/master\/README_zh.md\" target=\"_blank\" rel=\"nofollow\" >https:\/\/github.com\/fatedier\/frp\/blob\/master\/README_zh.md<\/a><\/p>\n\n\n\n<p><a href=\"\/yijicai\/frp\/blob\/master\/README.md\" target=\"_blank\"  rel=\"nofollow\" >README<\/a> | <a href=\"\/yijicai\/frp\/blob\/master\/README_zh.md\" target=\"_blank\"  rel=\"nofollow\" >\u4e2d\u6587\u6587\u6863<\/a><\/p>\n\n\n\n<p>frp \u662f\u4e00\u4e2a\u53ef\u7528\u4e8e\u5185\u7f51\u7a7f\u900f\u7684\u9ad8\u6027\u80fd\u7684\u53cd\u5411\u4ee3\u7406\u5e94\u7528\uff0c\u652f\u6301 tcp, udp \u534f\u8bae\uff0c\u4e3a http \u548c https \u5e94\u7528\u534f\u8bae\u63d0\u4f9b\u4e86\u989d\u5916\u7684\u80fd\u529b\uff0c\u4e14\u5c1d\u8bd5\u6027\u652f\u6301\u4e86\u70b9\u5bf9\u70b9\u7a7f\u900f\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u76ee\u5f55<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"#%E5%BC%80%E5%8F%91%E7%8A%B6%E6%80%81\" target=\"_blank\"  rel=\"nofollow\" >\u5f00\u53d1\u72b6\u6001<\/a><\/li><li><a href=\"#%E6%9E%B6%E6%9E%84\" target=\"_blank\"  rel=\"nofollow\" >\u67b6\u6784<\/a><\/li><li><a href=\"#%E4%BD%BF%E7%94%A8%E7%A4%BA%E4%BE%8B\" target=\"_blank\"  rel=\"nofollow\" >\u4f7f\u7528\u793a\u4f8b<\/a><ul><li><a href=\"#%E9%80%9A%E8%BF%87-ssh-%E8%AE%BF%E9%97%AE%E5%85%AC%E5%8F%B8%E5%86%85%E7%BD%91%E6%9C%BA%E5%99%A8\" target=\"_blank\"  rel=\"nofollow\" >\u901a\u8fc7 ssh \u8bbf\u95ee\u516c\u53f8\u5185\u7f51\u673a\u5668<\/a><\/li><li><a href=\"#%E9%80%9A%E8%BF%87%E8%87%AA%E5%AE%9A%E4%B9%89%E5%9F%9F%E5%90%8D%E8%AE%BF%E9%97%AE%E9%83%A8%E7%BD%B2%E4%BA%8E%E5%86%85%E7%BD%91%E7%9A%84-web-%E6%9C%8D%E5%8A%A1\" target=\"_blank\"  rel=\"nofollow\" >\u901a\u8fc7\u81ea\u5b9a\u4e49\u57df\u540d\u8bbf\u95ee\u90e8\u7f72\u4e8e\u5185\u7f51\u7684 web \u670d\u52a1<\/a><\/li><li><a href=\"#%E8%BD%AC%E5%8F%91-dns-%E6%9F%A5%E8%AF%A2%E8%AF%B7%E6%B1%82\" target=\"_blank\"  rel=\"nofollow\" >\u8f6c\u53d1 DNS \u67e5\u8be2\u8bf7\u6c42<\/a><\/li><li><a href=\"#%E8%BD%AC%E5%8F%91-unix-%E5%9F%9F%E5%A5%97%E6%8E%A5%E5%AD%97\" target=\"_blank\"  rel=\"nofollow\" >\u8f6c\u53d1 Unix \u57df\u5957\u63a5\u5b57<\/a><\/li><li><a href=\"#%E5%AF%B9%E5%A4%96%E6%8F%90%E4%BE%9B%E7%AE%80%E5%8D%95%E7%9A%84%E6%96%87%E4%BB%B6%E8%AE%BF%E9%97%AE%E6%9C%8D%E5%8A%A1\" target=\"_blank\"  rel=\"nofollow\" >\u5bf9\u5916\u63d0\u4f9b\u7b80\u5355\u7684\u6587\u4ef6\u8bbf\u95ee\u670d\u52a1<\/a><\/li><li><a href=\"#%E4%B8%BA%E6%9C%AC%E5%9C%B0-http-%E6%9C%8D%E5%8A%A1%E5%90%AF%E7%94%A8-https\" target=\"_blank\"  rel=\"nofollow\" >\u4e3a\u672c\u5730 HTTP \u670d\u52a1\u542f\u7528 HTTPS<\/a><\/li><li><a href=\"#%E5%AE%89%E5%85%A8%E5%9C%B0%E6%9A%B4%E9%9C%B2%E5%86%85%E7%BD%91%E6%9C%8D%E5%8A%A1\" target=\"_blank\"  rel=\"nofollow\" >\u5b89\u5168\u5730\u66b4\u9732\u5185\u7f51\u670d\u52a1<\/a><\/li><li><a href=\"#%E7%82%B9%E5%AF%B9%E7%82%B9%E5%86%85%E7%BD%91%E7%A9%BF%E9%80%8F\" target=\"_blank\"  rel=\"nofollow\" >\u70b9\u5bf9\u70b9\u5185\u7f51\u7a7f\u900f<\/a><\/li><\/ul><\/li><li><a href=\"#%E5%8A%9F%E8%83%BD%E8%AF%B4%E6%98%8E\" target=\"_blank\"  rel=\"nofollow\" >\u529f\u80fd\u8bf4\u660e<\/a><ul><li><a href=\"#%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6\" target=\"_blank\"  rel=\"nofollow\" >\u914d\u7f6e\u6587\u4ef6<\/a><\/li><li><a href=\"#%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6%E6%A8%A1%E7%89%88%E6%B8%B2%E6%9F%93\" target=\"_blank\"  rel=\"nofollow\" >\u914d\u7f6e\u6587\u4ef6\u6a21\u7248\u6e32\u67d3<\/a><\/li><li><a href=\"#dashboard\" target=\"_blank\"  rel=\"nofollow\" >Dashboard<\/a><\/li><li><a href=\"#admin-ui\" target=\"_blank\"  rel=\"nofollow\" >Admin UI<\/a><\/li><li><a href=\"#%E8%BA%AB%E4%BB%BD%E9%AA%8C%E8%AF%81\" target=\"_blank\"  rel=\"nofollow\" >\u8eab\u4efd\u9a8c\u8bc1<\/a><\/li><li><a href=\"#%E5%8A%A0%E5%AF%86%E4%B8%8E%E5%8E%8B%E7%BC%A9\" target=\"_blank\"  rel=\"nofollow\" >\u52a0\u5bc6\u4e0e\u538b\u7f29<\/a><ul><li><a href=\"#tls\" target=\"_blank\"  rel=\"nofollow\" >TLS<\/a><\/li><\/ul><\/li><li><a href=\"#%E5%AE%A2%E6%88%B7%E7%AB%AF%E7%83%AD%E5%8A%A0%E8%BD%BD%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6\" target=\"_blank\"  rel=\"nofollow\" >\u5ba2\u6237\u7aef\u70ed\u52a0\u8f7d\u914d\u7f6e\u6587\u4ef6<\/a><\/li><li><a href=\"#%E5%AE%A2%E6%88%B7%E7%AB%AF%E6%9F%A5%E7%9C%8B%E4%BB%A3%E7%90%86%E7%8A%B6%E6%80%81\" target=\"_blank\"  rel=\"nofollow\" >\u5ba2\u6237\u7aef\u67e5\u770b\u4ee3\u7406\u72b6\u6001<\/a><\/li><li><a href=\"#%E7%AB%AF%E5%8F%A3%E7%99%BD%E5%90%8D%E5%8D%95\" target=\"_blank\"  rel=\"nofollow\" >\u7aef\u53e3\u767d\u540d\u5355<\/a><\/li><li><a href=\"#%E7%AB%AF%E5%8F%A3%E5%A4%8D%E7%94%A8\" target=\"_blank\"  rel=\"nofollow\" >\u7aef\u53e3\u590d\u7528<\/a><\/li><li><a href=\"#%E9%99%90%E9%80%9F\" target=\"_blank\"  rel=\"nofollow\" >\u9650\u901f<\/a><ul><li><a href=\"#%E4%BB%A3%E7%90%86%E9%99%90%E9%80%9F\" target=\"_blank\"  rel=\"nofollow\" >\u4ee3\u7406\u9650\u901f<\/a><\/li><\/ul><\/li><li><a href=\"#tcp-%E5%A4%9A%E8%B7%AF%E5%A4%8D%E7%94%A8\" target=\"_blank\"  rel=\"nofollow\" >TCP \u591a\u8def\u590d\u7528<\/a><\/li><li><a href=\"#%E5%BA%95%E5%B1%82%E9%80%9A%E4%BF%A1%E5%8F%AF%E9%80%89-kcp-%E5%8D%8F%E8%AE%AE\" target=\"_blank\"  rel=\"nofollow\" >\u5e95\u5c42\u901a\u4fe1\u53ef\u9009 kcp \u534f\u8bae<\/a><\/li><li><a href=\"#%E8%BF%9E%E6%8E%A5%E6%B1%A0\" target=\"_blank\"  rel=\"nofollow\" >\u8fde\u63a5\u6c60<\/a><\/li><li><a href=\"#%E8%B4%9F%E8%BD%BD%E5%9D%87%E8%A1%A1\" target=\"_blank\"  rel=\"nofollow\" >\u8d1f\u8f7d\u5747\u8861<\/a><\/li><li><a href=\"#%E5%81%A5%E5%BA%B7%E6%A3%80%E6%9F%A5\" target=\"_blank\"  rel=\"nofollow\" >\u5065\u5eb7\u68c0\u67e5<\/a><\/li><li><a href=\"#%E4%BF%AE%E6%94%B9-host-header\" target=\"_blank\"  rel=\"nofollow\" >\u4fee\u6539 Host Header<\/a><\/li><li><a href=\"#%E8%AE%BE%E7%BD%AE-http-%E8%AF%B7%E6%B1%82%E7%9A%84-header\" target=\"_blank\"  rel=\"nofollow\" >\u8bbe\u7f6e HTTP \u8bf7\u6c42\u7684 header<\/a><\/li><li><a href=\"#%E8%8E%B7%E5%8F%96%E7%94%A8%E6%88%B7%E7%9C%9F%E5%AE%9E-ip\" target=\"_blank\"  rel=\"nofollow\" >\u83b7\u53d6\u7528\u6237\u771f\u5b9e IP<\/a><ul><li><a href=\"#http-x-forwarded-for\" target=\"_blank\"  rel=\"nofollow\" >HTTP X-Forwarded-For<\/a><\/li><li><a href=\"#proxy-protocol\" target=\"_blank\"  rel=\"nofollow\" >Proxy Protocol<\/a><\/li><\/ul><\/li><li><a href=\"#%E9%80%9A%E8%BF%87%E5%AF%86%E7%A0%81%E4%BF%9D%E6%8A%A4%E4%BD%A0%E7%9A%84-web-%E6%9C%8D%E5%8A%A1\" target=\"_blank\"  rel=\"nofollow\" >\u901a\u8fc7\u5bc6\u7801\u4fdd\u62a4\u4f60\u7684 web \u670d\u52a1<\/a><\/li><li><a href=\"#%E8%87%AA%E5%AE%9A%E4%B9%89%E4%BA%8C%E7%BA%A7%E5%9F%9F%E5%90%8D\" target=\"_blank\"  rel=\"nofollow\" >\u81ea\u5b9a\u4e49\u4e8c\u7ea7\u57df\u540d<\/a><\/li><li><a href=\"#url-%E8%B7%AF%E7%94%B1\" target=\"_blank\"  rel=\"nofollow\" >URL \u8def\u7531<\/a><\/li><li><a href=\"#%E9%80%9A%E8%BF%87%E4%BB%A3%E7%90%86%E8%BF%9E%E6%8E%A5-frps\" target=\"_blank\"  rel=\"nofollow\" >\u901a\u8fc7\u4ee3\u7406\u8fde\u63a5 frps<\/a><\/li><li><a href=\"#%E8%8C%83%E5%9B%B4%E7%AB%AF%E5%8F%A3%E6%98%A0%E5%B0%84\" target=\"_blank\"  rel=\"nofollow\" >\u8303\u56f4\u7aef\u53e3\u6620\u5c04<\/a><\/li><li><a href=\"#%E6%8F%92%E4%BB%B6\" target=\"_blank\"  rel=\"nofollow\" >\u63d2\u4ef6<\/a><\/li><\/ul><\/li><li><a href=\"#%E5%BC%80%E5%8F%91%E8%AE%A1%E5%88%92\" target=\"_blank\"  rel=\"nofollow\" >\u5f00\u53d1\u8ba1\u5212<\/a><\/li><li><a href=\"#%E4%B8%BA-frp-%E5%81%9A%E8%B4%A1%E7%8C%AE\" target=\"_blank\"  rel=\"nofollow\" >\u4e3a frp \u505a\u8d21\u732e<\/a><\/li><li><a href=\"#%E6%8D%90%E5%8A%A9\" target=\"_blank\"  rel=\"nofollow\" >\u6350\u52a9<\/a><ul><li><a href=\"#%E7%9F%A5%E8%AF%86%E6%98%9F%E7%90%83\" target=\"_blank\"  rel=\"nofollow\" >\u77e5\u8bc6\u661f\u7403<\/a><\/li><li><a href=\"#%E6%94%AF%E4%BB%98%E5%AE%9D%E6%89%AB%E7%A0%81%E6%8D%90%E8%B5%A0\" target=\"_blank\"  rel=\"nofollow\" >\u652f\u4ed8\u5b9d\u626b\u7801\u6350\u8d60<\/a><\/li><li><a href=\"#%E5%BE%AE%E4%BF%A1%E6%94%AF%E4%BB%98%E6%8D%90%E8%B5%A0\" target=\"_blank\"  rel=\"nofollow\" >\u5fae\u4fe1\u652f\u4ed8\u6350\u8d60<\/a><\/li><li><a href=\"#paypal-%E6%8D%90%E8%B5%A0\" target=\"_blank\"  rel=\"nofollow\" >Paypal \u6350\u8d60<\/a><\/li><\/ul><\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">\u5f00\u53d1\u72b6\u6001<\/h2>\n\n\n\n<p>frp \u4ecd\u7136\u5904\u4e8e\u5f00\u53d1\u9636\u6bb5\uff0c\u672a\u7ecf\u5145\u5206\u6d4b\u8bd5\u4e0e\u9a8c\u8bc1\uff0c\u4e0d\u63a8\u8350\u7528\u4e8e\u751f\u4ea7\u73af\u5883\u3002<\/p>\n\n\n\n<p>master \u5206\u652f\u7528\u4e8e\u53d1\u5e03\u7a33\u5b9a\u7248\u672c\uff0cdev \u5206\u652f\u7528\u4e8e\u5f00\u53d1\uff0c\u60a8\u53ef\u4ee5\u5c1d\u8bd5\u4e0b\u8f7d\u6700\u65b0\u7684 release \u7248\u672c\u8fdb\u884c\u6d4b\u8bd5\u3002<\/p>\n\n\n\n<p><strong>\u76ee\u524d\u7684\u4ea4\u4e92\u534f\u8bae\u53ef\u80fd\u968f\u65f6\u6539\u53d8\uff0c\u4e0d\u4fdd\u8bc1\u5411\u540e\u517c\u5bb9\uff0c\u5347\u7ea7\u65b0\u7248\u672c\u65f6\u9700\u8981\u6ce8\u610f\u516c\u544a\u8bf4\u660e\u540c\u65f6\u5347\u7ea7\u670d\u52a1\u7aef\u548c\u5ba2\u6237\u7aef\u3002<\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u67b6\u6784<\/h2>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"\/yijicai\/frp\/raw\/master\/doc\/pic\/architecture.png\" alt=\"architecture\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">\u4f7f\u7528\u793a\u4f8b<\/h2>\n\n\n\n<p>\u6839\u636e\u5bf9\u5e94\u7684\u64cd\u4f5c\u7cfb\u7edf\u53ca\u67b6\u6784\uff0c\u4ece <a href=\"https:\/\/github.com\/fatedier\/frp\/releases\" target=\"_blank\"  rel=\"nofollow\" >Release<\/a> \u9875\u9762\u4e0b\u8f7d\u6700\u65b0\u7248\u672c\u7684\u7a0b\u5e8f\u3002<\/p>\n\n\n\n<p>\u5c06 <strong>frps<\/strong> \u53ca <strong>frps.ini<\/strong> \u653e\u5230\u5177\u6709\u516c\u7f51 IP \u7684\u673a\u5668\u4e0a\u3002<\/p>\n\n\n\n<p>\u5c06 <strong>frpc<\/strong> \u53ca <strong>frpc.ini<\/strong> \u653e\u5230\u5904\u4e8e\u5185\u7f51\u73af\u5883\u7684\u673a\u5668\u4e0a\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u901a\u8fc7 ssh \u8bbf\u95ee\u516c\u53f8\u5185\u7f51\u673a\u5668<\/h3>\n\n\n\n<ol class=\"wp-block-list\"><li>\u4fee\u6539 frps.ini \u6587\u4ef6\uff0c\u8fd9\u91cc\u4f7f\u7528\u4e86\u6700\u7b80\u5316\u7684\u914d\u7f6e\uff1a<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\"># frps.ini\n[common]\nbind_port = 7000<\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"2\"><li>\u542f\u52a8 frps\uff1a<\/li><\/ol>\n\n\n\n<p><code>.\/frps -c .\/frps.ini<\/code><\/p>\n\n\n\n<ol class=\"wp-block-list\" start=\"3\"><li>\u4fee\u6539 frpc.ini \u6587\u4ef6\uff0c\u5047\u8bbe frps \u6240\u5728\u670d\u52a1\u5668\u7684\u516c\u7f51 IP \u4e3a x.x.x.x\uff1b<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\"># frpc.ini\n[common]\nserver_addr = x.x.x.x\nserver_port = 7000\n\n[ssh]\ntype = tcp\nlocal_ip = 127.0.0.1\nlocal_port = 22\nremote_port = 6000<\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"4\"><li>\u542f\u52a8 frpc\uff1a<\/li><\/ol>\n\n\n\n<p><code>.\/frpc -c .\/frpc.ini<\/code><\/p>\n\n\n\n<ol class=\"wp-block-list\" start=\"5\"><li>\u901a\u8fc7 ssh \u8bbf\u95ee\u5185\u7f51\u673a\u5668\uff0c\u5047\u8bbe\u7528\u6237\u540d\u4e3a test\uff1a<\/li><\/ol>\n\n\n\n<p><code>ssh -oPort=6000 test@x.x.x.x<\/code><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u901a\u8fc7\u81ea\u5b9a\u4e49\u57df\u540d\u8bbf\u95ee\u90e8\u7f72\u4e8e\u5185\u7f51\u7684 web \u670d\u52a1<\/h3>\n\n\n\n<p>\u6709\u65f6\u60f3\u8981\u8ba9\u5176\u4ed6\u4eba\u901a\u8fc7\u57df\u540d\u8bbf\u95ee\u6216\u8005\u6d4b\u8bd5\u6211\u4eec\u5728\u672c\u5730\u642d\u5efa\u7684 web \u670d\u52a1\uff0c\u4f46\u662f\u7531\u4e8e\u672c\u5730\u673a\u5668\u6ca1\u6709\u516c\u7f51 IP\uff0c\u65e0\u6cd5\u5c06\u57df\u540d\u89e3\u6790\u5230\u672c\u5730\u7684\u673a\u5668\uff0c\u901a\u8fc7 frp \u5c31\u53ef\u4ee5\u5b9e\u73b0\u8fd9\u4e00\u529f\u80fd\uff0c\u4ee5\u4e0b\u793a\u4f8b\u4e3a http \u670d\u52a1\uff0chttps \u670d\u52a1\u914d\u7f6e\u65b9\u6cd5\u76f8\u540c\uff0c vhost_http_port \u66ff\u6362\u4e3a vhost_https_port\uff0c type \u8bbe\u7f6e\u4e3a https \u5373\u53ef\u3002<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>\u4fee\u6539 frps.ini \u6587\u4ef6\uff0c\u8bbe\u7f6e http \u8bbf\u95ee\u7aef\u53e3\u4e3a 8080\uff1a<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\"># frps.ini\n[common]\nbind_port = 7000\nvhost_http_port = 8080<\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"2\"><li>\u542f\u52a8 frps\uff1a<\/li><\/ol>\n\n\n\n<p><code>.\/frps -c .\/frps.ini<\/code><\/p>\n\n\n\n<ol class=\"wp-block-list\" start=\"3\"><li>\u4fee\u6539 frpc.ini \u6587\u4ef6\uff0c\u5047\u8bbe frps \u6240\u5728\u7684\u670d\u52a1\u5668\u7684 IP \u4e3a x.x.x.x\uff0clocal_port \u4e3a\u672c\u5730\u673a\u5668\u4e0a web \u670d\u52a1\u5bf9\u5e94\u7684\u7aef\u53e3, \u7ed1\u5b9a\u81ea\u5b9a\u4e49\u57df\u540d <code>www.yourdomain.com<\/code>:<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\"># frpc.ini\n[common]\nserver_addr = x.x.x.x\nserver_port = 7000\n\n[web]\ntype = http\nlocal_port = 80\ncustom_domains = www.yourdomain.com<\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"4\"><li>\u542f\u52a8 frpc\uff1a<\/li><\/ol>\n\n\n\n<p><code>.\/frpc -c .\/frpc.ini<\/code><\/p>\n\n\n\n<ol class=\"wp-block-list\" start=\"5\"><li>\u5c06 <code>www.yourdomain.com<\/code> \u7684\u57df\u540d A \u8bb0\u5f55\u89e3\u6790\u5230 IP <code>x.x.x.x<\/code>\uff0c\u5982\u679c\u670d\u52a1\u5668\u5df2\u7ecf\u6709\u5bf9\u5e94\u7684\u57df\u540d\uff0c\u4e5f\u53ef\u4ee5\u5c06 CNAME \u8bb0\u5f55\u89e3\u6790\u5230\u670d\u52a1\u5668\u539f\u5148\u7684\u57df\u540d\u3002<\/li><li>\u901a\u8fc7\u6d4f\u89c8\u5668\u8bbf\u95ee <code>http:\/\/www.yourdomain.com:8080<\/code> \u5373\u53ef\u8bbf\u95ee\u5230\u5904\u4e8e\u5185\u7f51\u673a\u5668\u4e0a\u7684 web \u670d\u52a1\u3002<\/li><\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">\u8f6c\u53d1 DNS \u67e5\u8be2\u8bf7\u6c42<\/h3>\n\n\n\n<p>DNS \u67e5\u8be2\u8bf7\u6c42\u901a\u5e38\u4f7f\u7528 UDP \u534f\u8bae\uff0cfrp \u652f\u6301\u5bf9\u5185\u7f51 UDP \u670d\u52a1\u7684\u7a7f\u900f\uff0c\u914d\u7f6e\u65b9\u5f0f\u548c TCP \u57fa\u672c\u4e00\u81f4\u3002<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>\u4fee\u6539 frps.ini \u6587\u4ef6\uff1a<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\"># frps.ini\n[common]\nbind_port = 7000<\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"2\"><li>\u542f\u52a8 frps\uff1a<\/li><\/ol>\n\n\n\n<p><code>.\/frps -c .\/frps.ini<\/code><\/p>\n\n\n\n<ol class=\"wp-block-list\" start=\"3\"><li>\u4fee\u6539 frpc.ini \u6587\u4ef6\uff0c\u8bbe\u7f6e frps \u6240\u5728\u670d\u52a1\u5668\u7684 IP \u4e3a x.x.x.x\uff0c\u8f6c\u53d1\u5230 Google \u7684 DNS \u67e5\u8be2\u670d\u52a1\u5668 <code>8.8.8.8<\/code> \u7684 udp 53 \u7aef\u53e3\uff1a<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\"># frpc.ini\n[common]\nserver_addr = x.x.x.x\nserver_port = 7000\n\n[dns]\ntype = udp\nlocal_ip = 8.8.8.8\nlocal_port = 53\nremote_port = 6000<\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"4\"><li>\u542f\u52a8 frpc\uff1a<\/li><\/ol>\n\n\n\n<p><code>.\/frpc -c .\/frpc.ini<\/code><\/p>\n\n\n\n<ol class=\"wp-block-list\" start=\"5\"><li>\u901a\u8fc7 dig \u6d4b\u8bd5 UDP \u5305\u8f6c\u53d1\u662f\u5426\u6210\u529f\uff0c\u9884\u671f\u4f1a\u8fd4\u56de <code>www.google.com<\/code> \u57df\u540d\u7684\u89e3\u6790\u7ed3\u679c\uff1a<\/li><\/ol>\n\n\n\n<p><code>dig @x.x.x.x -p 6000 www.google.com<\/code><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u8f6c\u53d1 Unix \u57df\u5957\u63a5\u5b57<\/h3>\n\n\n\n<p>\u901a\u8fc7 tcp \u7aef\u53e3\u8bbf\u95ee\u5185\u7f51\u7684 unix\u57df\u5957\u63a5\u5b57(\u4f8b\u5982\u548c docker daemon \u901a\u4fe1)\u3002<\/p>\n\n\n\n<p>frps \u7684\u90e8\u7f72\u6b65\u9aa4\u540c\u4e0a\u3002<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>\u542f\u52a8 frpc\uff0c\u542f\u7528 <code>unix_domain_socket<\/code> \u63d2\u4ef6\uff0c\u914d\u7f6e\u5982\u4e0b\uff1a<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\"># frpc.ini\n[common]\nserver_addr = x.x.x.x\nserver_port = 7000\n\n[unix_domain_socket]\ntype = tcp\nremote_port = 6000\nplugin = unix_domain_socket\nplugin_unix_path = \/var\/run\/docker.sock<\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"2\"><li>\u901a\u8fc7 curl \u547d\u4ee4\u67e5\u770b docker \u7248\u672c\u4fe1\u606f<\/li><\/ol>\n\n\n\n<p><code>curl http:\/\/x.x.x.x:6000\/version<\/code><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u5bf9\u5916\u63d0\u4f9b\u7b80\u5355\u7684\u6587\u4ef6\u8bbf\u95ee\u670d\u52a1<\/h3>\n\n\n\n<p>\u901a\u8fc7 <code>static_file<\/code> \u63d2\u4ef6\u53ef\u4ee5\u5bf9\u5916\u63d0\u4f9b\u4e00\u4e2a\u7b80\u5355\u7684\u57fa\u4e8e HTTP \u7684\u6587\u4ef6\u8bbf\u95ee\u670d\u52a1\u3002<\/p>\n\n\n\n<p>frps \u7684\u90e8\u7f72\u6b65\u9aa4\u540c\u4e0a\u3002<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>\u542f\u52a8 frpc\uff0c\u542f\u7528 <code>static_file<\/code> \u63d2\u4ef6\uff0c\u914d\u7f6e\u5982\u4e0b\uff1a<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\"># frpc.ini\n[common]\nserver_addr = x.x.x.x\nserver_port = 7000\n\n[test_static_file]\ntype = tcp\nremote_port = 6000\nplugin = static_file\n# \u8981\u5bf9\u5916\u66b4\u9732\u7684\u6587\u4ef6\u76ee\u5f55\nplugin_local_path = \/tmp\/file\n# \u8bbf\u95ee url \u4e2d\u4f1a\u88ab\u53bb\u9664\u7684\u524d\u7f00\uff0c\u4fdd\u7559\u7684\u5185\u5bb9\u5373\u4e3a\u8981\u8bbf\u95ee\u7684\u6587\u4ef6\u8def\u5f84\nplugin_strip_prefix = static\nplugin_http_user = abc\nplugin_http_passwd = abc<\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"2\"><li>\u901a\u8fc7\u6d4f\u89c8\u5668\u8bbf\u95ee <code>http:\/\/x.x.x.x:6000\/static\/<\/code> \u6765\u67e5\u770b\u4f4d\u4e8e <code>\/tmp\/file<\/code> \u76ee\u5f55\u4e0b\u7684\u6587\u4ef6\uff0c\u4f1a\u8981\u6c42\u8f93\u5165\u5df2\u8bbe\u7f6e\u597d\u7684\u7528\u6237\u540d\u548c\u5bc6\u7801\u3002<\/li><\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">\u4e3a\u672c\u5730 HTTP \u670d\u52a1\u542f\u7528 HTTPS<\/h3>\n\n\n\n<p>\u901a\u8fc7 <code>https2http<\/code> \u63d2\u4ef6\u53ef\u4ee5\u8ba9\u672c\u5730 HTTP \u670d\u52a1\u8f6c\u6362\u6210 HTTPS \u670d\u52a1\u5bf9\u5916\u63d0\u4f9b\u3002<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>\u542f\u7528 frpc\uff0c\u542f\u7528 <code>https2http<\/code> \u63d2\u4ef6\uff0c\u914d\u7f6e\u5982\u4e0b:<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\"># frpc.ini\n[common]\nserver_addr = x.x.x.x\nserver_port = 7000\n\n[test_htts2http]\ntype = https\ncustom_domains = test.yourdomain.com\n\nplugin = https2http\nplugin_local_addr = 127.0.0.1:80\n\n# HTTPS \u8bc1\u4e66\u76f8\u5173\u7684\u914d\u7f6e\nplugin_crt_path = .\/server.crt\nplugin_key_path = .\/server.key\nplugin_host_header_rewrite = 127.0.0.1\nplugin_header_X-From-Where = frp<\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"2\"><li>\u901a\u8fc7\u6d4f\u89c8\u5668\u8bbf\u95ee <code>https:\/\/test.yourdomain.com<\/code> \u5373\u53ef\u3002<\/li><\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">\u5b89\u5168\u5730\u66b4\u9732\u5185\u7f51\u670d\u52a1<\/h3>\n\n\n\n<p>\u5bf9\u4e8e\u67d0\u4e9b\u670d\u52a1\u6765\u8bf4\u5982\u679c\u76f4\u63a5\u66b4\u9732\u4e8e\u516c\u7f51\u4e0a\u5c06\u4f1a\u5b58\u5728\u5b89\u5168\u9690\u60a3\u3002<\/p>\n\n\n\n<p>\u4f7f\u7528 <strong>stcp(secret tcp)<\/strong> \u7c7b\u578b\u7684\u4ee3\u7406\u53ef\u4ee5\u907f\u514d\u8ba9\u4efb\u4f55\u4eba\u90fd\u80fd\u8bbf\u95ee\u5230\u8981\u7a7f\u900f\u7684\u670d\u52a1\uff0c\u4f46\u662f\u8bbf\u95ee\u8005\u4e5f\u9700\u8981\u8fd0\u884c\u53e6\u5916\u4e00\u4e2a frpc\u3002<\/p>\n\n\n\n<p>\u4ee5\u4e0b\u793a\u4f8b\u5c06\u4f1a\u521b\u5efa\u4e00\u4e2a\u53ea\u6709\u81ea\u5df1\u80fd\u8bbf\u95ee\u5230\u7684 ssh \u670d\u52a1\u4ee3\u7406\u3002<\/p>\n\n\n\n<p>frps \u7684\u90e8\u7f72\u6b65\u9aa4\u540c\u4e0a\u3002<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>\u542f\u52a8 frpc\uff0c\u8f6c\u53d1\u5185\u7f51\u7684 ssh \u670d\u52a1\uff0c\u914d\u7f6e\u5982\u4e0b\uff0c\u4e0d\u9700\u8981\u6307\u5b9a\u8fdc\u7a0b\u7aef\u53e3\uff1a<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\"># frpc.ini\n[common]\nserver_addr = x.x.x.x\nserver_port = 7000\n\n[secret_ssh]\ntype = stcp\n# \u53ea\u6709 sk \u4e00\u81f4\u7684\u7528\u6237\u624d\u80fd\u8bbf\u95ee\u5230\u6b64\u670d\u52a1\nsk = abcdefg\nlocal_ip = 127.0.0.1\nlocal_port = 22<\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"2\"><li>\u5728\u8981\u8bbf\u95ee\u8fd9\u4e2a\u670d\u52a1\u7684\u673a\u5668\u4e0a\u542f\u52a8\u53e6\u5916\u4e00\u4e2a frpc\uff0c\u914d\u7f6e\u5982\u4e0b\uff1a<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\"># frpc.ini\n[common]\nserver_addr = x.x.x.x\nserver_port = 7000\n\n[secret_ssh_visitor]\ntype = stcp\n# stcp \u7684\u8bbf\u95ee\u8005\nrole = visitor\n# \u8981\u8bbf\u95ee\u7684 stcp \u4ee3\u7406\u7684\u540d\u5b57\nserver_name = secret_ssh\nsk = abcdefg\n# \u7ed1\u5b9a\u672c\u5730\u7aef\u53e3\u7528\u4e8e\u8bbf\u95ee ssh \u670d\u52a1\nbind_addr = 127.0.0.1\nbind_port = 6000<\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"3\"><li>\u901a\u8fc7 ssh \u8bbf\u95ee\u5185\u7f51\u673a\u5668\uff0c\u5047\u8bbe\u7528\u6237\u540d\u4e3a test\uff1a<\/li><\/ol>\n\n\n\n<p><code>ssh -oPort=6000 test@127.0.0.1<\/code><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u70b9\u5bf9\u70b9\u5185\u7f51\u7a7f\u900f<\/h3>\n\n\n\n<p>frp \u63d0\u4f9b\u4e86\u4e00\u79cd\u65b0\u7684\u4ee3\u7406\u7c7b\u578b <strong>xtcp<\/strong> \u7528\u4e8e\u5e94\u5bf9\u5728\u5e0c\u671b\u4f20\u8f93\u5927\u91cf\u6570\u636e\u4e14\u6d41\u91cf\u4e0d\u7ecf\u8fc7\u670d\u52a1\u5668\u7684\u573a\u666f\u3002<\/p>\n\n\n\n<p>\u4f7f\u7528\u65b9\u5f0f\u540c <strong>stcp<\/strong> \u7c7b\u4f3c\uff0c\u9700\u8981\u5728\u4e24\u8fb9\u90fd\u90e8\u7f72\u4e0a frpc \u7528\u4e8e\u5efa\u7acb\u76f4\u63a5\u7684\u8fde\u63a5\u3002<\/p>\n\n\n\n<p>\u76ee\u524d\u5904\u4e8e\u5f00\u53d1\u7684\u521d\u7ea7\u9636\u6bb5\uff0c\u5e76\u4e0d\u80fd\u7a7f\u900f\u6240\u6709\u7c7b\u578b\u7684 NAT \u8bbe\u5907\uff0c\u6240\u4ee5\u7a7f\u900f\u6210\u529f\u7387\u8f83\u4f4e\u3002\u7a7f\u900f\u5931\u8d25\u65f6\u53ef\u4ee5\u5c1d\u8bd5 <strong>stcp<\/strong> \u7684\u65b9\u5f0f\u3002<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>frps \u9664\u6b63\u5e38\u914d\u7f6e\u5916\u9700\u8981\u989d\u5916\u914d\u7f6e\u4e00\u4e2a udp \u7aef\u53e3\u7528\u4e8e\u652f\u6301\u8be5\u7c7b\u578b\u7684\u5ba2\u6237\u7aef:<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\">bind_udp_port = 7001<\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"2\"><li>\u542f\u52a8 frpc\uff0c\u8f6c\u53d1\u5185\u7f51\u7684 ssh \u670d\u52a1\uff0c\u914d\u7f6e\u5982\u4e0b\uff0c\u4e0d\u9700\u8981\u6307\u5b9a\u8fdc\u7a0b\u7aef\u53e3:<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\"># frpc.ini\n[common]\nserver_addr = x.x.x.x\nserver_port = 7000\n\n[p2p_ssh]\ntype = xtcp\n# \u53ea\u6709 sk \u4e00\u81f4\u7684\u7528\u6237\u624d\u80fd\u8bbf\u95ee\u5230\u6b64\u670d\u52a1\nsk = abcdefg\nlocal_ip = 127.0.0.1\nlocal_port = 22<\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"3\"><li>\u5728\u8981\u8bbf\u95ee\u8fd9\u4e2a\u670d\u52a1\u7684\u673a\u5668\u4e0a\u542f\u52a8\u53e6\u5916\u4e00\u4e2a frpc\uff0c\u914d\u7f6e\u5982\u4e0b:<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\"># frpc.ini\n[common]\nserver_addr = x.x.x.x\nserver_port = 7000\n\n[p2p_ssh_visitor]\ntype = xtcp\n# xtcp \u7684\u8bbf\u95ee\u8005\nrole = visitor\n# \u8981\u8bbf\u95ee\u7684 xtcp \u4ee3\u7406\u7684\u540d\u5b57\nserver_name = p2p_ssh\nsk = abcdefg\n# \u7ed1\u5b9a\u672c\u5730\u7aef\u53e3\u7528\u4e8e\u8bbf\u95ee ssh \u670d\u52a1\nbind_addr = 127.0.0.1\nbind_port = 6000<\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"4\"><li>\u901a\u8fc7 ssh \u8bbf\u95ee\u5185\u7f51\u673a\u5668\uff0c\u5047\u8bbe\u7528\u6237\u540d\u4e3a test:<\/li><\/ol>\n\n\n\n<p><code>ssh -oPort=6000 test@127.0.0.1<\/code><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u529f\u80fd\u8bf4\u660e<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">\u914d\u7f6e\u6587\u4ef6<\/h3>\n\n\n\n<p>\u7531\u4e8e frp \u76ee\u524d\u652f\u6301\u7684\u529f\u80fd\u548c\u914d\u7f6e\u9879\u8f83\u591a\uff0c\u672a\u5728\u6587\u6863\u4e2d\u5217\u51fa\u7684\u529f\u80fd\u53ef\u4ee5\u4ece\u5b8c\u6574\u7684\u793a\u4f8b\u914d\u7f6e\u6587\u4ef6\u4e2d\u53d1\u73b0\u3002<\/p>\n\n\n\n<p><a href=\"\/yijicai\/frp\/blob\/master\/conf\/frps_full.ini\" target=\"_blank\"  rel=\"nofollow\" >frps \u5b8c\u6574\u914d\u7f6e\u6587\u4ef6<\/a><\/p>\n\n\n\n<p><a href=\"\/yijicai\/frp\/blob\/master\/conf\/frpc_full.ini\" target=\"_blank\"  rel=\"nofollow\" >frpc \u5b8c\u6574\u914d\u7f6e\u6587\u4ef6<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u914d\u7f6e\u6587\u4ef6\u6a21\u7248\u6e32\u67d3<\/h3>\n\n\n\n<p>\u914d\u7f6e\u6587\u4ef6\u652f\u6301\u4f7f\u7528\u7cfb\u7edf\u73af\u5883\u53d8\u91cf\u8fdb\u884c\u6a21\u7248\u6e32\u67d3\uff0c\u6a21\u7248\u683c\u5f0f\u91c7\u7528 Go \u7684\u6807\u51c6\u683c\u5f0f\u3002<\/p>\n\n\n\n<p>\u793a\u4f8b\u914d\u7f6e\u5982\u4e0b:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># frpc.ini\n[common]\nserver_addr = {{ .Envs.FRP_SERVER_ADDR }}\nserver_port = 7000\n\n[ssh]\ntype = tcp\nlocal_ip = 127.0.0.1\nlocal_port = 22\nremote_port = {{ .Envs.FRP_SSH_REMOTE_PORT }}<\/pre>\n\n\n\n<p>\u542f\u52a8 frpc \u7a0b\u5e8f:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">export FRP_SERVER_ADDR=\"x.x.x.x\"\nexport FRP_SSH_REMOTE_PORT=\"6000\"\n.\/frpc -c .\/frpc.ini<\/pre>\n\n\n\n<p>frpc \u4f1a\u81ea\u52a8\u4f7f\u7528\u73af\u5883\u53d8\u91cf\u6e32\u67d3\u914d\u7f6e\u6587\u4ef6\u6a21\u7248\uff0c\u6240\u6709\u73af\u5883\u53d8\u91cf\u9700\u8981\u4ee5 <code>.Envs<\/code> \u4e3a\u524d\u7f00\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Dashboard<\/h3>\n\n\n\n<p>\u901a\u8fc7\u6d4f\u89c8\u5668\u67e5\u770b frp \u7684\u72b6\u6001\u4ee5\u53ca\u4ee3\u7406\u7edf\u8ba1\u4fe1\u606f\u5c55\u793a\u3002<\/p>\n\n\n\n<p><strong>\u6ce8\uff1aDashboard \u5c1a\u672a\u9488\u5bf9\u5927\u91cf\u7684 proxy \u6570\u636e\u5c55\u793a\u505a\u4f18\u5316\uff0c\u5982\u679c\u51fa\u73b0 Dashboard \u8bbf\u95ee\u8f83\u6162\u7684\u60c5\u51b5\uff0c\u8bf7\u4e0d\u8981\u542f\u7528\u6b64\u529f\u80fd\u3002<\/strong><\/p>\n\n\n\n<p>\u9700\u8981\u5728 frps.ini \u4e2d\u6307\u5b9a dashboard \u670d\u52a1\u4f7f\u7528\u7684\u7aef\u53e3\uff0c\u5373\u53ef\u5f00\u542f\u6b64\u529f\u80fd\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[common]\ndashboard_port = 7500\n# dashboard \u7528\u6237\u540d\u5bc6\u7801\uff0c\u9ed8\u8ba4\u90fd\u4e3a admin\ndashboard_user = admin\ndashboard_pwd = admin<\/pre>\n\n\n\n<p>\u6253\u5f00\u6d4f\u89c8\u5668\u901a\u8fc7 <code>http:\/\/[server_addr]:7500<\/code> \u8bbf\u95ee dashboard \u754c\u9762\uff0c\u7528\u6237\u540d\u5bc6\u7801\u9ed8\u8ba4\u4e3a <code>admin<\/code>\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"\/yijicai\/frp\/raw\/master\/doc\/pic\/dashboard.png\" alt=\"dashboard\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Admin UI<\/h3>\n\n\n\n<p>Admin UI \u53ef\u4ee5\u5e2e\u52a9\u7528\u6237\u901a\u8fc7\u6d4f\u89c8\u5668\u6765\u67e5\u8be2\u548c\u7ba1\u7406\u5ba2\u6237\u7aef\u7684 proxy \u72b6\u6001\u548c\u914d\u7f6e\u3002<\/p>\n\n\n\n<p>\u9700\u8981\u5728 frpc.ini \u4e2d\u6307\u5b9a admin \u670d\u52a1\u4f7f\u7528\u7684\u7aef\u53e3\uff0c\u5373\u53ef\u5f00\u542f\u6b64\u529f\u80fd\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[common]\nadmin_addr = 127.0.0.1\nadmin_port = 7400\nadmin_user = admin\nadmin_pwd = admin<\/pre>\n\n\n\n<p>\u6253\u5f00\u6d4f\u89c8\u5668\u901a\u8fc7 <code>http:\/\/127.0.0.1:7400<\/code> \u8bbf\u95ee Admin UI\uff0c\u7528\u6237\u540d\u5bc6\u7801\u9ed8\u8ba4\u4e3a <code>admin<\/code>\u3002<\/p>\n\n\n\n<p>\u5982\u679c\u60f3\u8981\u5728\u5916\u7f51\u73af\u5883\u8bbf\u95ee Admin UI\uff0c\u5c06 7400 \u7aef\u53e3\u6620\u5c04\u51fa\u53bb\u5373\u53ef\uff0c\u4f46\u9700\u8981\u91cd\u89c6\u5b89\u5168\u98ce\u9669\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u8eab\u4efd\u9a8c\u8bc1<\/h3>\n\n\n\n<p>\u670d\u52a1\u7aef\u548c\u5ba2\u6237\u7aef\u7684 common \u914d\u7f6e\u4e2d\u7684 <code>token<\/code> \u53c2\u6570\u4e00\u81f4\u5219\u8eab\u4efd\u9a8c\u8bc1\u901a\u8fc7\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u52a0\u5bc6\u4e0e\u538b\u7f29<\/h3>\n\n\n\n<p>\u8fd9\u4e24\u4e2a\u529f\u80fd\u9ed8\u8ba4\u662f\u4e0d\u5f00\u542f\u7684\uff0c\u9700\u8981\u5728 frpc.ini \u4e2d\u901a\u8fc7\u914d\u7f6e\u6765\u4e3a\u6307\u5b9a\u7684\u4ee3\u7406\u542f\u7528\u52a0\u5bc6\u4e0e\u538b\u7f29\u7684\u529f\u80fd\uff0c\u538b\u7f29\u7b97\u6cd5\u4f7f\u7528 snappy\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># frpc.ini\n[ssh]\ntype = tcp\nlocal_port = 22\nremote_port = 6000\nuse_encryption = true\nuse_compression = true<\/pre>\n\n\n\n<p>\u5982\u679c\u516c\u53f8\u5185\u7f51\u9632\u706b\u5899\u5bf9\u5916\u7f51\u8bbf\u95ee\u8fdb\u884c\u4e86\u6d41\u91cf\u8bc6\u522b\u4e0e\u5c4f\u853d\uff0c\u4f8b\u5982\u7981\u6b62\u4e86 ssh \u534f\u8bae\u7b49\uff0c\u901a\u8fc7\u8bbe\u7f6e <code>use_encryption = true<\/code>\uff0c\u5c06 frpc \u4e0e frps \u4e4b\u95f4\u7684\u901a\u4fe1\u5185\u5bb9\u52a0\u5bc6\u4f20\u8f93\uff0c\u5c06\u4f1a\u6709\u6548\u9632\u6b62\u6d41\u91cf\u88ab\u62e6\u622a\u3002<\/p>\n\n\n\n<p>\u5982\u679c\u4f20\u8f93\u7684\u62a5\u6587\u957f\u5ea6\u8f83\u957f\uff0c\u901a\u8fc7\u8bbe\u7f6e <code>use_compression = true<\/code> \u5bf9\u4f20\u8f93\u5185\u5bb9\u8fdb\u884c\u538b\u7f29\uff0c\u53ef\u4ee5\u6709\u6548\u51cf\u5c0f frpc \u4e0e frps \u4e4b\u95f4\u7684\u7f51\u7edc\u6d41\u91cf\uff0c\u52a0\u5feb\u6d41\u91cf\u8f6c\u53d1\u901f\u5ea6\uff0c\u4f46\u662f\u4f1a\u989d\u5916\u6d88\u8017\u4e00\u4e9b cpu \u8d44\u6e90\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">TLS<\/h4>\n\n\n\n<p>\u4ece v0.25.0 \u7248\u672c\u5f00\u59cb frpc \u548c frps \u4e4b\u95f4\u652f\u6301\u901a\u8fc7 TLS \u534f\u8bae\u52a0\u5bc6\u4f20\u8f93\u3002\u901a\u8fc7\u5728 <code>frpc.ini<\/code> \u7684 <code>common<\/code> \u4e2d\u914d\u7f6e <code>tls_enable = true<\/code> \u6765\u542f\u7528\u6b64\u529f\u80fd\uff0c\u5b89\u5168\u6027\u66f4\u9ad8\u3002<\/p>\n\n\n\n<p>\u4e3a\u4e86\u7aef\u53e3\u590d\u7528\uff0cfrp \u5efa\u7acb TLS \u8fde\u63a5\u7684\u7b2c\u4e00\u4e2a\u5b57\u8282\u4e3a 0x17\u3002<\/p>\n\n\n\n<p><strong>\u6ce8\u610f: \u542f\u7528\u6b64\u529f\u80fd\u540e\u9664 xtcp \u5916\uff0c\u4e0d\u9700\u8981\u518d\u8bbe\u7f6e use_encryption\u3002<\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u5ba2\u6237\u7aef\u70ed\u52a0\u8f7d\u914d\u7f6e\u6587\u4ef6<\/h3>\n\n\n\n<p>\u5f53\u4fee\u6539\u4e86 frpc \u4e2d\u7684\u4ee3\u7406\u914d\u7f6e\uff0c\u53ef\u4ee5\u901a\u8fc7 <code>frpc reload<\/code> \u547d\u4ee4\u6765\u52a8\u6001\u52a0\u8f7d\u914d\u7f6e\u6587\u4ef6\uff0c\u901a\u5e38\u4f1a\u5728 10 \u79d2\u5185\u5b8c\u6210\u4ee3\u7406\u7684\u66f4\u65b0\u3002<\/p>\n\n\n\n<p>\u542f\u7528\u6b64\u529f\u80fd\u9700\u8981\u5728 frpc \u4e2d\u542f\u7528 admin \u7aef\u53e3\uff0c\u7528\u4e8e\u63d0\u4f9b API \u670d\u52a1\u3002\u914d\u7f6e\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># frpc.ini\n[common]\nadmin_addr = 127.0.0.1\nadmin_port = 7400<\/pre>\n\n\n\n<p>\u4e4b\u540e\u6267\u884c\u91cd\u542f\u547d\u4ee4\uff1a<\/p>\n\n\n\n<p><code>frpc reload -c .\/frpc.ini<\/code><\/p>\n\n\n\n<p>\u7b49\u5f85\u4e00\u6bb5\u65f6\u95f4\u540e\u5ba2\u6237\u7aef\u4f1a\u6839\u636e\u65b0\u7684\u914d\u7f6e\u6587\u4ef6\u521b\u5efa\u3001\u66f4\u65b0\u3001\u5220\u9664\u4ee3\u7406\u3002<\/p>\n\n\n\n<p><strong>\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c[common] \u4e2d\u7684\u53c2\u6570\u9664\u4e86 start \u5916\u76ee\u524d\u65e0\u6cd5\u88ab\u4fee\u6539\u3002<\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u5ba2\u6237\u7aef\u67e5\u770b\u4ee3\u7406\u72b6\u6001<\/h3>\n\n\n\n<p>frpc \u652f\u6301\u901a\u8fc7 <code>frpc status -c .\/frpc.ini<\/code> \u547d\u4ee4\u67e5\u770b\u4ee3\u7406\u7684\u72b6\u6001\u4fe1\u606f\uff0c\u6b64\u529f\u80fd\u9700\u8981\u5728 frpc \u4e2d\u914d\u7f6e admin \u7aef\u53e3\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u7aef\u53e3\u767d\u540d\u5355<\/h3>\n\n\n\n<p>\u4e3a\u4e86\u9632\u6b62\u7aef\u53e3\u88ab\u6ee5\u7528\uff0c\u53ef\u4ee5\u624b\u52a8\u6307\u5b9a\u5141\u8bb8\u54ea\u4e9b\u7aef\u53e3\u88ab\u4f7f\u7528\uff0c\u5728 frps.ini \u4e2d\u901a\u8fc7 <code>allow_ports<\/code> \u6765\u6307\u5b9a\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># frps.ini\n[common]\nallow_ports = 2000-3000,3001,3003,4000-50000<\/pre>\n\n\n\n<p><code>allow_ports<\/code> \u53ef\u4ee5\u914d\u7f6e\u5141\u8bb8\u4f7f\u7528\u7684\u67d0\u4e2a\u6307\u5b9a\u7aef\u53e3\u6216\u8005\u662f\u4e00\u4e2a\u8303\u56f4\u5185\u7684\u6240\u6709\u7aef\u53e3\uff0c\u4ee5 <code>,<\/code> \u5206\u9694\uff0c\u6307\u5b9a\u7684\u8303\u56f4\u4ee5 <code>-<\/code> \u5206\u9694\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u7aef\u53e3\u590d\u7528<\/h3>\n\n\n\n<p>\u76ee\u524d frps \u4e2d\u7684 <code>vhost_http_port<\/code> \u548c <code>vhost_https_port<\/code> \u652f\u6301\u914d\u7f6e\u6210\u548c <code>bind_port<\/code> \u4e3a\u540c\u4e00\u4e2a\u7aef\u53e3\uff0cfrps \u4f1a\u5bf9\u8fde\u63a5\u7684\u534f\u8bae\u8fdb\u884c\u5206\u6790\uff0c\u4e4b\u540e\u8fdb\u884c\u4e0d\u540c\u7684\u5904\u7406\u3002<\/p>\n\n\n\n<p>\u4f8b\u5982\u5728\u67d0\u4e9b\u9650\u5236\u8f83\u4e25\u683c\u7684\u7f51\u7edc\u73af\u5883\u4e2d\uff0c\u53ef\u4ee5\u5c06 <code>bind_port<\/code> \u548c <code>vhost_https_port<\/code> \u90fd\u8bbe\u7f6e\u4e3a 443\u3002<\/p>\n\n\n\n<p>\u540e\u7eed\u4f1a\u5c1d\u8bd5\u5141\u8bb8\u591a\u4e2a proxy \u7ed1\u5b9a\u540c\u4e00\u4e2a\u8fdc\u7aef\u7aef\u53e3\u7684\u4e0d\u540c\u534f\u8bae\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u9650\u901f<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">\u4ee3\u7406\u9650\u901f<\/h4>\n\n\n\n<p>\u76ee\u524d\u652f\u6301\u5728\u5ba2\u6237\u7aef\u7684\u4ee3\u7406\u914d\u7f6e\u4e2d\u8bbe\u7f6e\u4ee3\u7406\u7ea7\u522b\u7684\u9650\u901f\uff0c\u9650\u5236\u5355\u4e2a proxy \u53ef\u4ee5\u5360\u7528\u7684\u5e26\u5bbd\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># frpc.ini\n[ssh]\ntype = tcp\nlocal_port = 22\nremote_port = 6000\nbandwith_limit = 1MB<\/pre>\n\n\n\n<p>\u5728\u4ee3\u7406\u914d\u7f6e\u4e2d\u589e\u52a0 <code>bandwith_limit<\/code> \u5b57\u6bb5\u542f\u7528\u6b64\u529f\u80fd\uff0c\u76ee\u524d\u4ec5\u652f\u6301 <code>MB<\/code> \u548c <code>KB<\/code> \u5355\u4f4d\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">TCP \u591a\u8def\u590d\u7528<\/h3>\n\n\n\n<p>\u4ece v0.10.0 \u7248\u672c\u5f00\u59cb\uff0c\u5ba2\u6237\u7aef\u548c\u670d\u52a1\u5668\u7aef\u4e4b\u95f4\u7684\u8fde\u63a5\u652f\u6301\u591a\u8def\u590d\u7528\uff0c\u4e0d\u518d\u9700\u8981\u4e3a\u6bcf\u4e00\u4e2a\u7528\u6237\u8bf7\u6c42\u521b\u5efa\u4e00\u4e2a\u8fde\u63a5\uff0c\u4f7f\u8fde\u63a5\u5efa\u7acb\u7684\u5ef6\u8fdf\u964d\u4f4e\uff0c\u5e76\u4e14\u907f\u514d\u4e86\u5927\u91cf\u6587\u4ef6\u63cf\u8ff0\u7b26\u7684\u5360\u7528\uff0c\u4f7f frp \u53ef\u4ee5\u627f\u8f7d\u66f4\u9ad8\u7684\u5e76\u53d1\u6570\u3002<\/p>\n\n\n\n<p>\u8be5\u529f\u80fd\u9ed8\u8ba4\u542f\u7528\uff0c\u5982\u9700\u5173\u95ed\uff0c\u53ef\u4ee5\u5728 frps.ini \u548c frpc.ini \u4e2d\u914d\u7f6e\uff0c\u8be5\u914d\u7f6e\u9879\u5728\u670d\u52a1\u7aef\u548c\u5ba2\u6237\u7aef\u5fc5\u987b\u4e00\u81f4\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># frps.ini \u548c frpc.ini \u4e2d\n[common]\ntcp_mux = false<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u5e95\u5c42\u901a\u4fe1\u53ef\u9009 kcp \u534f\u8bae<\/h3>\n\n\n\n<p>\u5e95\u5c42\u901a\u4fe1\u534f\u8bae\u652f\u6301\u9009\u62e9 kcp \u534f\u8bae\uff0c\u5728\u5f31\u7f51\u73af\u5883\u4e0b\u4f20\u8f93\u6548\u7387\u63d0\u5347\u660e\u663e\uff0c\u4f46\u662f\u4f1a\u6709\u4e00\u4e9b\u989d\u5916\u7684\u6d41\u91cf\u6d88\u8017\u3002<\/p>\n\n\n\n<p>\u5f00\u542f kcp \u534f\u8bae\u652f\u6301\uff1a<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>\u5728 frps.ini \u4e2d\u542f\u7528 kcp \u534f\u8bae\u652f\u6301\uff0c\u6307\u5b9a\u4e00\u4e2a udp \u7aef\u53e3\u7528\u4e8e\u63a5\u6536\u5ba2\u6237\u7aef\u8bf7\u6c42\uff1a<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\"># frps.ini\n[common]\nbind_port = 7000\n# kcp \u7ed1\u5b9a\u7684\u662f udp \u7aef\u53e3\uff0c\u53ef\u4ee5\u548c bind_port \u4e00\u6837\nkcp_bind_port = 7000<\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"2\"><li>\u5728 frpc.ini \u6307\u5b9a\u9700\u8981\u4f7f\u7528\u7684\u534f\u8bae\u7c7b\u578b\uff0c\u76ee\u524d\u53ea\u652f\u6301 tcp \u548c kcp\u3002\u5176\u4ed6\u4ee3\u7406\u914d\u7f6e\u4e0d\u9700\u8981\u53d8\u66f4\uff1a<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\"># frpc.ini\n[common]\nserver_addr = x.x.x.x\n# server_port \u6307\u5b9a\u4e3a frps \u7684 kcp_bind_port\nserver_port = 7000\nprotocol = kcp<\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"3\"><li>\u50cf\u4e4b\u524d\u4e00\u6837\u4f7f\u7528 frp\uff0c\u9700\u8981\u6ce8\u610f\u5f00\u653e\u76f8\u5173\u673a\u5668\u4e0a\u7684 udp \u7684\u7aef\u53e3\u7684\u8bbf\u95ee\u6743\u9650\u3002<\/li><\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">\u8fde\u63a5\u6c60<\/h3>\n\n\n\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u5f53\u7528\u6237\u8bf7\u6c42\u5efa\u7acb\u8fde\u63a5\u540e\uff0cfrps \u624d\u4f1a\u8bf7\u6c42 frpc \u4e3b\u52a8\u4e0e\u540e\u7aef\u670d\u52a1\u5efa\u7acb\u4e00\u4e2a\u8fde\u63a5\u3002\u5f53\u4e3a\u6307\u5b9a\u7684\u4ee3\u7406\u542f\u7528\u8fde\u63a5\u6c60\u540e\uff0cfrp \u4f1a\u9884\u5148\u548c\u540e\u7aef\u670d\u52a1\u5efa\u7acb\u8d77\u6307\u5b9a\u6570\u91cf\u7684\u8fde\u63a5\uff0c\u6bcf\u6b21\u63a5\u6536\u5230\u7528\u6237\u8bf7\u6c42\u540e\uff0c\u4f1a\u4ece\u8fde\u63a5\u6c60\u4e2d\u53d6\u51fa\u4e00\u4e2a\u8fde\u63a5\u548c\u7528\u6237\u8fde\u63a5\u5173\u8054\u8d77\u6765\uff0c\u907f\u514d\u4e86\u7b49\u5f85\u4e0e\u540e\u7aef\u670d\u52a1\u5efa\u7acb\u8fde\u63a5\u4ee5\u53ca frpc \u548c frps \u4e4b\u95f4\u4f20\u9012\u63a7\u5236\u4fe1\u606f\u7684\u65f6\u95f4\u3002<\/p>\n\n\n\n<p>\u8fd9\u4e00\u529f\u80fd\u6bd4\u8f83\u9002\u5408\u6709\u5927\u91cf\u77ed\u8fde\u63a5\u8bf7\u6c42\u65f6\u5f00\u542f\u3002<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>\u9996\u5148\u53ef\u4ee5\u5728 frps.ini \u4e2d\u8bbe\u7f6e\u6bcf\u4e2a\u4ee3\u7406\u53ef\u4ee5\u521b\u5efa\u7684\u8fde\u63a5\u6c60\u4e0a\u9650\uff0c\u907f\u514d\u5927\u91cf\u8d44\u6e90\u5360\u7528\uff0c\u5ba2\u6237\u7aef\u8bbe\u7f6e\u8d85\u8fc7\u6b64\u914d\u7f6e\u540e\u4f1a\u88ab\u8c03\u6574\u5230\u5f53\u524d\u503c\uff1a<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\"># frps.ini\n[common]\nmax_pool_count = 5<\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"2\"><li>\u5728 frpc.ini \u4e2d\u4e3a\u5ba2\u6237\u7aef\u542f\u7528\u8fde\u63a5\u6c60\uff0c\u6307\u5b9a\u9884\u521b\u5efa\u8fde\u63a5\u7684\u6570\u91cf\uff1a<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\"># frpc.ini\n[common]\npool_count = 1<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u8d1f\u8f7d\u5747\u8861<\/h3>\n\n\n\n<p>\u53ef\u4ee5\u5c06\u591a\u4e2a\u76f8\u540c\u7c7b\u578b\u7684 proxy \u52a0\u5165\u5230\u540c\u4e00\u4e2a group \u4e2d\uff0c\u4ece\u800c\u5b9e\u73b0\u8d1f\u8f7d\u5747\u8861\u7684\u529f\u80fd\u3002<\/p>\n\n\n\n<p>\u76ee\u524d\u53ea\u652f\u6301 TCP \u548c HTTP \u7c7b\u578b\u7684 proxy\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># frpc.ini\n[test1]\ntype = tcp\nlocal_port = 8080\nremote_port = 80\ngroup = web\ngroup_key = 123\n\n[test2]\ntype = tcp\nlocal_port = 8081\nremote_port = 80\ngroup = web\ngroup_key = 123<\/pre>\n\n\n\n<p>\u7528\u6237\u8fde\u63a5 frps \u670d\u52a1\u5668\u7684 80 \u7aef\u53e3\uff0cfrps \u4f1a\u5c06\u63a5\u6536\u5230\u7684\u7528\u6237\u8fde\u63a5\u968f\u673a\u5206\u53d1\u7ed9\u5176\u4e2d\u4e00\u4e2a\u5b58\u6d3b\u7684 proxy\u3002\u8fd9\u6837\u53ef\u4ee5\u5728\u4e00\u53f0 frpc \u673a\u5668\u6302\u6389\u540e\u4ecd\u7136\u6709\u5176\u4ed6\u8282\u70b9\u80fd\u591f\u63d0\u4f9b\u670d\u52a1\u3002<\/p>\n\n\n\n<p>TCP \u7c7b\u578b\u4ee3\u7406\u8981\u6c42 <code>group_key<\/code> \u76f8\u540c\uff0c\u505a\u6743\u9650\u9a8c\u8bc1\uff0c\u4e14 <code>remote_port<\/code> \u76f8\u540c\u3002<\/p>\n\n\n\n<p>HTTP \u7c7b\u578b\u4ee3\u7406\u8981\u6c42 <code>group_key, custom_domains \u6216 subdomain \u548c locations<\/code> \u76f8\u540c\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u5065\u5eb7\u68c0\u67e5<\/h3>\n\n\n\n<p>\u901a\u8fc7\u7ed9 proxy \u52a0\u4e0a\u5065\u5eb7\u68c0\u67e5\u7684\u529f\u80fd\uff0c\u53ef\u4ee5\u5728\u8981\u53cd\u5411\u4ee3\u7406\u7684\u670d\u52a1\u51fa\u73b0\u6545\u969c\u65f6\uff0c\u5c06\u8fd9\u4e2a\u670d\u52a1\u4ece frps \u4e2d\u6458\u9664\uff0c\u642d\u914d\u8d1f\u8f7d\u5747\u8861\u7684\u529f\u80fd\uff0c\u53ef\u4ee5\u7528\u6765\u5b9e\u73b0\u9ad8\u53ef\u7528\u7684\u67b6\u6784\uff0c\u907f\u514d\u670d\u52a1\u5355\u70b9\u6545\u969c\u3002<\/p>\n\n\n\n<p>\u5728\u6bcf\u4e00\u4e2a proxy \u7684\u914d\u7f6e\u4e0b\u52a0\u4e0a <code>health_check_type = {type}<\/code> \u6765\u542f\u7528\u5065\u5eb7\u68c0\u67e5\u529f\u80fd\u3002<\/p>\n\n\n\n<p><strong>type<\/strong> \u76ee\u524d\u53ef\u9009 tcp \u548c http\u3002<\/p>\n\n\n\n<p>tcp \u53ea\u8981\u80fd\u591f\u5efa\u7acb\u8fde\u63a5\u5219\u8ba4\u4e3a\u670d\u52a1\u6b63\u5e38\uff0chttp \u4f1a\u53d1\u9001\u4e00\u4e2a http \u8bf7\u6c42\uff0c\u670d\u52a1\u9700\u8981\u8fd4\u56de 2xx \u7684\u72b6\u6001\u7801\u624d\u4f1a\u88ab\u8ba4\u4e3a\u6b63\u5e38\u3002<\/p>\n\n\n\n<p>tcp \u793a\u4f8b\u914d\u7f6e\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># frpc.ini\n[test1]\ntype = tcp\nlocal_port = 22\nremote_port = 6000\n# \u542f\u7528\u5065\u5eb7\u68c0\u67e5\uff0c\u7c7b\u578b\u4e3a tcp\nhealth_check_type = tcp\n# \u5efa\u7acb\u8fde\u63a5\u8d85\u65f6\u65f6\u95f4\u4e3a 3 \u79d2\nhealth_check_timeout_s = 3\n# \u8fde\u7eed 3 \u6b21\u68c0\u67e5\u5931\u8d25\uff0c\u6b64 proxy \u4f1a\u88ab\u6458\u9664\nhealth_check_max_failed = 3\n# \u6bcf\u9694 10 \u79d2\u8fdb\u884c\u4e00\u6b21\u5065\u5eb7\u68c0\u67e5\nhealth_check_interval_s = 10<\/pre>\n\n\n\n<p>http \u793a\u4f8b\u914d\u7f6e\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># frpc.ini\n[web]\ntype = http\nlocal_ip = 127.0.0.1\nlocal_port = 80\ncustom_domains = test.yourdomain.com\n# \u542f\u7528\u5065\u5eb7\u68c0\u67e5\uff0c\u7c7b\u578b\u4e3a http\nhealth_check_type = http\n# \u5065\u5eb7\u68c0\u67e5\u53d1\u9001 http \u8bf7\u6c42\u7684 url\uff0c\u540e\u7aef\u670d\u52a1\u9700\u8981\u8fd4\u56de 2xx \u7684 http \u72b6\u6001\u7801\nhealth_check_url = \/status\nhealth_check_interval_s = 10\nhealth_check_max_failed = 3\nhealth_check_timeout_s = 3<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u4fee\u6539 Host Header<\/h3>\n\n\n\n<p>\u901a\u5e38\u60c5\u51b5\u4e0b frp \u4e0d\u4f1a\u4fee\u6539\u8f6c\u53d1\u7684\u4efb\u4f55\u6570\u636e\u3002\u4f46\u6709\u4e00\u4e9b\u540e\u7aef\u670d\u52a1\u4f1a\u6839\u636e http \u8bf7\u6c42 header \u4e2d\u7684 host \u5b57\u6bb5\u6765\u5c55\u73b0\u4e0d\u540c\u7684\u7f51\u7ad9\uff0c\u4f8b\u5982 nginx \u7684\u865a\u62df\u4e3b\u673a\u670d\u52a1\uff0c\u542f\u7528 host-header \u7684\u4fee\u6539\u529f\u80fd\u53ef\u4ee5\u52a8\u6001\u4fee\u6539 http \u8bf7\u6c42\u4e2d\u7684 host \u5b57\u6bb5\u3002\u8be5\u529f\u80fd\u4ec5\u9650\u4e8e http \u7c7b\u578b\u7684\u4ee3\u7406\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># frpc.ini\n[web]\ntype = http\nlocal_port = 80\ncustom_domains = test.yourdomain.com\nhost_header_rewrite = dev.yourdomain.com<\/pre>\n\n\n\n<p>\u539f\u6765 http \u8bf7\u6c42\u4e2d\u7684 host \u5b57\u6bb5 <code>test.yourdomain.com<\/code> \u8f6c\u53d1\u5230\u540e\u7aef\u670d\u52a1\u65f6\u4f1a\u88ab\u66ff\u6362\u4e3a <code>dev.yourdomain.com<\/code>\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u8bbe\u7f6e HTTP \u8bf7\u6c42\u7684 header<\/h3>\n\n\n\n<p>\u5bf9\u4e8e <code>type = http<\/code> \u7684\u4ee3\u7406\uff0c\u53ef\u4ee5\u8bbe\u7f6e\u5728\u8f6c\u53d1\u4e2d\u52a8\u6001\u6dfb\u52a0\u7684 header \u53c2\u6570\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># frpc.ini\n[web]\ntype = http\nlocal_port = 80\ncustom_domains = test.yourdomain.com\nhost_header_rewrite = dev.yourdomain.com\nheader_X-From-Where = frp<\/pre>\n\n\n\n<p>\u5bf9\u4e8e\u53c2\u6570\u914d\u7f6e\u4e2d\u6240\u6709\u4ee5 <code>header_<\/code> \u5f00\u5934\u7684\u53c2\u6570(\u652f\u6301\u540c\u65f6\u914d\u7f6e\u591a\u4e2a)\uff0c\u90fd\u4f1a\u88ab\u6dfb\u52a0\u5230 http \u8bf7\u6c42\u7684 header \u4e2d\uff0c\u6839\u636e\u5982\u4e0a\u7684\u914d\u7f6e\uff0c\u4f1a\u5728\u8bf7\u6c42\u7684 header \u4e2d\u52a0\u4e0a <code>X-From-Where: frp<\/code>\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u83b7\u53d6\u7528\u6237\u771f\u5b9e IP<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">HTTP X-Forwarded-For<\/h4>\n\n\n\n<p>\u76ee\u524d\u53ea\u6709 <strong>http<\/strong> \u7c7b\u578b\u7684\u4ee3\u7406\u652f\u6301\u8fd9\u4e00\u529f\u80fd\uff0c\u53ef\u4ee5\u901a\u8fc7\u7528\u6237\u8bf7\u6c42\u7684 header \u4e2d\u7684 <code>X-Forwarded-For<\/code> \u6765\u83b7\u53d6\u7528\u6237\u771f\u5b9e IP\uff0c\u9ed8\u8ba4\u542f\u7528\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Proxy Protocol<\/h4>\n\n\n\n<p>frp \u652f\u6301\u901a\u8fc7 <strong>Proxy Protocol<\/strong> \u534f\u8bae\u6765\u4f20\u9012\u7ecf\u8fc7 frp \u4ee3\u7406\u7684\u8bf7\u6c42\u7684\u771f\u5b9e IP\uff0c\u6b64\u529f\u80fd\u652f\u6301\u6240\u6709\u4ee5 TCP \u4e3a\u5e95\u5c42\u534f\u8bae\u7684\u7c7b\u578b\uff0c\u4e0d\u652f\u6301 UDP\u3002<\/p>\n\n\n\n<p><strong>Proxy Protocol<\/strong> \u529f\u80fd\u542f\u7528\u540e\uff0cfrpc \u5728\u548c\u672c\u5730\u670d\u52a1\u5efa\u7acb\u8fde\u63a5\u540e\uff0c\u4f1a\u5148\u53d1\u9001\u4e00\u6bb5 <strong>Proxy Protocol<\/strong> \u7684\u534f\u8bae\u5185\u5bb9\u7ed9\u672c\u5730\u670d\u52a1\uff0c\u672c\u5730\u670d\u52a1\u901a\u8fc7\u89e3\u6790\u8fd9\u4e00\u5185\u5bb9\u53ef\u4ee5\u83b7\u5f97\u8bbf\u95ee\u7528\u6237\u7684\u771f\u5b9e IP\u3002\u6240\u4ee5\u4e0d\u4ec5\u4ec5\u662f HTTP \u670d\u52a1\uff0c\u4efb\u4f55\u7684 TCP \u670d\u52a1\uff0c\u53ea\u8981\u652f\u6301\u8fd9\u4e00\u534f\u8bae\uff0c\u90fd\u53ef\u4ee5\u83b7\u5f97\u7528\u6237\u7684\u771f\u5b9e IP \u5730\u5740\u3002<\/p>\n\n\n\n<p>\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u5728\u4ee3\u7406\u914d\u7f6e\u4e2d\u5982\u679c\u8981\u542f\u7528\u6b64\u529f\u80fd\uff0c\u9700\u8981\u672c\u5730\u7684\u670d\u52a1\u80fd\u591f\u652f\u6301 <strong>Proxy Protocol<\/strong> \u8fd9\u4e00\u534f\u8bae\uff0c\u76ee\u524d nginx \u548c haproxy \u90fd\u80fd\u591f\u5f88\u597d\u7684\u652f\u6301\u3002<\/p>\n\n\n\n<p>\u8fd9\u91cc\u4ee5 https \u7c7b\u578b\u4e3a\u4f8b:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># frpc.ini\n[web]\ntype = https\nlocal_port = 443\ncustom_domains = test.yourdomain.com\n\n# \u76ee\u524d\u652f\u6301 v1 \u548c v2 \u4e24\u4e2a\u7248\u672c\u7684 proxy protocol \u534f\u8bae\u3002\nproxy_protocol_version = v2<\/pre>\n\n\n\n<p>\u53ea\u9700\u8981\u5728\u4ee3\u7406\u914d\u7f6e\u4e2d\u589e\u52a0\u4e00\u884c <code>proxy_protocol_version = v2<\/code> \u5373\u53ef\u5f00\u542f\u6b64\u529f\u80fd\u3002<\/p>\n\n\n\n<p>\u672c\u5730\u7684 https \u670d\u52a1\u53ef\u4ee5\u901a\u8fc7\u5728 nginx \u7684\u914d\u7f6e\u4e2d\u542f\u7528 <strong>Proxy Protocol<\/strong> \u7684\u89e3\u6790\u5e76\u5c06\u7ed3\u679c\u8bbe\u7f6e\u5728 <code>X-Real-IP<\/code> \u8fd9\u4e2a Header \u4e2d\u5c31\u53ef\u4ee5\u5728\u81ea\u5df1\u7684 Web \u670d\u52a1\u4e2d\u901a\u8fc7 <code>X-Real-IP<\/code> \u83b7\u53d6\u5230\u7528\u6237\u7684\u771f\u5b9e IP\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u901a\u8fc7\u5bc6\u7801\u4fdd\u62a4\u4f60\u7684 web \u670d\u52a1<\/h3>\n\n\n\n<p>\u7531\u4e8e\u6240\u6709\u5ba2\u6237\u7aef\u5171\u7528\u4e00\u4e2a frps \u7684 http \u670d\u52a1\u7aef\u53e3\uff0c\u4efb\u4f55\u77e5\u9053\u4f60\u7684\u57df\u540d\u548c url \u7684\u4eba\u90fd\u80fd\u8bbf\u95ee\u5230\u4f60\u90e8\u7f72\u5728\u5185\u7f51\u7684 web \u670d\u52a1\uff0c\u4f46\u662f\u5728\u67d0\u4e9b\u573a\u666f\u4e0b\u9700\u8981\u786e\u4fdd\u53ea\u6709\u9650\u5b9a\u7684\u7528\u6237\u624d\u80fd\u8bbf\u95ee\u3002<\/p>\n\n\n\n<p>frp \u652f\u6301\u901a\u8fc7 HTTP Basic Auth \u6765\u4fdd\u62a4\u4f60\u7684 web \u670d\u52a1\uff0c\u4f7f\u7528\u6237\u9700\u8981\u901a\u8fc7\u7528\u6237\u540d\u548c\u5bc6\u7801\u624d\u80fd\u8bbf\u95ee\u5230\u4f60\u7684\u670d\u52a1\u3002<\/p>\n\n\n\n<p>\u8be5\u529f\u80fd\u76ee\u524d\u4ec5\u9650\u4e8e http \u7c7b\u578b\u7684\u4ee3\u7406\uff0c\u9700\u8981\u5728 frpc \u7684\u4ee3\u7406\u914d\u7f6e\u4e2d\u6dfb\u52a0\u7528\u6237\u540d\u548c\u5bc6\u7801\u7684\u8bbe\u7f6e\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># frpc.ini\n[web]\ntype = http\nlocal_port = 80\ncustom_domains = test.yourdomain.com\nhttp_user = abc\nhttp_pwd = abc<\/pre>\n\n\n\n<p>\u901a\u8fc7\u6d4f\u89c8\u5668\u8bbf\u95ee <code>http:\/\/test.yourdomain.com<\/code>\uff0c\u9700\u8981\u8f93\u5165\u914d\u7f6e\u7684\u7528\u6237\u540d\u548c\u5bc6\u7801\u624d\u80fd\u8bbf\u95ee\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u81ea\u5b9a\u4e49\u4e8c\u7ea7\u57df\u540d<\/h3>\n\n\n\n<p>\u5728\u591a\u4eba\u540c\u65f6\u4f7f\u7528\u4e00\u4e2a frps \u65f6\uff0c\u901a\u8fc7\u81ea\u5b9a\u4e49\u4e8c\u7ea7\u57df\u540d\u7684\u65b9\u5f0f\u6765\u4f7f\u7528\u4f1a\u66f4\u52a0\u65b9\u4fbf\u3002<\/p>\n\n\n\n<p>\u901a\u8fc7\u5728 frps \u7684\u914d\u7f6e\u6587\u4ef6\u4e2d\u914d\u7f6e <code>subdomain_host<\/code>\uff0c\u5c31\u53ef\u4ee5\u542f\u7528\u8be5\u7279\u6027\u3002\u4e4b\u540e\u5728 frpc \u7684 http\u3001https \u7c7b\u578b\u7684\u4ee3\u7406\u4e2d\u53ef\u4ee5\u4e0d\u914d\u7f6e <code>custom_domains<\/code>\uff0c\u800c\u662f\u914d\u7f6e\u4e00\u4e2a <code>subdomain<\/code> \u53c2\u6570\u3002<\/p>\n\n\n\n<p>\u53ea\u9700\u8981\u5c06 <code>*.{subdomain_host}<\/code> \u89e3\u6790\u5230 frps \u6240\u5728\u670d\u52a1\u5668\u3002\u4e4b\u540e\u7528\u6237\u53ef\u4ee5\u901a\u8fc7 <code>subdomain<\/code> \u81ea\u884c\u6307\u5b9a\u81ea\u5df1\u7684 web \u670d\u52a1\u6240\u9700\u8981\u4f7f\u7528\u7684\u4e8c\u7ea7\u57df\u540d\uff0c\u901a\u8fc7 <code>{subdomain}.{subdomain_host}<\/code> \u6765\u8bbf\u95ee\u81ea\u5df1\u7684 web \u670d\u52a1\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># frps.ini\n[common]\nsubdomain_host = frps.com<\/pre>\n\n\n\n<p>\u5c06\u6cdb\u57df\u540d <code>*.frps.com<\/code> \u89e3\u6790\u5230 frps \u6240\u5728\u670d\u52a1\u5668\u7684 IP \u5730\u5740\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># frpc.ini\n[web]\ntype = http\nlocal_port = 80\nsubdomain = test<\/pre>\n\n\n\n<p>frps \u548c frpc \u90fd\u542f\u52a8\u6210\u529f\u540e\uff0c\u901a\u8fc7 <code>test.frps.com<\/code> \u5c31\u53ef\u4ee5\u8bbf\u95ee\u5230\u5185\u7f51\u7684 web \u670d\u52a1\u3002<\/p>\n\n\n\n<p><strong>\u6ce8\uff1a\u5982\u679c frps \u914d\u7f6e\u4e86 <code>subdomain_host<\/code>\uff0c\u5219 <code>custom_domains<\/code> \u4e2d\u4e0d\u80fd\u662f\u5c5e\u4e8e <code>subdomain_host<\/code> \u7684\u5b50\u57df\u540d\u6216\u8005\u6cdb\u57df\u540d\u3002<\/strong><\/p>\n\n\n\n<p>\u540c\u4e00\u4e2a http \u6216 https \u7c7b\u578b\u7684\u4ee3\u7406\u4e2d <code>custom_domains<\/code> \u548c <code>subdomain<\/code> \u53ef\u4ee5\u540c\u65f6\u914d\u7f6e\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">URL \u8def\u7531<\/h3>\n\n\n\n<p>frp \u652f\u6301\u6839\u636e\u8bf7\u6c42\u7684 URL \u8def\u5f84\u8def\u7531\u8f6c\u53d1\u5230\u4e0d\u540c\u7684\u540e\u7aef\u670d\u52a1\u3002<\/p>\n\n\n\n<p>\u901a\u8fc7\u914d\u7f6e\u6587\u4ef6\u4e2d\u7684 <code>locations<\/code> \u5b57\u6bb5\u6307\u5b9a\u4e00\u4e2a\u6216\u591a\u4e2a proxy \u80fd\u591f\u5339\u914d\u7684 URL \u524d\u7f00(\u76ee\u524d\u4ec5\u652f\u6301\u6700\u5927\u524d\u7f00\u5339\u914d\uff0c\u4e4b\u540e\u4f1a\u8003\u8651\u6b63\u5219\u5339\u914d)\u3002\u4f8b\u5982\u6307\u5b9a <code>locations = \/news<\/code>\uff0c\u5219\u6240\u6709 URL \u4ee5 <code>\/news<\/code> \u5f00\u5934\u7684\u8bf7\u6c42\u90fd\u4f1a\u88ab\u8f6c\u53d1\u5230\u8fd9\u4e2a\u670d\u52a1\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># frpc.ini\n[web01]\ntype = http\nlocal_port = 80\ncustom_domains = web.yourdomain.com\nlocations = \/\n\n[web02]\ntype = http\nlocal_port = 81\ncustom_domains = web.yourdomain.com\nlocations = \/news,\/about<\/pre>\n\n\n\n<p>\u6309\u7167\u4e0a\u8ff0\u7684\u793a\u4f8b\u914d\u7f6e\u540e\uff0c<code>web.yourdomain.com<\/code> \u8fd9\u4e2a\u57df\u540d\u4e0b\u6240\u6709\u4ee5 <code>\/news<\/code> \u4ee5\u53ca <code>\/about<\/code> \u4f5c\u4e3a\u524d\u7f00\u7684 URL \u8bf7\u6c42\u90fd\u4f1a\u88ab\u8f6c\u53d1\u5230 web02\uff0c\u5176\u4f59\u7684\u8bf7\u6c42\u4f1a\u88ab\u8f6c\u53d1\u5230 web01\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u901a\u8fc7\u4ee3\u7406\u8fde\u63a5 frps<\/h3>\n\n\n\n<p>\u5728\u53ea\u80fd\u901a\u8fc7\u4ee3\u7406\u8bbf\u95ee\u5916\u7f51\u7684\u73af\u5883\u5185\uff0cfrpc \u652f\u6301\u901a\u8fc7 HTTP PROXY \u548c frps \u8fdb\u884c\u901a\u4fe1\u3002<\/p>\n\n\n\n<p>\u53ef\u4ee5\u901a\u8fc7\u8bbe\u7f6e <code>HTTP_PROXY<\/code> \u7cfb\u7edf\u73af\u5883\u53d8\u91cf\u6216\u8005\u901a\u8fc7\u5728 frpc \u7684\u914d\u7f6e\u6587\u4ef6\u4e2d\u8bbe\u7f6e <code>http_proxy<\/code> \u53c2\u6570\u6765\u4f7f\u7528\u6b64\u529f\u80fd\u3002<\/p>\n\n\n\n<p>\u4ec5\u5728 <code>protocol = tcp<\/code> \u65f6\u751f\u6548\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># frpc.ini\n[common]\nserver_addr = x.x.x.x\nserver_port = 7000\nhttp_proxy = http:\/\/user:pwd@192.168.1.128:8080<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u8303\u56f4\u7aef\u53e3\u6620\u5c04<\/h3>\n\n\n\n<p>\u5728 frpc \u7684\u914d\u7f6e\u6587\u4ef6\u4e2d\u53ef\u4ee5\u6307\u5b9a\u6620\u5c04\u591a\u4e2a\u7aef\u53e3\uff0c\u76ee\u524d\u53ea\u652f\u6301 tcp \u548c udp \u7684\u7c7b\u578b\u3002<\/p>\n\n\n\n<p>\u8fd9\u4e00\u529f\u80fd\u901a\u8fc7 <code>range:<\/code> \u6bb5\u843d\u6807\u8bb0\u6765\u5b9e\u73b0\uff0c\u5ba2\u6237\u7aef\u4f1a\u89e3\u6790\u8fd9\u4e2a\u6807\u8bb0\u4e2d\u7684\u914d\u7f6e\uff0c\u5c06\u5176\u62c6\u5206\u6210\u591a\u4e2a proxy\uff0c\u6bcf\u4e00\u4e2a proxy \u4ee5\u6570\u5b57\u4e3a\u540e\u7f00\u547d\u540d\u3002<\/p>\n\n\n\n<p>\u4f8b\u5982\u8981\u6620\u5c04\u672c\u5730 6000-6005, 6007 \u8fd96\u4e2a\u7aef\u53e3\uff0c\u4e3b\u8981\u914d\u7f6e\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># frpc.ini\n[range:test_tcp]\ntype = tcp\nlocal_ip = 127.0.0.1\nlocal_port = 6000-6006,6007\nremote_port = 6000-6006,6007<\/pre>\n\n\n\n<p>\u5b9e\u9645\u8fde\u63a5\u6210\u529f\u540e\u4f1a\u521b\u5efa 8 \u4e2a proxy\uff0c\u547d\u540d\u4e3a <code>test_tcp_0, test_tcp_1 ... test_tcp_7<\/code>\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u63d2\u4ef6<\/h3>\n\n\n\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cfrpc \u53ea\u4f1a\u8f6c\u53d1\u8bf7\u6c42\u5230\u672c\u5730 tcp \u6216 udp \u7aef\u53e3\u3002<\/p>\n\n\n\n<p>\u63d2\u4ef6\u6a21\u5f0f\u662f\u4e3a\u4e86\u5728\u5ba2\u6237\u7aef\u63d0\u4f9b\u66f4\u52a0\u4e30\u5bcc\u7684\u529f\u80fd\uff0c\u76ee\u524d\u5185\u7f6e\u7684\u63d2\u4ef6\u6709 <code>unix_domain_socket<\/code>\u3001<code>http_proxy<\/code>\u3001<code>socks5<\/code>\u3001<code>static_file<\/code>\u3002\u5177\u4f53\u4f7f\u7528\u65b9\u5f0f\u8bf7\u67e5\u770b<a href=\"#%E4%BD%BF%E7%94%A8%E7%A4%BA%E4%BE%8B\" target=\"_blank\"  rel=\"nofollow\" >\u4f7f\u7528\u793a\u4f8b<\/a>\u3002<\/p>\n\n\n\n<p>\u901a\u8fc7 <code>plugin<\/code> \u6307\u5b9a\u9700\u8981\u4f7f\u7528\u7684\u63d2\u4ef6\uff0c\u63d2\u4ef6\u7684\u914d\u7f6e\u53c2\u6570\u90fd\u4ee5 <code>plugin_<\/code> \u5f00\u5934\u3002\u4f7f\u7528\u63d2\u4ef6\u540e <code>local_ip<\/code> \u548c <code>local_port<\/code> \u4e0d\u518d\u9700\u8981\u914d\u7f6e\u3002<\/p>\n\n\n\n<p>\u4f7f\u7528 <strong>http_proxy<\/strong> \u63d2\u4ef6\u7684\u793a\u4f8b:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># frpc.ini\n[http_proxy]\ntype = tcp\nremote_port = 6000\nplugin = http_proxy\nplugin_http_user = abc\nplugin_http_passwd = abc<\/pre>\n\n\n\n<p><code>plugin_http_user<\/code> \u548c <code>plugin_http_passwd<\/code> \u5373\u4e3a <code>http_proxy<\/code> \u63d2\u4ef6\u53ef\u9009\u7684\u914d\u7f6e\u53c2\u6570\u3002<\/p>\n<button class=\"simplefavorite-button\" data-postid=\"533\" data-siteid=\"1\" data-groupid=\"1\" data-favoritecount=\"0\" style=\"\">\u6536\u85cf <i class=\"sf-icon-star-empty\"><\/i><\/button>","protected":false},"excerpt":{"rendered":"<p>frp: \u5185\u7f51\u7a7f\u900f \u5b98\u65b9\u4f7f\u7528\u6559\u7a0b\uff1ahttps:\/\/github.com\/fatedier\/frp\/blob\/master\/READ &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[],"class_list":["post-533","post","type-post","status-publish","format-standard","hentry","category-10"],"_links":{"self":[{"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=\/wp\/v2\/posts\/533","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=533"}],"version-history":[{"count":0,"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=\/wp\/v2\/posts\/533\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=533"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=533"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=533"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}