v-proxy:极简 Rust HTTP/HTTPS 隧道代理工具
目录

轻量代理,极速转发。v-proxy 是 vtoollab.com 基于 Rust + Tokio + Hyper 打造的一款极简 HTTP/HTTPS 代理工具。
它无需复杂配置,启动后即可作为标准 HTTP Proxy 使用,支持普通 HTTP 请求转发,同时支持 HTTPS 的 CONNECT 隧道模式,将客户端与目标服务器之间建立 TCP 双向透明通道。
相比传统代理软件,v-proxy 更专注于:
- 小体积
- 高并发
- 低延迟
- 无运行环境依赖
适合作为开发测试代理、内网出口代理、服务调试工具以及轻量级网络中继。
核心优势#
完整 HTTP Proxy 支持
支持标准 HTTP 代理协议:
Client
|
|
v-proxy
|
|
HTTP Server自动转发 GET、POST 等普通 HTTP 请求。
- HTTPS CONNECT 隧道
支持 HTTPS 代理核心能力:
Browser
|
| CONNECT example.com:443
|
v-proxy
|
| TCP Tunnel
|
HTTPS Server代理只负责建立 TCP 通道,不解析 HTTPS 加密内容。
- Rust 异步高性能架构
基于:
- Tokio 异步运行时
- Hyper HTTP 引擎
- hyper-util 网络适配层
使用事件驱动模型处理连接:
TCP Connection
|
Tokio Runtime
|
Hyper HTTP
|
Async Tunnel- 双向 TCP 数据转发
HTTPS Tunnel 建立后:
Client
|
| io::copy()
|
Upstream
Upstream
|
| io::copy()
|
Client两个异步任务分别负责:
客户端 → 目标服务器
目标服务器 → 客户端
零业务侵入
HTTPS 流量不会经过解密:
Browser
|
| TLS
|
v-proxy
|
| TLS
|
Serverv-proxy 只作为 TCP Relay。
- 单文件部署
基于 Rust 编译:
- 无 Python
- 无 Java
- 无 Node.js
- 无额外运行环境
编译后直接运行。
工作流程#
HTTP 请求#
普通 HTTP 请求:
Client
|
| GET [http://example.com/](http://example.com/)
|
v-proxy
|
| Forward Request
|
Remote Serverv-proxy 接收请求后,通过 Hyper Client 自动访问目标服务器,并返回响应。
HTTPS 请求#
HTTPS 通常不会直接发送代理请求,而是先建立 CONNECT:
Client
|
| CONNECT google.com:443
|
v-proxy
|
| TCP connect
|
google.com:443连接成功:
HTTP/1.1 200 OK随后:
Client <===============> ServerEncrypted TLS Tunnel
代理进入纯 TCP 转发模式。
技术架构#
v-proxy
+-------------------+
| Hyper HTTP Server |
+-------------------+
|
|
+-------------------+
| Request Handler |
+-------------------+
/ \
/ \
HTTP Forward CONNECT Tunnel| |
Hyper Client Tokio TCP Stream| |
Remote HTTP Async TCP Relay核心组件:
| 组件 | 作用 |
|---|---|
| Tokio | 异步网络运行时 |
| Hyper | HTTP Server / Client |
| hyper-util | Tokio 网络适配 |
| TcpStream | TCP 隧道连接 |
| io::copy | 高速双向数据转发 |
使用方式#
启动:
v-proxy.exe默认监听:
0.0.0.0:18000输出:
listening on http://0.0.0.0:18000浏览器代理设置:
HTTP Proxy:
Host:
127.0.0.1
Port:
18000即可使用。
示例#
HTTP#
请求:
http://example.com数据流:
Browser
|
|
v-proxy:18000
|
|
example.com:80HTTPS#
请求:
https://example.com数据流:
Browser
|
CONNECT example.com:443
|
v-proxy
|
example.com:443适用场景#
v-proxy 适合:
- 开发测试 HTTP Proxy
- 内网出口代理
- 云服务器代理转发
- 网络调试
- API 调试
- HTTPS Tunnel 中继
- Cloudflare Tunnel 前置代理
- 小型团队共享代理
例如:
办公室网络
|
|
v-proxy
|
|
云服务器出口
|
|
Internet为什么使用 Rust?#
传统代理通常依赖:
- Nginx
- Squid
- Java Proxy
- Node.js Proxy
v-proxy 使用 Rust:
Rust
|
|
Tokio Async Runtime
|
|
Hyper HTTP Engine
|
|
Native TCP优势:
- 内存占用低
- 高并发连接能力
- 无 GC 停顿
- 单二进制发布
编译#
安装 Rust:
rustup install stable编译:
cargo build --release生成:
target/release/v-proxy.exe复制即可运行。
下载#
⬇️ 立即下载 v-proxy.zip#
版本:0.1.0 | 系统:Windows / Linux (x64)
这里还没有任何文章可以列出。