inlets 通道
约 1 分钟阅读
inlets
- 不支持 gRPC
- 开源版本限制非常多,不建议使用
- inlets - L7 HTTP/HTTPS 通道
- MIT, Go
- 反向通道 客户端和服务端 - 类似 ngrok, argo tunnel
- 一个进程一个 tunnel
- 自动重连
- 支持 ws 和 wss 通讯
- 支持 http, https, ws 通道
- 默认开启 CORS -
--disable-transport-wrapping
- inlets-pro - L4 通道 - 商业授权
- 支持 TCP 自动 TLS 加密
- ⚠️ 个人 2 通道 180/年,商业 5 通道 1860/年 额外通道 20/月
- 个人认为不值得 - 如果使用较多建议自行实现
- inlets/inletsctlGitHubinlets/inletsctl
- 自动安装配置
# macOS
brew install inlets
# 服务端
# http://localhost:8000
# -t 可设置 Token
inlets server
# 客户端
python -m SimpleHTTPServer 8123
# 启动后访问 localhost:8000 即可
# remote 使用 ws 协议
inlets client --remote 127.0.0.1:8000 --upstream http://127.0.0.1:8123kubernetes operator
Notes
- 使用 websocket 进行 tunnel
- 类似项目 google/huproxyGitHubgoogle/huproxy - 非常简单,好理解
- 使用 rancher/remotedialerGitHubrancher/remotedialerrancher/remotedialer · 使用 websocket 建立通道 · tcp over websocket · 内部会管理多个客户端 · 通过通道进行 - 相当于通过远程进行调用 · Adopter · k3s, rancher笔记:remotedialer 实现 TCP over HTTP WebSocket
- 通过 client 发起 dial,通过 ws 建立通道
- HTTP 头
x-inlets-id- 客户端 uuidx-inlets-upstream- 需要客户端请求的上游
- 没有处理 http2
- pro 有
- 因此无法使用 grpc2
- 检测 http2 支持
curl -sI https://curl.haxx.se -o/dev/null -w '%{http_version}\n'
- 路由逻辑在
pkg/router - server
/- 前端代理/tunnel- client 过来的通道
关联信息
反向链接、本文链接的其他页面和外部资料。
反向链接
- Network Awesome笔记 · inlets
VPN Awesome · Proxy Awesome · cjdelisle/cjdns · GPLv3, C+Python · encrypted IPv6 network using public-key cryptography for address allocation and a distributed hash table for ro...
参考资料
GitHub4 条
- google/huproxygithub.com/google/huproxy
- inlets/inlets-operatorgithub.com/inlets/inlets-operator
- inlets/inletsctlgithub.com/inlets/inletsctl
- rancher/remotedialergithub.com/rancher/remotedialer