Skip to content

Commit 6135951

Browse files
committed
docs: update README with new features documentation
Add documentation for recently implemented features: - Trojan protocol support with auto-detection - HTTP CONNECT proxy as SOCKS5 alternative - VLESS outbound proxy with full UDP capability - Multi-proxy rotation and automatic failover - Path-based proxy parameters (/socks5://, /http://, /vless://) - New environment variables: TROJAN_PASSWORD, VLESS_OUTBOUND, PROXY_TIMEOUT, PROXY_FALLBACK - Replace socks5_relay query param with globalproxy
1 parent cf37ce0 commit 6135951

2 files changed

Lines changed: 152 additions & 4 deletions

File tree

README.md

Lines changed: 76 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,13 @@ A proxy tool based on Cloudflare Workers and Pages, supporting multiple protocol
1616
- Support for Cloudflare Workers and Pages deployment
1717
- Multiple UUID configuration support
1818
- Custom proxy IP and port support
19-
- SOCKS5 proxy support
19+
- SOCKS5 and HTTP proxy support
20+
- **Trojan protocol support** with auto-detection
21+
- **VLESS outbound proxy** with full UDP capability
22+
- **Multi-proxy rotation** with automatic failover
2023
- Automatic configuration subscription link
2124
- URL query parameter configuration override support
25+
- Path-based proxy parameters (`/socks5://`, `/http://`, `/vless://`)
2226
- Simple and easy deployment process
2327

2428
## Quick Deployment
@@ -45,6 +49,10 @@ A proxy tool based on Cloudflare Workers and Pages, supporting multiple protocol
4549
| `PROXYIP` | No | `1.1.1.1` or `example.com`<br>Multiple: `1.1.1.1:9443,2.2.2.2:8443` | Custom proxy IP and port |
4650
| `SOCKS5` | No | `user:pass@host:port`<br>Multiple: `user1:pass1@host1:port1,user2:pass2@host2:port2` | SOCKS5 proxy configuration |
4751
| `SOCKS5_RELAY` | No | `true` or `false` | Enable SOCKS5 traffic relay |
52+
| `TROJAN_PASSWORD` | No | `your-password` | Trojan password (defaults to UUID if not set) |
53+
| `VLESS_OUTBOUND` | No | `vless://uuid@host:port?type=ws&security=tls` | VLESS outbound proxy URL |
54+
| `PROXY_TIMEOUT` | No | `1500` | Proxy connection timeout in ms (default: 1500) |
55+
| `PROXY_FALLBACK` | No | `true` or `false` | Fallback to direct connection if proxies fail (default: true) |
4856

4957
### URL Query Parameter Configuration
5058

@@ -54,7 +62,21 @@ You can use URL query parameters to directly override environment variable confi
5462
|-----------------|-------------------|---------|-------------|
5563
| `proxyip` | `PROXYIP` | `?proxyip=1.1.1.1:443` | Override proxy IP and port |
5664
| `socks5` | `SOCKS5` | `?socks5=user:pass@host:port` | Override SOCKS5 proxy configuration |
57-
| `socks5_relay` | `SOCKS5_RELAY` | `?socks5_relay=true` | Override SOCKS5 relay setting |
65+
| `http` | - | `?http=user:pass@host:port` | HTTP CONNECT proxy configuration |
66+
| `vless` | `VLESS_OUTBOUND` | `?vless=vless://uuid@host:port` | Override VLESS outbound proxy |
67+
| `globalproxy` | - | `?globalproxy` | Enable global proxy mode (route all traffic) |
68+
69+
### Path-Based Proxy Parameters
70+
71+
You can also configure proxies directly in the URL path:
72+
73+
| Path Format | Example | Description |
74+
|-------------|---------|-------------|
75+
| `/proxyip=` | `/proxyip=1.1.1.1:443` | Set proxy IP via path |
76+
| `/socks5://` | `/socks5://user:pass@host:port` | SOCKS5 proxy via path |
77+
| `/http://` | `/http://user:pass@host:port` | HTTP CONNECT proxy via path |
78+
| `/vless://` | `/vless://uuid@host:port?...` | VLESS outbound via path |
79+
| `/gvless=` | `/gvless=base64-encoded-url` | VLESS outbound (global, base64 encoded) |
5880

5981
> **Security Note**: UUID must be set via environment variables or configuration files, not through URL parameters, to prevent unauthorized identity modifications.
6082
@@ -158,6 +180,41 @@ https://sub.xf.free.hr/auto
158180

159181
## Advanced Configuration
160182

183+
### Trojan Protocol Support
184+
185+
EDtunnel now supports Trojan protocol alongside VLESS, with auto-detection:
186+
187+
- Default password uses UUID if `TROJAN_PASSWORD` is not set
188+
- Trojan subscription URLs are generated automatically on the configuration page
189+
- Access Trojan configuration at `/sub/[uuid]`
190+
191+
### HTTP Proxy Support
192+
193+
As an alternative to SOCKS5, you can use HTTP CONNECT proxy:
194+
195+
```bash
196+
# Via URL path
197+
https://your-domain.workers.dev/http://user:pass@proxy-host:port/sub/uuid
198+
199+
# Via URL parameter
200+
https://your-domain.workers.dev/?http=user:pass@proxy-host:port
201+
```
202+
203+
### VLESS Outbound Proxy
204+
205+
Route traffic through an external VLESS server with full UDP support:
206+
207+
```bash
208+
# Environment variable
209+
VLESS_OUTBOUND=vless://uuid@remote-server:443?type=ws&security=tls&path=/ws
210+
211+
# Via URL path
212+
https://your-domain.workers.dev/vless://uuid@host:port?type=ws&security=tls/sub/your-uuid
213+
214+
# Via URL parameter
215+
https://your-domain.workers.dev/?vless=vless://uuid@host:port
216+
```
217+
161218
### Multiple UUID Support
162219

163220
You can configure multiple UUIDs in these ways:
@@ -222,6 +279,23 @@ Enable SOCKS5 global relay:
222279
SOCKS5_RELAY=true
223280
```
224281

282+
### Multi-Proxy Rotation and Fallback
283+
284+
When configuring multiple proxy addresses, the system provides:
285+
286+
- **Random rotation**: Automatically selects from available proxies
287+
- **Connection timeout**: Configurable via `PROXY_TIMEOUT` (default: 1500ms)
288+
- **Automatic failover**: Tries next proxy on failure
289+
- **Direct fallback**: Falls back to direct connection if all proxies fail (configurable via `PROXY_FALLBACK`)
290+
291+
```bash
292+
# Configure timeout (milliseconds)
293+
PROXY_TIMEOUT=2000
294+
295+
# Disable fallback to direct connection
296+
PROXY_FALLBACK=false
297+
```
298+
225299
Notes:
226300

227301
- Ensure proxy servers are stable and available

README_CN.md

Lines changed: 76 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,13 @@
1616
- 支持 Cloudflare Workers 和 Pages 部署
1717
- 支持多 UUID 配置
1818
- 支持自定义代理 IP 和端口
19-
- 支持 SOCKS5 代理
19+
- 支持 SOCKS5 和 HTTP 代理
20+
- **支持 Trojan 协议**,自动检测协议类型
21+
- **支持 VLESS 出站代理**,完整 UDP 支持
22+
- **支持多代理轮换**,自动故障转移
2023
- 提供自动配置订阅链接
2124
- 支持 URL 查询参数覆盖配置
25+
- 支持路径参数配置代理(`/socks5://``/http://``/vless://`
2226
- 简单易用的部署流程
2327

2428
## 快速部署
@@ -45,6 +49,10 @@
4549
| `PROXYIP` || `1.1.1.1``example.com`<br>多个: `1.1.1.1:9443,2.2.2.2:8443` | 自定义代理IP和端口 |
4650
| `SOCKS5` || `user:pass@host:port`<br>多个: `user1:pass1@host1:port1,user2:pass2@host2:port2` | SOCKS5代理配置 |
4751
| `SOCKS5_RELAY` || `true``false` | 启用SOCKS5流量转发 |
52+
| `TROJAN_PASSWORD` || `your-password` | Trojan密码(不设置则使用UUID) |
53+
| `VLESS_OUTBOUND` || `vless://uuid@host:port?type=ws&security=tls` | VLESS出站代理URL |
54+
| `PROXY_TIMEOUT` || `1500` | 代理连接超时(毫秒,默认:1500) |
55+
| `PROXY_FALLBACK` || `true``false` | 代理失败时回退到直连(默认:true) |
4856

4957
### URL 查询参数配置
5058

@@ -54,10 +62,24 @@
5462
|----------|--------------|------|------|
5563
| `proxyip` | `PROXYIP` | `?proxyip=1.1.1.1:443` | 覆盖代理IP和端口 |
5664
| `socks5` | `SOCKS5` | `?socks5=user:pass@host:port` | 覆盖SOCKS5代理配置 |
57-
| `socks5_relay` | `SOCKS5_RELAY` | `?socks5_relay=true` | 覆盖SOCKS5转发设置 |
65+
| `http` | - | `?http=user:pass@host:port` | HTTP CONNECT代理配置 |
66+
| `vless` | `VLESS_OUTBOUND` | `?vless=vless://uuid@host:port` | 覆盖VLESS出站代理 |
67+
| `globalproxy` | - | `?globalproxy` | 启用全局代理模式(转发所有流量) |
5868

5969
> **安全说明**:UUID 必须通过环境变量或配置文件设置,不能通过 URL 参数设置,以防止未授权修改用户身份。
6070
71+
### 路径参数配置
72+
73+
您也可以通过 URL 路径配置代理:
74+
75+
| 路径格式 | 示例 | 说明 |
76+
|----------|------|------|
77+
| `/proxyip=` | `/proxyip=1.1.1.1:443` | 通过路径设置代理IP |
78+
| `/socks5://` | `/socks5://user:pass@host:port` | 通过路径设置SOCKS5代理 |
79+
| `/http://` | `/http://user:pass@host:port` | 通过路径设置HTTP CONNECT代理 |
80+
| `/vless://` | `/vless://uuid@host:port?...` | 通过路径设置VLESS出站代理 |
81+
| `/gvless=` | `/gvless=base64编码的URL` | VLESS出站代理(全局模式,base64编码) |
82+
6183
#### 使用示例
6284

6385
1. 临时更改代理IP:
@@ -158,6 +180,41 @@ https://sub.xf.free.hr/auto
158180

159181
## 高级配置
160182

183+
### Trojan 协议支持
184+
185+
EDtunnel 现已支持 Trojan 协议,可自动检测协议类型:
186+
187+
- 默认密码使用 UUID(如未设置 `TROJAN_PASSWORD`
188+
- 配置页面自动生成 Trojan 订阅链接
189+
- 访问 `/trojan/[uuid]` 获取纯 Trojan 订阅
190+
191+
### HTTP 代理支持
192+
193+
作为 SOCKS5 的替代方案,您可以使用 HTTP CONNECT 代理:
194+
195+
```bash
196+
# 通过 URL 路径
197+
https://your-domain.workers.dev/http://user:pass@proxy-host:port/sub/uuid
198+
199+
# 通过 URL 参数
200+
https://your-domain.workers.dev/?http=user:pass@proxy-host:port
201+
```
202+
203+
### VLESS 出站代理
204+
205+
将流量通过外部 VLESS 服务器转发,支持完整 UDP:
206+
207+
```bash
208+
# 环境变量
209+
VLESS_OUTBOUND=vless://uuid@remote-server:443?type=ws&security=tls&path=/ws
210+
211+
# 通过 URL 路径
212+
https://your-domain.workers.dev/vless://uuid@host:port?type=ws&security=tls/sub/your-uuid
213+
214+
# 通过 URL 参数
215+
https://your-domain.workers.dev/?vless=vless://uuid@host:port
216+
```
217+
161218
### 多UUID支持
162219

163220
您可以通过以下方式配置多个UUID:
@@ -222,6 +279,23 @@ SOCKS5=192.168.1.1:1080,user:pass@192.168.1.2:1080,192.168.1.3:1080
222279
SOCKS5_RELAY=true
223280
```
224281

282+
### 多代理轮换和故障转移
283+
284+
配置多个代理地址时,系统提供以下功能:
285+
286+
- **随机轮换**:自动从可用代理中随机选择
287+
- **连接超时**:通过 `PROXY_TIMEOUT` 配置(默认:1500毫秒)
288+
- **自动故障转移**:失败时尝试下一个代理
289+
- **直连回退**:所有代理失败时回退到直连(通过 `PROXY_FALLBACK` 配置)
290+
291+
```bash
292+
# 配置超时时间(毫秒)
293+
PROXY_TIMEOUT=2000
294+
295+
# 禁用直连回退
296+
PROXY_FALLBACK=false
297+
```
298+
225299
注意事项:
226300

227301
- 确保代理服务器稳定可用

0 commit comments

Comments
 (0)