? 一句話優(yōu)勢
?一個二進制文件 chisel = 客戶端 + 服務端,跨平臺(Win/macOS/Linux),無需 root,支持 UDP,自動穿代理,斷線 0 感知。
?? 30 秒極速安裝
# Linux / macOS(單文件)
curl -L https://github.com/jpillora/chisel/releases/latest/download/chisel_linux_amd64 -o chisel && chmod +x chisel
# Windows(PowerShell)
Invoke-WebRequest -Uri "https://github.com/jpillora/chisel/releases/latest/download/chisel_windows_amd64.exe" -OutFile "chisel.exe"
# 或 Go 一鍵裝
go install github.com/jpillora/chisel@latest
# Docker 即開即用
docker run --rm -it jpillora/chisel --help
?? 核心特性(Copy 即用)
| | |
|---|
| 穿透防火墻 | | chisel client http://server:8080 8080 |
| 自動重連 | | |
| 多路復用 | | chisel client server:8080 8080 9090 9999 |
| 反向端口轉發(fā) | | chisel server --reverse |
| SOCKS5 代理 | | --socks5 |
| 身份驗證 | | --auth user:pass |
| TLS 支持 | | --tls-domain example.com |
| 代理鏈 | | --proxy socks://admin:pass@proxy:1080 |
?? 拖布圖(工作原理)

?? 5 個實戰(zhàn)場景(一行命令)
場景 1:內(nèi)網(wǎng)穿透(最常用)
# 服務端(公網(wǎng) VPS)
chisel server --port 9312 --socks5
# 客戶端(內(nèi)網(wǎng)機器)
chisel client https://vps-ip:9312 --auth admin:123456 8080
# 訪問本地 8080 → 自動穿透到內(nèi)網(wǎng)
場景 2:反向 SSH(內(nèi)網(wǎng)機器無公網(wǎng) IP)
# 服務端(公網(wǎng))
chisel server --port 9312 --reverse
# 客戶端(內(nèi)網(wǎng))
chisel client https://vps-ip:9312 R:2222:localhost:22
# 在 VPS 上 ssh -p 2222 localhost → 連接到內(nèi)網(wǎng)機器的 22 端口
場景 3:SOCKS5 代理隧道
# 服務端
chisel server --port 9312 --socks5
# 客戶端
chisel client https://vps-ip:9312 socks
# 瀏覽器設置代理 127.0.0.1:1080 → 所有流量走隧道
場景 4:通過 HTTP 代理連接
chisel client --proxy http://corp-proxy:8080 https://vps-ip:9312 8080
場景 5:stdio 模式(SSH ProxyCommand)
ssh -o ProxyCommand='chisel client https://vps-ip:9312 stdio:%h:%p' user@target.com
?? 安全機制(雙重保險)
- SSH 協(xié)議(crypto/ssh)封裝 HTTP,端到端加密
- ECDSA 密鑰對 隨機生成,啟動時顯示指紋(Base64 SHA256),44 字符 + =
- 服務端:--authfile users.json(用戶白名單)或 --auth user:pass(單用戶)

users.json 示例:
{
"admin:123456": [""], // 全部權限
"user1:pass1": ["192.168.0.*:80"] // 僅 80 端口
}
?? 參數(shù)速查表(服務端)
| | |
|---|
--host | | 0.0.0.0 |
--port | | -p 9312 |
--keyfile | | --keyfile /path/to/key.pem |
--authfile | | --authfile users.json |
--auth | | --auth admin:123456 |
--socks5 | | --socks5 |
--reverse | | --reverse |
--tls-domain | | --tls-domain chisel.example.com |
--pid | | --pid |
-v | | -v |
?? 參數(shù)速查表(客戶端)
| | |
|---|
--fingerprint | | --fingerprint abc123...= |
--auth | | --auth admin:123456 |
--proxy | | --proxy socks://proxy:1080 |
--keepalive | | --keepalive 25s |
--max-retry-count | | --max-retry-count 10 |
--header | | --header "User-Agent: MyApp" |
--tls-skip-verify | | --tls-skip-verify |
?? WebSocket 兼容性
| |
|---|
| IaaS | |
| Heroku | |
| OpenShift | |
| Google App Engine | |
閱讀原文:原文鏈接
該文章在 2026/4/2 12:27:14 編輯過