{"id":6001,"date":"2026-03-30T20:02:48","date_gmt":"2026-03-30T12:02:48","guid":{"rendered":"https:\/\/blog.lss.lol\/index.php\/2026\/03\/30\/cloudflare-tunnel%ef%bc%9a%e8%b7%a8%e5%a2%83%e7%94%b5%e5%95%86%e6%9c%8d%e5%8a%a1%e5%99%a8%e7%9a%84%e5%85%8d%e8%b4%b9%e5%86%85%e7%bd%91%e7%a9%bf%e9%80%8f%e5%88%a9%e5%99%a8\/"},"modified":"2026-03-30T20:02:48","modified_gmt":"2026-03-30T12:02:48","slug":"cloudflare-tunnel%ef%bc%9a%e8%b7%a8%e5%a2%83%e7%94%b5%e5%95%86%e6%9c%8d%e5%8a%a1%e5%99%a8%e7%9a%84%e5%85%8d%e8%b4%b9%e5%86%85%e7%bd%91%e7%a9%bf%e9%80%8f%e5%88%a9%e5%99%a8","status":"publish","type":"post","link":"https:\/\/blog.lss.lol\/index.php\/2026\/03\/30\/cloudflare-tunnel%ef%bc%9a%e8%b7%a8%e5%a2%83%e7%94%b5%e5%95%86%e6%9c%8d%e5%8a%a1%e5%99%a8%e7%9a%84%e5%85%8d%e8%b4%b9%e5%86%85%e7%bd%91%e7%a9%bf%e9%80%8f%e5%88%a9%e5%99%a8\/","title":{"rendered":"Cloudflare Tunnel\uff1a\u8de8\u5883\u7535\u5546\u670d\u52a1\u5668\u7684\u514d\u8d39\u5185\u7f51\u7a7f\u900f\u5229\u5668"},"content":{"rendered":"<h2><a href=\"https:\/\/ctm.lss.lol\/\" target=\"_blank\" rel=\"noopener noreferrer\" style=\"color: #2271b1;text-decoration: underline\">\u8de8\u5883\u7535\u5546\u670d\u52a1\u5668<\/a>\u7684\u8bbf\u95ee\u75db\u70b9<\/h2>\n<p>\u8de8\u5883\u7535\u5546\u5356\u5bb6\u5e38\u9762\u4e34\u8fd9\u6837\u7684\u56f0\u5883\uff1a\u672c\u5730\u90e8\u7f72\u7684ERP\u7cfb\u7edf\u3001\u4ea7\u54c1\u6570\u636e\u5e93\u6216\u81ea\u5efa\u670d\u52a1\u5668\uff0c\u56e0\u6ca1\u6709\u516c\u7f51IP\u65e0\u6cd5\u76f4\u63a5\u88ab\u6d77\u5916\u5ba2\u6237\u6216\u56e2\u961f\u8bbf\u95ee\uff0c\u5373\u4f7f\u6709\u516c\u7f51IP\uff0c\u4e5f\u53ef\u80fd\u56e0\u7f51\u7edc\u6ce2\u52a8\u5bfc\u81f4\u8bbf\u95ee\u5ef6\u8fdf\u9ad8\u3001\u8fde\u63a5\u4e0d\u7a33\u5b9a\u3002\u8fd9\u4e9b\u95ee\u9898\u76f4\u63a5\u5f71\u54cd\u8ba2\u5355\u5904\u7406\u6548\u7387\u548c\u5ba2\u6237\u4f53\u9a8c\uff0c\u800c\u4f20\u7edf\u7684\u5185\u7f51\u7a7f\u900f\u5de5\u5177\u8981\u4e48\u6536\u8d39\u6602\u8d35\uff0c\u8981\u4e48\u914d\u7f6e\u590d\u6742\uff0c\u96be\u4ee5\u6ee1\u8db3\u4e2d\u5c0f\u5356\u5bb6\u7684\u9700\u6c42\u3002<\/p>\n<h2>\u4ec0\u4e48\u662f<a href=\"https:\/\/ctm.lss.lol\/\" target=\"_blank\" rel=\"noopener noreferrer\" style=\"color: #2271b1;text-decoration: underline\">Cloudflare Tunnel<\/a>\uff1f<\/h2>\n<p><strong><a href=\"https:\/\/ctm.lss.lol\/\" target=\"_blank\" rel=\"noopener noreferrer\" style=\"color: #2271b1;text-decoration: underline\">Cloudflare Tunnel<\/a><\/strong>\u662fCloudflare\u63a8\u51fa\u7684\u96f6\u4fe1\u4efb\u7f51\u7edc\u8bbf\u95ee\uff08ZTNA\uff09\u5de5\u5177\uff0c\u901a\u8fc7\u5728\u672c\u5730\u670d\u52a1\u548cCloudflare\u5168\u7403CDN\u8282\u70b9\u4e4b\u95f4\u5efa\u7acb\u52a0\u5bc6\u96a7\u9053\uff0c\u5c06\u5185\u7f51\u670d\u52a1\u5b89\u5168\u5730\u66b4\u9732\u5230\u516c\u7f51\u3002\u5b83\u7684\u6838\u5fc3\u4f18\u52bf\u5728\u4e8e\u65e0\u9700\u516c\u7f51IP\u3001\u65e0\u9700\u8def\u7531\u5668\u7aef\u53e3\u6620\u5c04\uff0c\u4e14\u57fa\u7840\u529f\u80fd\u5b8c\u5168\u514d\u8d39\u3002<\/p>\n<blockquote><p>Cloudflare Tunnel\u7684\u672c\u8d28\u662f\u5229\u7528Cloudflare\u7684\u5168\u7403\u7f51\u7edc\uff0c\u8ba9\u516c\u7f51\u7528\u6237\u901a\u8fc7\u6700\u8fd1\u7684CDN\u8282\u70b9\u8bbf\u95ee\u4f60\u7684\u5185\u7f51\u670d\u52a1\uff0c\u65e2\u4fdd\u8bc1\u4e86\u901f\u5ea6\uff0c\u53c8\u63d0\u5347\u4e86\u5b89\u5168\u6027\u3002<\/p><\/blockquote>\n<h2>\u4e3a\u4ec0\u4e48Cloudflare Tunnel\u9002\u5408\u8de8\u5883\u7535\u5546\u670d\u52a1\u5668\uff1f<\/h2>\n<ul>\n<li><strong>\u514d\u8d39\u4e14\u65e0\u6d41\u91cf\u9650\u5236<\/strong>\uff1a\u6838\u5fc3\u96a7\u9053\u670d\u52a1\u5b8c\u5168\u514d\u8d39\uff0c\u6ca1\u6709\u5e26\u5bbd\u6216\u6d41\u91cf\u4e0a\u9650\uff0c\u9002\u5408\u4e2d\u5c0f\u5356\u5bb6\u964d\u4f4e\u8fd0\u8425\u6210\u672c\u3002<\/li>\n<li><strong>\u5168\u7403CDN\u52a0\u901f<\/strong>\uff1aCloudflare\u5728\u5168\u7403\u62e5\u6709\u8d85\u8fc7200\u4e2a\u6570\u636e\u4e2d\u5fc3\uff0c\u6d77\u5916\u7528\u6237\u8bbf\u95ee\u65f6\u4f1a\u81ea\u52a8\u8fde\u63a5\u6700\u8fd1\u7684\u8282\u70b9\uff0c\u5927\u5e45\u964d\u4f4e\u5ef6\u8fdf\uff08\u901a\u5e38\u5728100ms\u4ee5\u5185\uff09\u3002<\/li>\n<li><strong>\u7aef\u5230\u7aef\u52a0\u5bc6<\/strong>\uff1a\u6240\u6709\u6d41\u91cf\u5747\u901a\u8fc7TLS 1.3\u52a0\u5bc6\uff0c\u9632\u6b62\u6570\u636e\u5728\u4f20\u8f93\u8fc7\u7a0b\u4e2d\u88ab\u7a83\u53d6\u6216\u7be1\u6539\uff0c\u7b26\u5408\u8de8\u5883\u7535\u5546\u7684\u6570\u636e\u5b89\u5168\u8981\u6c42\u3002<\/li>\n<li><strong>\u7b80\u5355\u914d\u7f6e<\/strong>\uff1a\u65e0\u9700\u590d\u6742\u7684\u8def\u7531\u5668\u8bbe\u7f6e\uff0c\u53ea\u9700\u5b89\u88c5Cloudflared\u5ba2\u6237\u7aef\u5e76\u5b8c\u6210\u51e0\u6b65\u64cd\u4f5c\uff0c\u5373\u53ef\u5feb\u901f\u4e0a\u7ebf\u3002<\/li>\n<\/ul>\n<h2>\u5982\u4f55\u914d\u7f6eCloudflare Tunnel\u5b9e\u73b0\u8de8\u5883\u7535\u5546\u670d\u52a1\u5668\u7a7f\u900f\uff1f<\/h2>\n<ol>\n<li><strong>\u51c6\u5907\u5de5\u4f5c<\/strong>\uff1a\u62e5\u6709\u4e00\u4e2a\u57df\u540d\uff08\u53ef\u5728Cloudflare\u6ce8\u518c\u6216\u8f6c\u79fb\uff09\uff0c\u5e76\u786e\u4fdd\u670d\u52a1\u5668\u80fd\u8054\u7f51\u3002<\/li>\n<li><strong>\u5b89\u88c5Cloudflared\u5ba2\u6237\u7aef<\/strong>\uff1a\u5728\u670d\u52a1\u5668\u4e0a\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff08\u4ee5Linux\u4e3a\u4f8b\uff09\uff1a\n<pre>curl -L https:\/\/github.com\/cloudflare\/cloudflared\/releases\/latest\/download\/cloudflared-linux-amd64.deb -o cloudflared.deb\nsudo dpkg -i cloudflared.deb<\/pre>\n<\/li>\n<li><strong>\u767b\u5f55Cloudflare\u8d26\u53f7<\/strong>\uff1a\u8fd0\u884c<code>cloudflared login<\/code>\uff0c\u6839\u636e\u63d0\u793a\u5728\u6d4f\u89c8\u5668\u4e2d\u6388\u6743\uff0c\u83b7\u53d6\u8bc1\u4e66\u6587\u4ef6\u3002<\/li>\n<li><strong>\u521b\u5efa\u96a7\u9053<\/strong>\uff1a\u8fd0\u884c<code>cloudflared tunnel create my-ecommerce-tunnel<\/code>\uff08\u66ff\u6362\u4e3a\u4f60\u7684\u96a7\u9053\u540d\u79f0\uff09\uff0c\u8bb0\u5f55\u96a7\u9053ID\u3002<\/li>\n<li><strong>\u914d\u7f6e\u670d\u52a1<\/strong>\uff1a\u521b\u5efa\u6216\u7f16\u8f91<code>~\/.cloudflared\/config.yml<\/code>\u6587\u4ef6\uff0c\u6dfb\u52a0\u4ee5\u4e0b\u5185\u5bb9\uff1a\n<pre>tunnel: [\u4f60\u7684\u96a7\u9053ID]\ncredentials-file: ~\/.cloudflared\/[\u96a7\u9053ID].json\ningress:\n  - hostname: erp.yourdomain.com\n    service: http:\/\/localhost:8080  # \u66ff\u6362\u4e3a\u4f60\u7684\u670d\u52a1\u5668\u672c\u5730\u5730\u5740\n  - service: http_status:404<\/pre>\n<\/li>\n<li><strong>\u7ed1\u5b9a\u57df\u540d<\/strong>\uff1a\u8fd0\u884c<code>cloudflared tunnel route dns my-ecommerce-tunnel erp.yourdomain.com<\/code>\uff0c\u5c06\u5b50\u57df\u540d\u7ed1\u5b9a\u5230\u96a7\u9053\u3002<\/li>\n<li><strong>\u542f\u52a8\u96a7\u9053<\/strong>\uff1a\u8fd0\u884c<code>cloudflared tunnel run my-ecommerce-tunnel<\/code>\uff0c\u6216\u8bbe\u7f6e\u4e3a\u5f00\u673a\u81ea\u542f\u3002<\/li>\n<\/ol>\n<h2>\u5ef6\u4f38\u5e94\u7528\uff1aNAS\u5916\u7f51\u8bbf\u95ee\u7684\u4fbf\u6377\u65b9\u6848<\/h2>\n<p>\u9664\u4e86\u8de8\u5883\u7535\u5546\u670d\u52a1\u5668\uff0cCloudflare Tunnel\u4e5f\u80fd\u89e3\u51b3NAS\u7684\u5916\u7f51\u8bbf\u95ee\u95ee\u9898\u3002\u53ea\u9700\u5c06NAS\u7684\u7ba1\u7406\u754c\u9762\uff08\u5982Synology DSM\u7684http:\/\/192.168.1.100:5000\uff09\u4f5c\u4e3a\u672c\u5730\u670d\u52a1\u914d\u7f6e\u5230\u96a7\u9053\u4e2d\uff0c\u5373\u53ef\u901a\u8fc7\u57df\u540d\u5b89\u5168\u8bbf\u95eeNAS\uff0c\u65b9\u4fbf\u8de8\u5883\u5356\u5bb6\u5b58\u50a8\u4ea7\u54c1\u56fe\u7247\u3001\u5907\u4efd\u8ba2\u5355\u6570\u636e\u3002<\/p>\n<h2>\u5de5\u5177\u5bf9\u6bd4\uff1aCloudflare Tunnel vs \u5176\u4ed6\u5185\u7f51\u7a7f\u900f\u5de5\u5177<\/h2>\n<table>\n<thead>\n<tr>\n<th>\u5de5\u5177\u540d\u79f0<\/th>\n<th>\u514d\u8d39\u7248\u672c<\/th>\n<th>\u7a33\u5b9a\u6027<\/th>\n<th>CDN\u52a0\u901f<\/th>\n<th>\u5b89\u5168\u7279\u6027<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Cloudflare Tunnel<\/td>\n<td>\u6838\u5fc3\u529f\u80fd\u514d\u8d39\uff0c\u65e0\u6d41\u91cf\u9650\u5236<\/td>\n<td>\u9ad8\uff08\u4f9d\u6258Cloudflare\u5168\u7403\u7f51\u7edc\uff09<\/td>\n<td>\u6709<\/td>\n<td>TLS 1.3\u52a0\u5bc6\uff0c\u96f6\u4fe1\u4efb\u8bbf\u95ee<\/td>\n<\/tr>\n<tr>\n<td>ngrok<\/td>\n<td>\u514d\u8d39\u7248\u6709\u9650\u6d41\u91cf\uff08\u6bcf\u67081GB\uff09<\/td>\n<td>\u4e2d\uff08\u4f9d\u8d56ngrok\u670d\u52a1\u5668\uff09<\/td>\n<td>\u65e0<\/td>\n<td>\u57fa\u672cTLS\u52a0\u5bc6<\/td>\n<\/tr>\n<tr>\n<td>frp<\/td>\n<td>\u514d\u8d39\uff08\u9700\u81ea\u5efa\u670d\u52a1\u5668\uff09<\/td>\n<td>\u4e2d\uff08\u53d6\u51b3\u4e8e\u81ea\u5efa\u670d\u52a1\u5668\u8d28\u91cf\uff09<\/td>\n<td>\u65e0<\/td>\n<td>\u53ef\u9009\u52a0\u5bc6<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u5bf9\u4e8e\u8de8\u5883\u7535\u5546\u5356\u5bb6\u548cNAS\u7528\u6237\u800c\u8a00\uff0cCloudflare Tunnel\u65e0\u7591\u662f\u5f53\u524d\u6700\u5177\u6027\u4ef7\u6bd4\u7684\u5185\u7f51\u7a7f\u900f\u65b9\u6848\u3002\u5b83\u4e0d\u4ec5\u89e3\u51b3\u4e86\u8bbf\u95ee\u75db\u70b9\uff0c\u8fd8\u63d0\u4f9b\u4e86\u5b89\u5168\u3001\u7a33\u5b9a\u7684\u670d\u52a1\uff0c\u8ba9\u4f60\u65e0\u9700\u62c5\u5fc3\u6280\u672f\u95e8\u69db\u548c\u6210\u672c\u95ee\u9898\uff0c\u4e13\u6ce8\u4e8e\u4e1a\u52a1\u589e\u957f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8de8\u5883\u7535\u5546\u670d\u52a1\u5668\u7684\u8bbf\u95ee\u75db\u70b9 \u8de8\u5883\u7535\u5546\u5356\u5bb6\u5e38\u9762\u4e34\u8fd9\u6837\u7684\u56f0\u5883\uff1a\u672c\u5730\u90e8\u7f72\u7684ERP\u7cfb\u7edf\u3001\u4ea7\u54c1\u6570\u636e\u5e93\u6216\u81ea\u5efa\u670d\u52a1\u5668\uff0c\u56e0\u6ca1\u6709\u516c [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":6002,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-6001","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cftm"],"_links":{"self":[{"href":"https:\/\/blog.lss.lol\/index.php\/wp-json\/wp\/v2\/posts\/6001","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.lss.lol\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.lss.lol\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.lss.lol\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.lss.lol\/index.php\/wp-json\/wp\/v2\/comments?post=6001"}],"version-history":[{"count":0,"href":"https:\/\/blog.lss.lol\/index.php\/wp-json\/wp\/v2\/posts\/6001\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.lss.lol\/index.php\/wp-json\/wp\/v2\/media\/6002"}],"wp:attachment":[{"href":"https:\/\/blog.lss.lol\/index.php\/wp-json\/wp\/v2\/media?parent=6001"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.lss.lol\/index.php\/wp-json\/wp\/v2\/categories?post=6001"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.lss.lol\/index.php\/wp-json\/wp\/v2\/tags?post=6001"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}