惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

宝玉的分享
宝玉的分享
Apple Machine Learning Research
Apple Machine Learning Research
J
Java Code Geeks
V2EX - 技术
V2EX - 技术
Hacker News: Ask HN
Hacker News: Ask HN
T
Tailwind CSS Blog
V
Visual Studio Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
月光博客
月光博客
H
Hacker News: Front Page
D
DataBreaches.Net
GbyAI
GbyAI
Recorded Future
Recorded Future
IT之家
IT之家
H
Heimdal Security Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Schneier on Security
Schneier on Security
P
Privacy International News Feed
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
S
Security Affairs
博客园 - 三生石上(FineUI控件)
M
MIT News - Artificial intelligence
Google Online Security Blog
Google Online Security Blog
L
LINUX DO - 最新话题
Google DeepMind News
Google DeepMind News
The Cloudflare Blog
L
LangChain Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
腾讯CDC
The Last Watchdog
The Last Watchdog
I
Intezer
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Hacker News - Newest:
Hacker News - Newest: "LLM"
Stack Overflow Blog
Stack Overflow Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
U
Unit 42
H
Help Net Security
Simon Willison's Weblog
Simon Willison's Weblog
Y
Y Combinator Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
S
Schneier on Security
T
Tenable Blog
TaoSecurity Blog
TaoSecurity Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
小众软件
小众软件
B
Blog
S
Security @ Cisco Blogs
A
About on SuperTechFans
V
V2EX
T
The Exploit Database - CXSecurity.com

Alliot's blog

Docker 代理配置机制与作用域 Docker 代理配置机制与作用域 2025年底的安卓搞机备忘录 2025年底的安卓搞机备忘录 ArgoCD部署应用出现metadata.annotations过大问题 ArgoCD部署应用出现metadata.annotations过大问题 APC UPS更换电池校准容量 APC UPS更换电池校准容量 M1 Mac安装低版本Node.js M1 Mac安装低版本Node.js Ansible使用Bitwarden存储Vault密码 Ansible使用Bitwarden存储Vault密码 Cloudflare Tunnel前置代理支持 CDN场景下配置Vaultwarden启用fail2ban CDN场景下配置Vaultwarden启用fail2ban 中银香港丝滑开户总结 中银香港丝滑开户总结 从指定路径更新雷池WAF证书 从指定路径更新雷池WAF证书 AWS ECS使用EBS作为Volume AWS ECS使用EBS作为Volume 浅浅的调教一下国产智障电视 浅浅的调教一下国产智障电视 Nginx proxy_pass到AWS ALB的504问题 Nginx proxy_pass到AWS ALB的504问题 OpenV**手动指定路由规则 OpenV**手动指定路由规则 本地模拟CNAME解析 本地模拟CNAME解析 Nginx搭建WebDAV服务 Nginx搭建WebDAV服务 迎来船新版本的Hexo+NexT 迎来船新版本的Hexo+NexT 优雅的处理Git多帐号与代理问题 优雅的处理Git多帐号与代理问题 验光配镜扫盲 验光配镜扫盲 Prometheus relabel实现动态metrics path Prometheus relabel实现动态metrics path
Cloudflare Tunnel前置代理支持
Alliot · 2024-09-01 · via Alliot's blog

  赛博大善人的 Cloudflare Tunnel(前 Argo Tunnel) 只需要一个域名、一个 Cloudflare 帐号便可以将服务接入到 Cloudflare 的网络,提供了非常方便的内网穿透方式, 同时还提供了 ZeroTrust、防护等功能, 而这一切基本几乎都是免费的,相信看到此文的小伙伴已经薅上一段时间了,不过由于 Cloudflare Tunnel 官方的服务节点分布有限,在部分时空/场景下,Tunnel 连通性会面临一些挑战, 这时候要是能够通过前置代理去连接到 Tunnel 服务,问题便能得到解决,可惜官方目前并没打算支持这个特性

  目前比较有效的方案是 Xiaomage 同学的: Cloudflare Tunnel速度慢?尝试给它加个前置代理提高速度 ,不过这种方式对动手能力还是有点要求的,同时也增加了部署的依赖。
  这里看到社区有一个来自 Asutorufa 的PR: http2 tunnel support
经过测试,发现基本能实现这个需求。 根据这个思路,Fork 仓库后简单的加了个 GitHub Action 打包发布 Docker 镜像。

  顺便放一个 Docker compose 片段:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
cloudflare-tunnel:
image: ghcr.io/alliottech/cloudflared_proxy:latest

container_name: cloudflare-tunnel
hostname: cloudflare-tunnel
restart: unless-stopped
command: tunnel run --protocol http2
links:
- "nginx"
volumes:
- /etc/localtime:/etc/localtime:ro
environment:
- "all_proxy=socks5://127.0.0.1:123"
- "TUNNEL_TRANSPORT_PROTOCOL=http2"
- "TUNNEL_TOKEN=xxxxxxxx"

  直接替换之前的官方镜像片段为上述后即可愉快的玩耍了, 切记 TUNNEL_TRANSPORT_PROTOCOL=http2 这个环境变量是必须的:

https://github.com/cloudflare/cloudflared/pull/1020#issuecomment-1706843025
This is something that we don’t actually want to support within cloudflared.
Furthermore, http2 transport only has a subset of features that cloudflared allows and the official transport to use should be QUIC, which wouldn’t work for the SOCKS proxy.

  当然,你也可以选择 Clone 仓库后,手动打包二进制直接使用:

1
make cloudflared TARGET_ARCH=amd64 TARGET_OS=linux

使用编译后的 cloudflared:

1
all_proxy=socks5://127.0.0.1:123 ./cloudflared tunnel run --protocol http2

Ref

Cloudflare Tunnel速度慢?尝试给它加个前置代理提高速度
探索Cloudflared Tunnel