|
1 |
| -# EDtunnel |
2 |
| - |
3 |
| -<p align="center"> |
4 |
| - <img src="https://raw.githubusercontent.com/6Kmfi6HP/EDtunnel/refs/heads/main/image/logo.png" alt="edgetunnel" style="margin-bottom: -50px;"> |
5 |
| -</p> |
6 |
| - |
7 |
| -EDtunnel 是一个基于 Cloudflare Workers 和 Pages 的代理工具,支持多种协议和配置选项。 |
8 |
| - |
9 |
| -EDtunnel is a proxy tool based on Cloudflare Workers and Pages, supporting multiple protocols and configuration options. |
10 |
| - |
11 |
| -[](https://github.com/6Kmfi6HP/EDtunnel) |
12 |
| -[](https://t.me/edtunnel) |
13 |
| - |
14 |
| -## ✨ 特性 | Features |
15 |
| - |
16 |
| -- 支持 Cloudflare Workers 和 Pages 部署 |
17 |
| -- 支持多 UUID 配置 |
18 |
| -- 支持自定义代理 IP 和端口 |
19 |
| -- 支持 SOCKS5 代理 |
20 |
| -- 提供自动配置订阅链接 |
21 |
| -- 简单易用的部署流程 |
22 |
| - |
23 |
| -- Support for Cloudflare Workers and Pages deployment |
24 |
| -- Multiple UUID configuration support |
25 |
| -- Custom proxy IP and port support |
26 |
| -- SOCKS5 proxy support |
27 |
| -- Automatic configuration subscription link |
28 |
| -- Simple and easy deployment process |
29 |
| - |
30 |
| -## 🚀 快速部署 | Quick Deployment |
31 |
| - |
32 |
| -### 在 Pages.dev 部署 | Deploy on Pages.dev |
33 |
| - |
34 |
| -1. 观看部署教程视频 | Watch deployment tutorial video: |
35 |
| - [YouTube Tutorial](https://www.youtube.com/watch?v=8I-yTNHB0aw) |
36 |
| - |
37 |
| -2. 克隆此仓库并在 Cloudflare Pages 中部署 | Clone this repository and deploy in Cloudflare Pages |
38 |
| - |
39 |
| -### 在 Worker.dev 部署 | Deploy on Worker.dev |
40 |
| - |
41 |
| -1. 从[这里](https://github.com/6Kmfi6HP/EDtunnel/blob/main/_worker.js)复制 `_worker.js` 代码 | Copy `_worker.js` code from [here](https://github.com/6Kmfi6HP/EDtunnel/blob/main/_worker.js) |
42 |
| - |
43 |
| -2. 或者点击下方按钮一键部署 | Or click the button below to deploy directly: |
44 |
| - |
45 |
| - [](https://deploy.workers.cloudflare.com/?url=https://github.com/6Kmfi6HP/EDtunnel) |
46 |
| - |
47 |
| -## ⚙️ 配置说明 | Configuration Guide |
48 |
| - |
49 |
| -### 环境变量配置 | Environment Variables |
50 |
| - |
51 |
| -| 变量名 (Variable) | 是否必需 (Required) | 示例 (Example) | 说明 (Description) | |
52 |
| -|------------------|-------------------|---------------|-------------------| |
53 |
| -| `UUID` | 否 (No) | 单个 (Single): `12345678-1234-1234-1234-123456789012`<br>多个 (Multiple): `uuid1,uuid2,uuid3` | 用户识别码 / User identification | |
54 |
| -| `PROXYIP` | 否 (No) | `1.1.1.1` 或 (or) `example.com`<br>多个 (Multiple): `1.1.1.1:9443,2.2.2.2:8443` | 自定义代理IP和端口 / Custom proxy IP and port | |
55 |
| -| `SOCKS5` | 否 (No) | `user:pass@host:port`<br>多个 (Multiple): `user1:pass1@host1:port1,user2:pass2@host2:port2` | SOCKS5代理配置 / SOCKS5 proxy configuration | |
56 |
| -| `SOCKS5_RELAY` | 否 (No) | `true` 或 (or) `false` | 启用SOCKS5流量转发 / Enable SOCKS5 traffic relay | |
57 |
| - |
58 |
| -### 非443端口配置 | Non-443 Port Configuration |
59 |
| - |
60 |
| -1. 访问 (Visit) `https://proxyip.edtunnel.best/` |
61 |
| -2. 输入 (Enter) `ProxyIP:proxyport` 并点击检查 (and click Check) |
62 |
| -3. 当显示 (When showing) `Proxy IP: true` 时可用 (it's available) |
63 |
| -4. 在 Worker 中配置 (Configure in Worker): `PROXYIP=211.230.110.231:50008` |
64 |
| - |
65 |
| -注意:带端口的代理IP可能在某些仅支持HTTP的Cloudflare站点上无效。 |
66 |
| -Note: Proxy IPs with ports may not work on HTTP-only Cloudflare sites. |
67 |
| - |
68 |
| -### UUID 配置方法 | UUID Configuration |
69 |
| - |
70 |
| -#### 方法一 | Method 1 |
71 |
| -在 `wrangler.toml` 文件中设置(不推荐在公共仓库中使用) |
72 |
| -Set in `wrangler.toml` file (not recommended for public repositories) |
73 |
| - |
74 |
| -```toml |
75 |
| -[vars] |
76 |
| -UUID = "your-uuid-here" |
77 |
| -``` |
78 |
| - |
79 |
| -#### 方法二 | Method 2 |
80 |
| -在 Cloudflare Dashboard 的环境变量中设置(推荐方式) |
81 |
| -Set in Cloudflare Dashboard environment variables (recommended method) |
82 |
| - |
83 |
| -## ⚠️ 重要提示:多项配置分隔符 | Important Note: Multiple Configuration Separator |
84 |
| - |
85 |
| -所有多项配置必须使用英文逗号(,)分隔,不能使用中文逗号(,) |
86 |
| -All multiple configurations MUST use English comma(,) as separator, NOT Chinese comma(,) |
87 |
| - |
88 |
| -✅ 正确示例 | Correct Examples: |
89 |
| -```bash |
90 |
| -# UUID多个配置 | Multiple UUID |
91 |
| -UUID=uuid1,uuid2,uuid3 |
92 |
| - |
93 |
| -# SOCKS5多个代理 | Multiple SOCKS5 proxies |
94 |
| -SOCKS5=192.168.1.1:1080,192.168.1.2:1080 |
95 |
| - |
96 |
| -# PROXYIP多个地址 | Multiple PROXYIP |
97 |
| -PROXYIP=1.1.1.1:443,2.2.2.2:443 |
98 |
| -``` |
99 |
| - |
100 |
| -❌ 错误示例 | Wrong Examples: |
101 |
| -```bash |
102 |
| -# 错误:使用中文逗号 | Wrong: Using Chinese comma |
103 |
| -UUID=uuid1,uuid2,uuid3 |
104 |
| - |
105 |
| -# 错误:使用中文逗号 | Wrong: Using Chinese comma |
106 |
| -SOCKS5=192.168.1.1:1080,192.168.1.2:1080 |
107 |
| -``` |
108 |
| - |
109 |
| -## 📱 快速使用 | Quick Start |
110 |
| - |
111 |
| -### 自动配置订阅 | Auto Configuration Subscribe |
112 |
| - |
113 |
| -使用以下链接获取自动配置 | Use the following link for auto configuration: |
114 | 1 | ```
|
115 |
| -https://sub.xf.free.hr/auto |
| 2 | +npm install |
| 3 | +npm run dev |
116 | 4 | ```
|
117 | 5 |
|
118 |
| -### 查看配置 | View Configuration |
119 |
| - |
120 |
| -- 访问您的域名 | Visit your domain: `https://your-domain.pages.dev` |
121 |
| -- 使用特定UUID | Use specific UUID: `/sub/[uuid]` |
122 |
| -- 查看完整配置 | View full configuration: 直接访问域名根路径 (visit domain root path) |
123 |
| -- 获取订阅内容 | Get subscription content: 访问 `/sub/[uuid]` (visit `/sub/[uuid]`) |
124 |
| - |
125 |
| -## 🔧 高级配置 | Advanced Configuration |
126 |
| - |
127 |
| -### 多UUID支持 | Multiple UUID Support |
128 |
| - |
129 |
| -您可以通过以下方式配置多个UUID | You can configure multiple UUIDs in these ways: |
130 |
| - |
131 |
| -1. 环境变量方式 | Via environment variables: |
132 |
| - ``` |
133 |
| - UUID=uuid1,uuid2,uuid3 |
134 |
| - ``` |
135 |
| - |
136 |
| -2. 配置文件方式 | Via configuration file: |
137 |
| - ```toml |
138 |
| - [vars] |
139 |
| - UUID = "uuid1,uuid2,uuid3" |
140 |
| - ``` |
141 |
| - |
142 |
| -### SOCKS5代理配置 | SOCKS5 Proxy Configuration |
143 |
| - |
144 |
| -支持以下格式 | Supports the following formats: |
145 |
| -- 基础格式 | Basic format: `host:port` |
146 |
| -- 认证格式 | Authentication format: `username:password@host:port` |
147 |
| -- 多代理格式(使用英文逗号分隔)| Multiple proxies (separated by English comma): `proxy1,proxy2,proxy3` |
148 |
| - |
149 |
| -#### 配置示例 | Configuration Examples: |
150 |
| - |
151 |
| -1. 单个代理 | Single Proxy: |
152 |
| -```bash |
153 |
| -# 基础格式 | Basic format |
154 |
| -SOCKS5=192.168.1.1:1080 |
155 |
| - |
156 |
| -# 带认证格式 | With authentication |
157 |
| -SOCKS5=user: [email protected]:1080 |
158 | 6 | ```
|
159 |
| - |
160 |
| -2. 多个代理(使用英文逗号分隔)| Multiple Proxies (separated by English comma): |
161 |
| -```bash |
162 |
| -# 多个基础代理 | Multiple basic proxies |
163 |
| -SOCKS5=192.168.1.1:1080,192.168.1.2:1080,192.168.1.3:1080 |
164 |
| - |
165 |
| -# 多个带认证代理 | Multiple proxies with authentication |
166 |
| -SOCKS5=user1:pass1@host1:port1,user2:pass2@host2:port2 |
167 |
| - |
168 |
| -# 混合格式 | Mixed format |
169 |
| -SOCKS5=192.168.1.1:1080,user: [email protected]:1080,192.168.1.3:1080 |
| 7 | +npm run deploy |
170 | 8 | ```
|
171 |
| - |
172 |
| -#### SOCKS5 代理负载均衡 | SOCKS5 Proxy Load Balancing |
173 |
| - |
174 |
| -当配置多个代理时,系统会自动进行负载均衡: |
175 |
| -When multiple proxies are configured, the system will automatically perform load balancing: |
176 |
| - |
177 |
| -- 随机选择 | Random selection |
178 |
| -- 自动故障转移 | Automatic failover |
179 |
| -- 支持混合认证方式 | Support mixed authentication methods |
180 |
| - |
181 |
| -#### SOCKS5_RELAY 设置 | SOCKS5_RELAY Settings |
182 |
| - |
183 |
| -启用 SOCKS5 全局转发 | Enable SOCKS5 global relay: |
184 |
| -```bash |
185 |
| -SOCKS5_RELAY=true |
186 |
| -``` |
187 |
| - |
188 |
| -注意事项 | Notes: |
189 |
| -- 确保代理服务器稳定可用 | Ensure proxy servers are stable and available |
190 |
| -- 建议使用私有代理以提高安全性 | Recommend using private proxies for better security |
191 |
| -- 多代理配置时使用英文逗号分隔 | Use commas to separate multiple proxies |
192 |
| -- 支持动态添加和移除代理 | Support dynamic proxy addition and removal |
193 |
| - |
194 |
| -## 🚨 注意事项 | Notes |
195 |
| - |
196 |
| -- 带端口的代理IP可能在某些仅HTTP的Cloudflare站点上无效 |
197 |
| -- 多UUID配置时使用英文逗号分隔 |
198 |
| -- 建议通过环境变量设置敏感信息 |
199 |
| -- 定期更新以获取最新功能和安全修复 |
200 |
| - |
201 |
| -- Proxy IPs with ports may not work on HTTP-only Cloudflare sites |
202 |
| -- Use commas to separate multiple UUIDs |
203 |
| -- Recommend setting sensitive information via environment variables |
204 |
| -- Update regularly for latest features and security fixes |
205 |
| - |
206 |
| -## 🔧 环境变量设置 | Environment Variable Settings |
207 |
| - |
208 |
| -### Workers.dev 设置 | Workers.dev Settings |
209 |
| -在 Workers 设置页面配置环境变量 | Configure environment variables in Workers settings page |
210 |
| - |
211 |
| - |
212 |
| -### Pages.dev 设置 | Pages.dev Settings |
213 |
| -在 Pages 设置页面配置环境变量 | Configure environment variables in Pages settings page |
214 |
| - |
215 |
| - |
216 |
| -## 💬 获取帮助 | Get Help |
217 |
| - |
218 |
| -- Telegram 群组 | Telegram Group: [EDtunnel Group](https://t.me/edtunnel) |
219 |
| -- GitHub 仓库 | Repository: [EDtunnel](https://github.com/6Kmfi6HP/EDtunnel) |
220 |
| -- 问题反馈 | Issue Report: [创建新问题 | Create New Issue](https://github.com/6Kmfi6HP/EDtunnel/issues) |
221 |
| -- 功能建议 | Feature Request: [提交建议 | Submit Request](https://github.com/6Kmfi6HP/EDtunnel/discussions) |
222 |
| - |
223 |
| -## 📝 贡献指南 | Contributing |
224 |
| - |
225 |
| -欢迎提交 Pull Request 来改进项目!请确保: |
226 |
| -Welcome Pull Requests to improve the project! Please ensure: |
227 |
| - |
228 |
| -1. 代码符合项目规范 | Code follows project standards |
229 |
| -2. 添加必要的测试 | Add necessary tests |
230 |
| -3. 更新相关文档 | Update relevant documentation |
231 |
| -4. 描述清楚改动原因 | Clearly describe the reasons for changes |
232 |
| - |
233 |
| -## 📜 许可证 | License |
234 |
| - |
235 |
| -本项目采用 MIT 许可证 - 查看 [LICENSE](LICENSE) 文件了解详情 |
236 |
| -This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details |
237 |
| - |
238 |
| -## Star History |
239 |
| - |
240 |
| -<a href="https://star-history.com/#6Kmfi6HP/EDtunnel&Date"> |
241 |
| - <picture> |
242 |
| - <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=6Kmfi6HP/EDtunnel&type=Date&theme=dark" /> |
243 |
| - <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=6Kmfi6HP/EDtunnel&type=Date" /> |
244 |
| - <img alt="Star History Chart" src="https://api.star-history.com/svg?repos=6Kmfi6HP/EDtunnel&type=Date" /> |
245 |
| - </picture> |
246 |
| -</a> |
0 commit comments