{"id":88063,"date":"2020-02-05T02:12:37","date_gmt":"2020-02-04T18:12:37","guid":{"rendered":"http:\/\/4563.org\/?p=88063"},"modified":"2020-02-05T02:12:37","modified_gmt":"2020-02-04T18:12:37","slug":"%e5%88%86%e4%ba%ab%e4%b8%80%e4%b8%aa%e5%86%85%e7%bd%91%e5%8f%8d%e5%90%91%e4%bb%a3%e7%90%86%e5%b7%a5%e5%85%b7%ef%bc%8c%e6%88%96%e8%ae%b8%e6%af%94-ngrok-%e6%9b%b4%e7%ac%a6%e5%90%88%e4%bd%a0%e7%9a%84","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=88063","title":{"rendered":"\u5206\u4eab\u4e00\u4e2a\u5185\u7f51\u53cd\u5411\u4ee3\u7406\u5de5\u5177\uff0c\u6216\u8bb8\u6bd4 ngrok \u66f4\u7b26\u5408\u4f60\u7684\u9700\u8981"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u5206\u4eab\u4e00\u4e2a\u5185\u7f51\u53cd\u5411\u4ee3\u7406\u5de5\u5177\uff0c\u6216\u8bb8\u6bd4 ngrok \u66f4\u7b26\u5408\u4f60\u7684\u9700\u8981               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ysmood <\/span>  <span><i><\/i> 21<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u9879\u76ee\u5730\u5740 https:\/\/github.com\/ysmood\/digto<\/p>\n<p>\u548c\u666e\u901a\u7684\u4ee3\u7406\u5de5\u5177\u4e0d\u540c\u5b83\u4e0d\u9700\u8981\u4efb\u4f55\u4f9d\u8d56\uff0c\u53ea\u8981\u80fd\u53d1\u9001 http \u8bf7\u6c42\u5c31\u53ef\u4ee5\u5728\u5185\u7f51\u5904\u7406\u516c\u7f51\u53d1\u6765\u7684 http \u8bf7\u6c42\u3002\u534f\u8bae\u975e\u5e38\u7b80\u5355\u6240\u4ee5\u53ef\u4ee5\u8f7b\u677e\u96c6\u6210\u5230\u4efb\u4f55\u8bed\u8a00\u800c\u4e0d\u9700\u8981\u5f15\u7528\u4f9d\u8d56\u3002\u6bd4\u5982\u8c03\u8bd5\u652f\u4ed8\u670d\u52a1\u7684\u56de\u8c03\u65f6\uff0c\u4ed6\u4eec\u7684\u56de\u8c03\u8bf7\u6c42\u6765\u81ea\u516c\u7f51\uff0c\u800c\u6211\u81ea\u5df1\u7684\u5f00\u53d1\u670d\u52a1\u662f\u5728\u5c40\u57df\u7f51\u5185\uff0c\u5229\u7528\u5b83\u5c31\u53ef\u4ee5\u5c06\u5916\u90e8\u8bf7\u6c42\u4ee3\u7406\u5230\u672c\u5730\u5f00\u53d1\u670d\u52a1\u3002\u76f8\u6bd4 ngrok \u4e4b\u7c7b\u7684\u670d\u52a1\u5229\u7528\u8fd9\u4e2a\u5de5\u5177\u5c31\u53ef\u4ee5\u4e0d\u7528\u5e38\u9a7b\u4e00\u4e2a\u53cd\u4ee3\u8fdb\u7a0b\u4e86\uff0c\u5e38\u9a7b\u53cd\u4ee3\u4e5f\u8ba9\u6709\u6d01\u7656\u7684\u4eba\u5f88\u96be\u53d7\uff0c\u8981\u662f\u5fd8\u4e86\u5173 ngrok\uff0c\u540c\u4e00\u4e2a\u7aef\u53e3\u88ab\u522b\u7684\u670d\u52a1\u7528\u4e86\u8fd8\u53ef\u80fd\u6cc4\u9732\u5185\u90e8\u7684\u8baf\u606f\u3002<\/p>\n<p>\u7531\u4e8e\u53ef\u4ee5\u65b9\u4fbf\u7684\u7f16\u7a0b\uff0c\u5b83\u4e5f\u6bd4 ngrok \u4e4b\u7c7b\u7684\u670d\u52a1\u66f4\u5bb9\u6613\u96c6\u6210\u5230\u81ea\u52a8\u5316\u6d4b\u8bd5\u4e2d\u3002\u4e8b\u5b9e\u4e0a\u8fd9\u4e5f\u662f\u6211\u4eec\u81ea\u5df1\u7528\u7684\u6700\u591a\u7684\u65b9\u5f0f\u3002\u7531\u4e8e\u53ef\u4ee5\u7528\u6211\u4eec\u81ea\u5df1\u719f\u6089\u7684\u5de5\u5177 log debug \u6253\u65ad\u70b9\uff0c\u6709\u65f6\u5019\u53cd\u800c\u6bd4\u90a3\u4e9b\u90a3\u4e9b\u4ee3\u7406\u5de5\u5177\u82b1\u91cc\u80e1\u54e8\u7684\u529f\u80fd\u66f4\u4fbf\u5229\uff0c\u5f53\u7136\u8fd9\u4e2a\u662f\u4ec1\u8005\u89c1\u4ec1\u667a\u8005\u89c1\u667a\u3002<\/p>\n<p>\u4e0b\u9762\u662f\u4e00\u4e2a\u7b80\u5355\u7684 curl \u793a\u4f8b\uff0c\u8fd9\u91cc\u53ea\u9700\u8981\u7528\u5230 curl \u3002<\/p>\n<ol>\n<li>\n<p>\u6253\u5f00\u4e00\u4e2a\u547d\u4ee4\u884c\uff0c\u53d1\u9001\u516c\u7f51\u8bf7\u6c42 <code>curl https:\/\/my-subdomain.digto.org\/path -d 'ping'<\/code> \uff0c\u53ef\u4ee5\u770b\u5230\u8bf7\u6c42\u5f00\u59cb\u7b49\u5f85\u8fd4\u56de\uff0c<code>my-subdomain<\/code> \u53ef\u4ee5\u4e3a\u4efb\u610f\u503c<\/p>\n<\/li>\n<li>\n<p>\u6253\u5f00\u53e6\u4e00\u4e2a\u547d\u4ee4\u884c\uff0c\u7528\u5b83\u53d1\u9001\u8fd4\u56de\u503c\u7ed9\u4e0a\u9762\u8fd9\u4e2a\u516c\u7f51\u8bf7\u6c42\uff0c\u6211\u4eec\u8981\u53d1\u9001\u4e24\u4e2a\u8bf7\u6c42\uff0c\u7b2c\u4e00\u4e2a\u7528\u6765\u83b7\u53d6 http header\uff0c\u7b2c\u4e8c\u4e2a\u7528\u6765\u53d1\u9001 response \u3002\u793a\u4f8b\u5982\u4e0b\uff1a<\/p>\n<pre><code>curl -i https:\/\/digto.org\/my-subdomain # HTTP\/2 200 # digto-method: GET # digto-url: \/path # digto-id: 3dd4e560 # # ping  # digto-id \u7684\u503c\u5fc5\u987b\u548c\u4e0a\u9762\u8fd4\u56de\u7684\u503c\u4fdd\u6301\u4e00\u81f4 curl https:\/\/digto.org\/my-subdomain -H 'digto-id: 3dd4e560' -d 'pong' <\/code><\/pre>\n<p>\u7136\u540e\u5e94\u8be5\u80fd\u770b\u5230\u7b2c\u4e00\u4e2a\u547d\u4ee4\u884c\u6536\u5230\u4e86 pong \u7684\u8fd4\u56de\u3002<\/p>\n<\/li>\n<\/ol>\n<p>\u76ee\u524d digto \u81ea\u5df1\u5b9e\u73b0\u4e86 golang\uff0cruby \u548c nodejs \u7684 client \u4f9b\u505a\u793a\u4f8b\u3002<\/p>\n<p>\u5982\u679c\u4f60\u4e0d\u60f3\u4f7f\u7528 demo \u670d\u52a1\uff0c\u4e5f\u53ef\u4f7f\u7528\u6e90\u4ee3\u7801\u542f\u52a8\u81ea\u5df1\u7684\u79c1\u670d\u3002<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>3<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"1127281\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ifyour <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u8d5e\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1127282\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : win7pro <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6709\u610f\u601d\uff01                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1127283\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : BlackHole1 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4e0d\u9519\u54ce\uff0c\u5df2 star                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u5206\u4eab\u4e00\u4e2a\u5185\u7f51\u53cd\u5411\u4ee3\u7406\u5de5\u5177\uff0c\u6216\u8bb8\u6bd4 &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/88063"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=88063"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/88063\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=88063"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=88063"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=88063"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}