Skip to content

Commit f955dc7

Browse files
authored
Add files via upload
Update UI and add Sing-box support
1 parent f264f19 commit f955dc7

4 files changed

Lines changed: 1094 additions & 83 deletions

File tree

README.md

Lines changed: 44 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,29 @@
11
# Chain Proxy Builder
22

3-
A powerful, standalone web application to chain two proxy configurations into a single Xray JSON configuration. This tool is specifically designed to help users combine multiple proxy layers for enhanced connection stability and fixed IP masking.
3+
[GitHub Repository](https://github.com/Hidden-Node/proxy-builder)
4+
5+
A powerful, standalone web application to chain two proxy configurations into a single **Xray** or **Sing-box** JSON configuration. This tool is specifically designed to help users combine multiple proxy layers for enhanced connection stability and fixed IP masking.
46

57
## 🚀 Features
68

79
- **Dual Config Chaining**: Easily chain a primary proxy (e.g., Worker/CDN) with a secondary chain proxy.
8-
- **Protocol Support**: Supports **VLESS**, **VMess**, **Trojan**, **Shadowsocks**, **SOCKS**, and **HTTP**.
9-
- **ECH Support**: Automatically parses and includes `echConfigList` for secure connections.
10-
- **Xray JSON Generation**: Generates a clean, optimized JSON configuration ready for use in Xray clients.
10+
- **Protocol Support**: Supports **VLESS**, **VMess**, **Trojan**, **Shadowsocks**, **SOCKS**, **HTTP**, and **SSH**.
11+
- **Dual Output**: Generates both **Xray** and **Sing-box** JSON configurations.
12+
- **ECH Support**: Automatically parses and includes ECH config for secure connections.
13+
- **Premium UI**: Modern dark-mode interface with glassmorphism, real-time parsing, and flow visualization.
1114
- **Client-Side Only**: All processing happens in your browser. No data is sent to any server.
1215

16+
## 📦 Output Formats
17+
18+
| Output | Client |
19+
|--------|--------|
20+
| **Xray JSON** | Use with any Xray-compatible client (v2rayN, v2rayNG, Nekoray, etc.) |
21+
| **Sing-box JSON** | Use with [sing-box](https://sing-box.sagernet.org/) client |
22+
1323
## 🔗 How it Works
1424

1525
The application generates a configuration that routes your traffic in this sequence:
26+
1627
`You ➔ Config 1 (Proxy) ➔ Config 2 (Chain) ➔ Internet`
1728

1829
This ensures that your final outgoing IP address is that of the **Chain Proxy**, providing a consistent identity for the websites you visit.
@@ -21,9 +32,37 @@ This ensures that your final outgoing IP address is that of the **Chain Proxy**,
2132

2233
1. **Config 1**: Paste your first proxy URL (this can be a Cloudflare Worker, CDN, or any other proxy).
2334
2. **Config 2**: Paste your second proxy URL (the one you want to chain through).
35+
- For **SSH**, click the 🔑 SSH toggle and fill in server, port, username, and password.
2436
3. **Settings**: Adjust DNS servers or SOCKS ports if needed.
2537
4. **Generate**: Click "Generate Chained Config" to get your JSON.
26-
5. **Deploy**: Copy the JSON or download it as a file to use in your preferred VPN client.
38+
5. **Deploy**: Copy the JSON or download it as a file to use in your preferred client.
39+
40+
## 📋 Supported Protocols
41+
42+
| Protocol | URL Format | Notes |
43+
|----------|-----------|-------|
44+
| **VLESS** | `vless://uuid@server:port?params` | |
45+
| **VMess** | `vmess://base64-json` | |
46+
| **Trojan** | `trojan://password@server:port?params` | |
47+
| **Shadowsocks** | `ss://base64(method:pass)@server:port` | No transport (ws, grpc, etc.) and no TLS support |
48+
| **SOCKS** | `socks://user:pass@server:port` | Must include username and password |
49+
| **HTTP** | `http://user:pass@server:port` | Must include username and password |
50+
| **SSH** | 4-field input (server, port, user, password) | **Sing-box only** — not supported by Xray |
51+
52+
## ⚠️ Important Notes
53+
54+
- **SOCKS & HTTP** configs must have **username and password** included.
55+
- **Xray** does not support **raw** (headerless TCP) configs — use TCP with http header type instead.
56+
- **Shadowsocks** cannot have any transport (WebSocket, gRPC, HTTPUpgrade, etc.) and cannot have TLS.
57+
- **SSH** is only supported by **Sing-box**. When SSH is used, the Xray tab is automatically disabled. Use the [sing-box client](https://sing-box.sagernet.org/) for SSH configs.
58+
59+
## 🔧 Supported Transports
60+
61+
TCP, TCP (http header), WebSocket, gRPC, HTTPUpgrade
62+
63+
## 🔒 Supported TLS
64+
65+
TLS, Reality, None
2766

2867
## 📦 Tech Stack
2968

@@ -37,4 +76,3 @@ This project draws inspiration and logic from the [BPB-Worker-Panel](https://git
3776

3877
---
3978
Built with ❤️ for the privacy community.
40-

index.html

Lines changed: 128 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<meta name="viewport" content="width=device-width, initial-scale=1.0">
77
<title>Chain Proxy Builder</title>
88
<meta name="description"
9-
content="Chain two proxy configs together — supports VLESS, VMess, Trojan, Shadowsocks, SOCKS, HTTP">
9+
content="Chain two proxy configs together — supports VLESS, VMess, Trojan, Shadowsocks, SOCKS, HTTP, SSH">
1010
<link rel="preconnect" href="https://fonts.googleapis.com">
1111
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
1212
<link
@@ -27,14 +27,15 @@
2727
<span class="logo-icon">🔗</span>
2828
<h1>Chain Proxy Builder</h1>
2929
</div>
30-
<p class="subtitle">Chain two proxy configs into a single Xray configuration</p>
30+
<p class="subtitle">Chain two proxy configs into Xray & Sing-box configurations</p>
3131
<div class="protocol-badges">
3232
<span class="badge badge-vless">VLESS</span>
3333
<span class="badge badge-vmess">VMess</span>
3434
<span class="badge badge-trojan">Trojan</span>
3535
<span class="badge badge-ss">Shadowsocks</span>
3636
<span class="badge badge-socks">SOCKS</span>
3737
<span class="badge badge-http">HTTP</span>
38+
<span class="badge badge-ssh">SSH <sup class="singbox-only-sup">sing-box</sup></span>
3839
</div>
3940
</header>
4041

@@ -50,14 +51,44 @@ <h2>Config 1 — Main Proxy</h2>
5051
<p class="card-hint">Any proxy config (this becomes the <code>proxy</code> outbound)</p>
5152
</div>
5253
</div>
53-
<span class="protocol-tag" id="protocol1-tag"></span>
54+
<div class="card-header-right">
55+
<button class="ssh-toggle" id="ssh-toggle1" title="Switch to SSH mode">
56+
<span class="ssh-toggle-icon">🔑</span> SSH
57+
</button>
58+
<span class="protocol-tag" id="protocol1-tag"></span>
59+
</div>
5460
</div>
55-
<div class="input-group">
61+
<div class="input-group" id="url-input-group1">
5662
<textarea id="config1-input" class="config-input"
5763
placeholder="Paste proxy URL here...&#10;e.g. vless://uuid@address:port?params#remark"
5864
spellcheck="false"></textarea>
5965
<button class="btn-clear" id="clear1" title="Clear"></button>
6066
</div>
67+
<div class="ssh-form" id="ssh-form1" style="display:none;">
68+
<div class="ssh-fields">
69+
<div class="ssh-field">
70+
<label for="ssh-server1">Server Address</label>
71+
<input type="text" id="ssh-server1" placeholder="e.g. 1.2.3.4 or example.com"
72+
spellcheck="false">
73+
</div>
74+
<div class="ssh-field ssh-field-small">
75+
<label for="ssh-port1">Port</label>
76+
<input type="number" id="ssh-port1" value="22" min="1" max="65535">
77+
</div>
78+
<div class="ssh-field">
79+
<label for="ssh-user1">Username</label>
80+
<input type="text" id="ssh-user1" placeholder="root" spellcheck="false">
81+
</div>
82+
<div class="ssh-field">
83+
<label for="ssh-pass1">Password</label>
84+
<div class="ssh-pass-wrapper">
85+
<input type="password" id="ssh-pass1" placeholder="Enter password" spellcheck="false">
86+
<button class="ssh-pass-toggle" data-target="ssh-pass1" title="Show/Hide">👁️</button>
87+
</div>
88+
</div>
89+
</div>
90+
<button class="btn-clear ssh-clear" id="ssh-clear1" title="Clear SSH fields"></button>
91+
</div>
6192
<div class="parsed-info" id="parsed1"></div>
6293
</div>
6394

@@ -72,14 +103,44 @@ <h2>Config 2 — Chain Proxy</h2>
72103
outbound)</p>
73104
</div>
74105
</div>
75-
<span class="protocol-tag" id="protocol2-tag"></span>
106+
<div class="card-header-right">
107+
<button class="ssh-toggle" id="ssh-toggle2" title="Switch to SSH mode">
108+
<span class="ssh-toggle-icon">🔑</span> SSH
109+
</button>
110+
<span class="protocol-tag" id="protocol2-tag"></span>
111+
</div>
76112
</div>
77-
<div class="input-group">
113+
<div class="input-group" id="url-input-group2">
78114
<textarea id="config2-input" class="config-input"
79115
placeholder="Paste chain proxy URL here...&#10;e.g. vless://uuid@server:port?params#remark"
80116
spellcheck="false"></textarea>
81117
<button class="btn-clear" id="clear2" title="Clear"></button>
82118
</div>
119+
<div class="ssh-form" id="ssh-form2" style="display:none;">
120+
<div class="ssh-fields">
121+
<div class="ssh-field">
122+
<label for="ssh-server2">Server Address</label>
123+
<input type="text" id="ssh-server2" placeholder="e.g. 1.2.3.4 or example.com"
124+
spellcheck="false">
125+
</div>
126+
<div class="ssh-field ssh-field-small">
127+
<label for="ssh-port2">Port</label>
128+
<input type="number" id="ssh-port2" value="22" min="1" max="65535">
129+
</div>
130+
<div class="ssh-field">
131+
<label for="ssh-user2">Username</label>
132+
<input type="text" id="ssh-user2" placeholder="root" spellcheck="false">
133+
</div>
134+
<div class="ssh-field">
135+
<label for="ssh-pass2">Password</label>
136+
<div class="ssh-pass-wrapper">
137+
<input type="password" id="ssh-pass2" placeholder="Enter password" spellcheck="false">
138+
<button class="ssh-pass-toggle" data-target="ssh-pass2" title="Show/Hide">👁️</button>
139+
</div>
140+
</div>
141+
</div>
142+
<button class="btn-clear ssh-clear" id="ssh-clear2" title="Clear SSH fields"></button>
143+
</div>
83144
<div class="parsed-info" id="parsed2"></div>
84145
</div>
85146
</div>
@@ -148,19 +209,49 @@ <h3 class="settings-title">⚙️ Configuration Options</h3>
148209

149210
<!-- Output -->
150211
<div class="output-section" id="output-section" style="display:none;">
151-
<div class="output-header">
152-
<h3>📋 Generated Xray Configuration</h3>
153-
<div class="output-actions">
154-
<button class="btn-copy" id="btn-copy" title="Copy to clipboard">
155-
<span class="copy-icon">📋</span> Copy
156-
</button>
157-
<button class="btn-download" id="btn-download" title="Download as JSON">
158-
<span class="download-icon">💾</span> Download
159-
</button>
212+
<!-- Output Tabs -->
213+
<div class="output-tabs">
214+
<button class="output-tab active" id="tab-xray" data-tab="xray">
215+
<span class="tab-icon"></span> Xray
216+
</button>
217+
<button class="output-tab" id="tab-singbox" data-tab="singbox">
218+
<span class="tab-icon">📦</span> Sing-box
219+
</button>
220+
</div>
221+
222+
<!-- Xray Output -->
223+
<div class="output-panel active" id="panel-xray" data-panel="xray">
224+
<div class="output-header">
225+
<h3>📋 Xray Configuration</h3>
226+
<div class="output-actions">
227+
<button class="btn-copy" id="btn-copy-xray" title="Copy to clipboard">
228+
<span class="copy-icon">📋</span> Copy
229+
</button>
230+
<button class="btn-download" id="btn-download-xray" title="Download as JSON">
231+
<span class="download-icon">💾</span> Download
232+
</button>
233+
</div>
234+
</div>
235+
<div class="output-remark" id="output-remark-xray"></div>
236+
<pre class="output-code"><code id="output-json-xray"></code></pre>
237+
</div>
238+
239+
<!-- Sing-box Output -->
240+
<div class="output-panel" id="panel-singbox" data-panel="singbox">
241+
<div class="output-header">
242+
<h3>📋 Sing-box Configuration</h3>
243+
<div class="output-actions">
244+
<button class="btn-copy" id="btn-copy-singbox" title="Copy to clipboard">
245+
<span class="copy-icon">📋</span> Copy
246+
</button>
247+
<button class="btn-download" id="btn-download-singbox" title="Download as JSON">
248+
<span class="download-icon">💾</span> Download
249+
</button>
250+
</div>
160251
</div>
252+
<div class="output-remark" id="output-remark-singbox"></div>
253+
<pre class="output-code"><code id="output-json-singbox"></code></pre>
161254
</div>
162-
<div class="output-remark" id="output-remark"></div>
163-
<pre class="output-code"><code id="output-json"></code></pre>
164255
</div>
165256

166257
<!-- Info -->
@@ -181,15 +272,35 @@ <h4>Supported Protocols</h4>
181272
<li><strong>Shadowsocks</strong><code>ss://base64(method:pass)@server:port</code></li>
182273
<li><strong>SOCKS</strong><code>socks://user:pass@server:port</code></li>
183274
<li><strong>HTTP</strong><code>http://user:pass@server:port</code></li>
275+
<li><strong>SSH</strong><em>Sing-box only</em> (4-field input: server, port, username, password)
276+
</li>
277+
</ul>
278+
<h4>Output Formats</h4>
279+
<ul>
280+
<li><strong>Xray JSON</strong> — Use with any Xray-compatible client (v2rayN, v2rayNG, Nekoray,
281+
etc.)</li>
282+
<li><strong>Sing-box JSON</strong> — Use with <a href="https://sing-box.sagernet.org/"
283+
target="_blank">sing-box</a> client</li>
184284
</ul>
185285
<h4>Supported Transports</h4>
186286
<p>TCP, TCP (http header), WebSocket, gRPC, HTTPUpgrade</p>
187287
<h4>Supported TLS</h4>
188288
<p>TLS, Reality, None</p>
289+
<h4>⚠️ Important Notes</h4>
290+
<ul>
291+
<li><strong>SOCKS & HTTP</strong> configs must include <strong>username and password</strong>.</li>
292+
<li><strong>Xray</strong> does not support <strong>raw</strong> (headerless TCP) configs.</li>
293+
<li><strong>Shadowsocks</strong> cannot have any transport (WebSocket, gRPC, etc.) and cannot have
294+
TLS.</li>
295+
<li><strong>SSH</strong> is only supported by <a href="https://sing-box.sagernet.org/"
296+
target="_blank">Sing-box</a> — Xray tab is disabled when SSH is used.</li>
297+
</ul>
189298
</div>
190299
</details>
191300

192301
<footer class="footer">
302+
<p>Project Repository: <a href="https://github.com/Hidden-Node/proxy-builder"
303+
target="_blank">Hidden-Node/proxy-builder</a></p>
193304
<p>Based on <a href="https://github.com/bia-pain-bache/BPB-Worker-Panel"
194305
target="_blank">BPB-Worker-Panel</a> chain proxy logic</p>
195306
</footer>

0 commit comments

Comments
 (0)