内网穿透

把本地端口暴漏到公网

本地启动了 http://127.0.0.1:8080

如何让外部访问 ? 解决办法还是用 cloudflared

使用场景 : 对接支付接口 , 一般都需要联调回调.

类似公网地址 https://hepatitis-morris-likes-arc.trycloudflare.com/

还是 https 的 , 挺方便的

工具下载链接 https://github.com/sfss5362/sharefiles_exe/releases/download/v1/cloudflared-proxy-port.exe

截图

2025-11-09_005224

备份下日志区域

正在启动 cloudflared tunnel...
本地地址: http://127.0.0.1:8080
正在检查本地服务是否可访问...
本地服务响应状态码: 200
✓ 本地服务可访问
查找 cloudflared 可执行文件...
使用已提取的内置 cloudflared: C:\Users\Administrator\AppData\Roaming\com.example\cloudflared_proxy\cloudflared.exe
执行命令: C:\Users\Administrator\AppData\Roaming\com.example\cloudflared_proxy\cloudflared.exe tunnel --url http://127.0.0.1:8080
2025-11-08T16:51:55Z INF Thank you for trying Cloudflare Tunnel. Doing so, without a Cloudflare account, is a quick way to experiment and try it out. However, be aware that these account-less Tunnels have no uptime guarantee, are subject to the Cloudflare Online Services Terms of Use (https://www.cloudflare.com/website-terms/), and Cloudflare reserves the right to investigate your use of Tunnels for violations of such terms. If you intend to use Tunnels in production you should use a pre-created named tunnel by following: https://developers.cloudflare.com/cloudflare-one/connections/connect-apps
2025-11-08T16:51:55Z INF Requesting new quick Tunnel on trycloudflare.com...
2025-11-08T16:51:59Z INF +--------------------------------------------------------------------------------------------+
2025-11-08T16:51:59Z INF |  Your quick Tunnel has been created! Visit it at (it may take some time to be reachable):  |
2025-11-08T16:51:59Z INF |  https://hepatitis-morris-likes-arc.trycloudflare.com                                      |
2025-11-08T16:51:59Z INF +--------------------------------------------------------------------------------------------+
========================================
✓ 公网地址生成成功!
✓ 公网 URL: https://hepatitis-morris-likes-arc.trycloudflare.com
========================================
2025-11-08T16:51:59Z INF Cannot determine default configuration path. No file [config.yml config.yaml] in [~/.cloudflared ~/.cloudflare-warp ~/cloudflare-warp]
2025-11-08T16:51:59Z INF Version 2025.9.1 (Checksum 871c63a23f167ec1a4fc5e2c3de9e91e4f0742af708fb8b86055ddd6da82ea8e)
2025-11-08T16:51:59Z INF GOOS: windows, GOVersion: go1.24.6, GoArch: amd64
2025-11-08T16:51:59Z INF Settings: map[ha-connections:1 protocol:quic url:http://127.0.0.1:8080]
2025-11-08T16:51:59Z INF cloudflared will not automatically update on Windows systems.
2025-11-08T16:51:59Z INF Generated Connector ID: b9c57ccf-8895-467d-9588-303a1d950a11
2025-11-08T16:52:00Z INF Initial protocol quic
2025-11-08T16:52:00Z INF ICMP proxy will use 192.168.100.104 as source for IPv4
2025-11-08T16:52:00Z INF ICMP proxy will use fe80::b028:68aa:3f0c:e9b in zone WLAN as source for IPv6
2025-11-08T16:52:00Z ERR Cannot determine default origin certificate path. No file cert.pem in [~/.cloudflared ~/.cloudflare-warp ~/cloudflare-warp]. You need to specify the origin certificate path by specifying the origincert option in the configuration file, or set TUNNEL_ORIGIN_CERT environment variable originCertPath=
2025-11-08T16:52:00Z INF cloudflared does not support loading the system root certificate pool on Windows. Please use --origin-ca-pool <PATH> to specify the path to the certificate pool
2025-11-08T16:52:00Z INF ICMP proxy will use 192.168.100.104 as source for IPv4
2025-11-08T16:52:00Z INF Tunnel connection curve preferences: [X25519MLKEM768 CurveP256] connIndex=0 event=0 ip=198.41.192.47
2025-11-08T16:52:00Z INF ICMP proxy will use fe80::b028:68aa:3f0c:e9b in zone WLAN as source for IPv6
2025-11-08T16:52:00Z INF Starting metrics server on 127.0.0.1:20241/metrics
2025-11-08T16:52:00Z INF Registered tunnel connection connIndex=0 connection=eb8ea597-b1f5-45e5-846b-6526d9326d95 event=0 ip=198.41.192.47 location=lax10 protocol=quic
2025-11-08T16:53:48Z ERR failed to run the datagram handler error="write udp [::]:63571->198.41.192.47:7844: wsasendto: An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full." connIndex=0 event=0 ip=198.41.192.47
2025-11-08T16:53:48Z ERR failed to accept incoming stream requests error="failed to accept QUIC stream: write udp [::]:63571->198.41.192.47:7844: wsasendto: An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full." connIndex=0 event=0 ip=198.41.192.47
2025-11-08T16:53:48Z ERR failed to serve tunnel connection error="datagram manager encountered a failure while serving" connIndex=0 event=0 ip=198.41.192.47
2025-11-08T16:53:48Z ERR Serve tunnel error error="datagram manager encountered a failure while serving" connIndex=0 event=0 ip=198.41.192.47
2025-11-08T16:53:48Z INF Retrying connection in up to 1s connIndex=0 event=0 ip=198.41.192.47
2025-11-08T16:53:49Z INF Tunnel connection curve preferences: [X25519MLKEM768 CurveP256] connIndex=0 event=0 ip=198.41.192.47
2025-11-08T16:53:49Z ERR Failed to dial a quic connection error="failed to dial to edge with quic: write udp [::]:63571->198.41.192.47:7844: wsasendto: An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full." connIndex=0 event=0 ip=198.41.192.47
2025-11-08T16:53:49Z INF Retrying connection in up to 4s connIndex=0 event=0 ip=198.41.192.47
2025-11-08T16:53:51Z INF Tunnel connection curve preferences: [X25519MLKEM768 CurveP256] connIndex=0 event=0 ip=198.41.192.167
2025-11-08T16:53:52Z INF Registered tunnel connection connIndex=0 connection=b15d6636-b589-4e86-993e-75ae62a345b0 event=0 ip=198.41.192.167 location=lax11 protocol=quic