{"id":346,"date":"2020-04-09T23:19:14","date_gmt":"2020-04-09T15:19:14","guid":{"rendered":"https:\/\/www.sunyuping.com\/?p=346"},"modified":"2020-04-09T23:19:14","modified_gmt":"2020-04-09T15:19:14","slug":"%e5%b0%8f%e7%b1%b3%e8%b7%af%e7%94%b1%e5%99%a8%e5%bc%80%e5%90%affrp","status":"publish","type":"post","link":"https:\/\/www.sunyuping.com\/index.php\/2020\/04\/09\/%e5%b0%8f%e7%b1%b3%e8%b7%af%e7%94%b1%e5%99%a8%e5%bc%80%e5%90%affrp\/","title":{"rendered":"\u5c0f\u7c73\u8def\u7531\u5668\u5f00\u542ffrp"},"content":{"rendered":"\n<p>Misstar Tool 3.0\uff0c\u91cc\u9762\u5e26\u6709frp\u63d2\u4ef6\uff0c\u4f46\u662f\u63d2\u4ef6\u6709\u95ee\u9898\uff0c\u9700\u8981\u5927\u91cf\u4fee\u590d\u624d\u80fd\u4f7f\u7528\u3002\u4e0b\u9762\u4ecb\u7ecd\uff0c\u5982\u4f55\u81ea\u5df1\u72ec\u7acb\u5b89\u88c5frp\u7684\u5ba2\u6237\u7aeffrpc\u3002<\/p>\n\n\n\n<p><strong>1.\u81ea\u5df1\u5b89\u88c5frpc<\/strong><\/p>\n\n\n\n<p>1. \u5b89\u88c5frpc<br> \u53bbgithub\u5b98\u7f51\u4e0b\u8f7dfrp\uff1ahttps:\/\/github.com\/fatedier\/frp\/releases<br> \u5c0f\u7c73\u8def\u7531\u56683\u8981\u4e0b\u8f7dmipsle\u7248\u672c\u7684\uff1a<a href=\"https:\/\/github.com\/fatedier\/frp\/releases\/download\/v0.32.1\/frp_0.32.1_linux_mipsle.tar.gz\">frp_0.32.1_linux_mipsle.tar.gz<\/a><br> \u5c0f\u7c73\u8def\u7531\u56681c\u8981\u4e0b\u8f7darm7\u7248\u672c\u7684\uff1a<a href=\"https:\/\/github.com\/fatedier\/frp\/releases\/download\/v0.32.1\/frp_0.32.1_linux_arm.tar.gz\">frp_0.32.1_linux_arm.tar.gz<\/a> <br> \u5c06\u4e0b\u8f7d\u7684\u6587\u4ef6\u89e3\u538b\uff0c\u5c06frpc\u3001frpc.ini\u4e24\u4e2a\u6587\u4ef6\u901a\u8fc7vsftp\u5de5\u5177\u4e0a\u4f20\u5230\u5c0f\u7c73\u8def\u7531\u5668\uff08vsftp\u5de5\u5177\uff0cmisstar tools\u91cc\u6709\uff09\uff0c\u8def\u5f84\u53ef\u4ee5\u4e3a\uff1a\/etc\/frp\/<\/p>\n\n\n\n<p>frpc.ini \u6587\u4ef6\u5185\u5bb9\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[common]\nserver_addr = 1.2.3.4\nserver_port = 1111\ntoken = password\npool_count = 10\n\n[111]\ntype = http\nsubdomain = test\nlocal_ip = 192.168.1.2\nlocal_port = 80\n\n<\/pre>\n\n\n\n<ol class=\"wp-block-list\"><li>\u8ba9frpc\u5f00\u673a\u81ea\u52a8\u542f\u52a8<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\">root@XiaoQiang:~# vi \/etc\/rc.local\n# restore phy config\nspeed=$(uci -q get xiaoqiang.common.WAN_SPEED)\n[ -n \"$speed\" ] &amp;&amp; \/usr\/sbin\/phyhelper swan \"$speed\"\n#\u5ef6\u8fdf\u542f\u52a830s\nsleep 30\n\/etc\/misstar\/applications\/ftp\/script\/vsftpd start\n\/etc\/misstar\/applications\/kms\/script\/kms start\n#\u6b64\u5904\u5199\u4f60\u7684frpc\u5ba2\u6237\u7aef\u7684\u5b9e\u9645\u5b89\u88c5\u76ee\u5f55\u7684\u7edd\u5bf9\u8def\u5f84\uff0coutput\u662f\u65e5\u5fd7\u6587\u4ef6\nnohup \/etc\/frp\/frpc -c \/etc\/frp\/frpc.ini &gt; \/etc\/frp\/frpc.log &amp;\nexit 0<\/pre>\n\n\n\n<p><br><strong> 2. \u4fee\u6539misstar tools\u7684Frp\u4ee3\u7801<\/strong><br> \u5acc\u9ebb\u70e6\u7684\uff0c\u4e00\u5b9a\u8981\u6709\u8010\u5fc3\u3002 <\/p>\n\n\n\n<p>\u76ee\u5f55\uff1a\/etc\/misstar\/applications\/frp\/script\/frp<br>\na. \u5c06\u91cc\u9762\u7684privilege_token\u5168\u90e8\u6539\u4e3atoken\uff1b<br>\nb. \u53c2\u8003\u4e0b\u56fe\u4e2d\u7684\u4f4d\u7f6e\u6dfb\u52a0\uff1apool_count=$(uci get misstar.frp.pool_count)<br>\nc. \u53c2\u8003\u4e0b\u56fe\u4e2d\u7684\u4f4d\u7f6e\u6dfb\u52a0\uff1aecho &#8220;pool_count = &#8220;$pool_count &gt;&gt; \/etc\/misstar\/applications\/frp\/config\/frpc.conf<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"http:\/\/www.sunyuping.com\/wp-content\/uploads\/2020\/04\/1111.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>\u76ee\u5f55\uff1a \/etc\/misstar\/lua\/frp.lua<br> a. \u5c06\u91cc\u9762\u7684privilege_token\u5168\u90e8\u6539\u4e3atoken\uff1b<br> b. \u53c2\u8003\u4e0b\u56fe\u4e2d\u7684\u4f4d\u7f6e\u6dfb\u52a0\uff1alocal pool_count=data.pool_count<br> c. \u53c2\u8003\u4e0b\u56fe\u4e2d\u7684\u4f4d\u7f6e\u6dfb\u52a0\uff1aLuciUtil.exec(&#8220;uci set misstar.frp.pool_count=&#8221; ..pool_count)<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"http:\/\/www.sunyuping.com\/wp-content\/uploads\/2020\/04\/2222.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>d.\u53c2\u8003\u4e0b\u56fe\u4e2d\u7684\u4f4d\u7f6e\u6dfb\u52a0\uff1aresult.pool_count = LuciUtil.exec(&#8220;uci get misstar.frp.pool_count&#8221;)<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"http:\/\/www.sunyuping.com\/wp-content\/uploads\/2020\/04\/3333.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>3. <strong>\u76ee\u5f55\uff1a \/etc\/misstar\/wwwroot\/views\/frp.tpl<\/strong><br> a. \u5c06\u91cc\u9762\u7684\u5c06\u91cc\u9762\u7684privilege_token\u5168\u90e8\u6539\u4e3atoken\uff1b<br> b. \u53c2\u8003\u4e0b\u56fe\u4e2d\u7684\u4f4d\u7f6e\u6dfb\u52a0\uff1apool_count: &#8221;,<br> c. \u53c2\u8003\u4e0b\u56fe\u4e2d\u7684\u4f4d\u7f6e\u6dfb\u52a0\uff1atpldata.pool_count = rsp.pool_count;<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"http:\/\/www.sunyuping.com\/wp-content\/uploads\/2020\/04\/4444.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>d.\u53c2\u8003\u4e0b\u56fe\u4e2d\u7684\u4f4d\u7f6e\u6dfb\u52a0\uff1a<\/p>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<div class=\" layui-form-item \">\n\t<label class=\"layui-form-label \">pool_count<\/label>\n\t<div class=\"layui-input-inline \">\n\t\t<input type=\"text\" name=\"pool_count\" id=\"pool_count\" autocomplete=\"off \" onclick=\"tips('\u6700\u5927\u8fde\u63a5\u6570\u91cf\uff01','#pool_count');\" class=\"layui-input \" value=\"{$pool_count}\">\n\t<\/div>\n<\/div>\n<\/div><\/div>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"http:\/\/www.sunyuping.com\/wp-content\/uploads\/2020\/04\/5555.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>e. \u4fee\u6539\u8fd9\u91cc\u7684\u4ee3\u7801<br> \u628a        rsp.frp_enable == &#8220;1&#8221; ? $(&#8220;#frp_enable&#8221;).attr(&#8220;checked&#8221;,true) : tmp=1; <br> \u6539\u4e3a\uff1arsp.frp_status == &#8220;1&#8221; ? $(&#8220;#frp_enable&#8221;).attr(&#8220;checked&#8221;,true) : tmp=1;<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"http:\/\/www.sunyuping.com\/wp-content\/uploads\/2020\/04\/6666.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>\u5982\u679c\u4e0d\u6539\u7684\u8bdd\uff0c\u529f\u80fd\u5f00\u5173\u8fd9\u91cc\uff0c\u603b\u662f\u663e\u793a\u7070\u8272\u3002\uff08\u53ea\u80fd\u4ece\u201c\u8fd0\u884c\u72b6\u6001\uff1a\u8fd0\u884c\u4e2d\u201d\uff0c\u770b\u662f\u5426\u5f00\u542f\uff09\u3002\u4e0b\u56fe\u662f\u4fee\u6539\u540e\u7684\u6b63\u5e38\u72b6\u6001\u3002<\/p>\n\n\n\n<p>\u81f3\u6b64\uff0c\u73b0\u5728\u8bd5\u8bd5\uff0cfrp\u5e94\u8be5\u5c31\u80fd\u81ea\u52a8\u8fd0\u884c\u4e86\u3002<br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Misstar Tool 3.0\uff0c\u91cc\u9762\u5e26\u6709frp\u63d2\u4ef6\uff0c\u4f46\u662f\u63d2\u4ef6\u6709\u95ee\u9898\uff0c\u9700\u8981\u5927\u91cf\u4fee\u590d\u624d\u80fd\u4f7f\u7528\u3002\u4e0b\u9762\u4ecb\u7ecd\uff0c\u5982\u4f55\u81ea\u5df1 &#8230; <a title=\"\u5c0f\u7c73\u8def\u7531\u5668\u5f00\u542ffrp\" class=\"read-more\" href=\"https:\/\/www.sunyuping.com\/index.php\/2020\/04\/09\/%e5%b0%8f%e7%b1%b3%e8%b7%af%e7%94%b1%e5%99%a8%e5%bc%80%e5%90%affrp\/\" aria-label=\"\u9605\u8bfb \u5c0f\u7c73\u8def\u7531\u5668\u5f00\u542ffrp\">\u9605\u8bfb\u66f4\u591a<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-346","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.sunyuping.com\/index.php\/wp-json\/wp\/v2\/posts\/346","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sunyuping.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sunyuping.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sunyuping.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sunyuping.com\/index.php\/wp-json\/wp\/v2\/comments?post=346"}],"version-history":[{"count":0,"href":"https:\/\/www.sunyuping.com\/index.php\/wp-json\/wp\/v2\/posts\/346\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sunyuping.com\/index.php\/wp-json\/wp\/v2\/media?parent=346"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sunyuping.com\/index.php\/wp-json\/wp\/v2\/categories?post=346"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sunyuping.com\/index.php\/wp-json\/wp\/v2\/tags?post=346"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}