forked from Hidden-Node/proxy-builder
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
489 lines (464 loc) · 26.8 KB
/
Copy pathindex.html
File metadata and controls
489 lines (464 loc) · 26.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Proxy Builder</title>
<meta name="description"
content="Enhance VLESS/Trojan URLs with fragment & fingerprint, or chain two proxy configs together — supports VLESS, VMess, Trojan, Shadowsocks, SOCKS, HTTP, SSH">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link
href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap"
rel="stylesheet">
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="bg-glow bg-glow-1"></div>
<div class="bg-glow bg-glow-2"></div>
<div class="bg-glow bg-glow-3"></div>
<div class="container">
<!-- Header -->
<header class="header">
<div class="logo">
<span class="logo-icon">🧬</span>
<h1>Proxy Builder</h1>
</div>
<p class="subtitle">Enhance proxy URLs (fragment & fingerprint) or chain two proxy configs into Xray &
Sing-box configurations</p>
<div class="protocol-badges">
<span class="badge badge-vless" data-protocol="vless">VLESS</span>
<span class="badge badge-vmess" data-protocol="vmess">VMess</span>
<span class="badge badge-trojan" data-protocol="trojan">Trojan</span>
<span class="badge badge-ss" data-protocol="ss">Shadowsocks</span>
<span class="badge badge-socks" data-protocol="socks">SOCKS</span>
<span class="badge badge-http" data-protocol="http">HTTP</span>
<span class="badge badge-ssh" data-protocol="ssh">SSH <sup class="singbox-only-sup">sing-box</sup></span>
</div>
</header>
<!-- Main Tabs -->
<nav class="main-tabs">
<button class="main-tab active" data-view="enhancer">🧬 Fragment + Fingerprint</button>
<button class="main-tab" data-view="chain">🔗 Chain Builder</button>
</nav>
<!-- ===== View: Chain Builder (existing) ===== -->
<div id="view-chain" style="display:none;">
<!-- Config Inputs -->
<div class="configs-grid">
<!-- Config 1: Main Proxy -->
<div class="config-card" id="config1-card">
<div class="card-header">
<div class="card-title">
<span class="card-icon">1️⃣</span>
<div>
<h2>Config 1 — Main Proxy</h2>
<p class="card-hint">Any proxy config (this becomes the <code>proxy</code> outbound)</p>
</div>
</div>
<div class="card-header-right">
<button class="ssh-toggle" id="ssh-toggle1" title="Switch to SSH mode">
<span class="ssh-toggle-icon">🔑</span> SSH
</button>
<span class="protocol-tag" id="protocol1-tag">—</span>
</div>
</div>
<div class="input-group" id="url-input-group1">
<textarea id="config1-input" class="config-input"
placeholder="Paste proxy URL here... e.g. vless://uuid@address:port?params#remark"
spellcheck="false"></textarea>
<button class="btn-clear" id="clear1" title="Clear">✕</button>
</div>
<div class="ssh-form" id="ssh-form1" style="display:none;">
<div class="ssh-fields">
<div class="ssh-field">
<label for="ssh-server1">Server Address</label>
<input type="text" id="ssh-server1" placeholder="e.g. 1.2.3.4 or example.com"
spellcheck="false">
</div>
<div class="ssh-field ssh-field-small">
<label for="ssh-port1">Port</label>
<input type="number" id="ssh-port1" value="22" min="1" max="65535">
</div>
<div class="ssh-field">
<label for="ssh-user1">Username</label>
<input type="text" id="ssh-user1" placeholder="root" spellcheck="false">
</div>
<div class="ssh-field">
<label for="ssh-pass1">Password</label>
<div class="ssh-pass-wrapper">
<input type="password" id="ssh-pass1" placeholder="Enter password" spellcheck="false">
<button class="ssh-pass-toggle" data-target="ssh-pass1" title="Show/Hide">👁️</button>
</div>
</div>
</div>
<button class="btn-clear ssh-clear" id="ssh-clear1" title="Clear SSH fields">✕</button>
</div>
<div class="parsed-info" id="parsed1"></div>
</div>
<!-- Config 2: Chain Proxy -->
<div class="config-card" id="config2-card">
<div class="card-header">
<div class="card-title">
<span class="card-icon">2️⃣</span>
<div>
<h2>Config 2 — Chain Proxy</h2>
<p class="card-hint">External proxy to chain through (this becomes the <code>chain</code>
outbound)</p>
</div>
</div>
<div class="card-header-right">
<button class="ssh-toggle" id="ssh-toggle2" title="Switch to SSH mode">
<span class="ssh-toggle-icon">🔑</span> SSH
</button>
<span class="protocol-tag" id="protocol2-tag">—</span>
</div>
</div>
<div class="input-group" id="url-input-group2">
<textarea id="config2-input" class="config-input"
placeholder="Paste chain proxy URL here... e.g. vless://uuid@server:port?params#remark"
spellcheck="false"></textarea>
<button class="btn-clear" id="clear2" title="Clear">✕</button>
</div>
<div class="ssh-form" id="ssh-form2" style="display:none;">
<div class="ssh-fields">
<div class="ssh-field">
<label for="ssh-server2">Server Address</label>
<input type="text" id="ssh-server2" placeholder="e.g. 1.2.3.4 or example.com"
spellcheck="false">
</div>
<div class="ssh-field ssh-field-small">
<label for="ssh-port2">Port</label>
<input type="number" id="ssh-port2" value="22" min="1" max="65535">
</div>
<div class="ssh-field">
<label for="ssh-user2">Username</label>
<input type="text" id="ssh-user2" placeholder="root" spellcheck="false">
</div>
<div class="ssh-field">
<label for="ssh-pass2">Password</label>
<div class="ssh-pass-wrapper">
<input type="password" id="ssh-pass2" placeholder="Enter password" spellcheck="false">
<button class="ssh-pass-toggle" data-target="ssh-pass2" title="Show/Hide">👁️</button>
</div>
</div>
</div>
<button class="btn-clear ssh-clear" id="ssh-clear2" title="Clear SSH fields">✕</button>
</div>
<div class="parsed-info" id="parsed2"></div>
</div>
</div>
<!-- Chain Flow Visualization -->
<div class="chain-flow" id="chain-flow">
<div class="flow-node flow-you">
<span class="flow-emoji">💻</span>
<span>You</span>
</div>
<div class="flow-arrow">→</div>
<div class="flow-node flow-proxy" id="flow-proxy">
<span class="flow-emoji">☁️</span>
<span id="flow-proxy-label">Config 1</span>
</div>
<div class="flow-arrow">→</div>
<div class="flow-node flow-chain" id="flow-chain">
<span class="flow-emoji">🔗</span>
<span id="flow-chain-label">Config 2</span>
</div>
<div class="flow-arrow">→</div>
<div class="flow-node flow-target">
<span class="flow-emoji">🌐</span>
<span>Internet</span>
</div>
</div>
<!-- Settings -->
<div class="settings-card">
<h3 class="settings-title">⚙️ Configuration Options</h3>
<div class="settings-grid">
<div class="setting-item">
<label for="dns-server">Remote DNS</label>
<select id="dns-server">
<option value="https://8.8.8.8/dns-query">Google DoH (8.8.8.8)</option>
<option value="https://dns.google/dns-query">Google DoH (dns.google)</option>
<option value="https://dns.adguard-dns.com/dns-query">AdGuard DoH</option>
<option value="https://dns.quad9.net/dns-query">Quad9 DoH</option>
</select>
</div>
<div class="setting-item">
<label for="socks-port">SOCKS Port</label>
<input type="number" id="socks-port" value="10808" min="1" max="65535">
</div>
<div class="setting-item">
<label for="log-level">Log Level</label>
<select id="log-level">
<option value="none">None</option>
<option value="warning" selected>Warning</option>
<option value="error">Error</option>
<option value="info">Info</option>
<option value="debug">Debug</option>
</select>
</div>
</div>
</div>
<!-- Generate Button -->
<div class="generate-section">
<button class="btn-generate" id="btn-generate" disabled>
<span class="btn-icon">⚡</span>
Generate Chained Config
</button>
<p class="generate-hint" id="generate-hint">Paste both configs above to enable</p>
</div>
<!-- Output -->
<div class="output-section" id="output-section" style="display:none;">
<!-- Output Tabs -->
<div class="output-tabs">
<button class="output-tab active" id="tab-xray" data-tab="xray">
<span class="tab-icon">⚡</span> Xray
</button>
<button class="output-tab" id="tab-singbox" data-tab="singbox">
<span class="tab-icon">📦</span> Sing-box
</button>
</div>
<!-- Xray Output -->
<div class="output-panel active" id="panel-xray" data-panel="xray">
<div class="output-header">
<h3>📋 Xray Configuration</h3>
<div class="output-actions">
<button class="btn-copy" id="btn-copy-xray" title="Copy to clipboard">
<span class="copy-icon">📋</span> Copy
</button>
<button class="btn-download" id="btn-download-xray" title="Download as JSON">
<span class="download-icon">💾</span> Download
</button>
</div>
</div>
<div class="output-remark" id="output-remark-xray"></div>
<pre class="output-code"><code id="output-json-xray"></code></pre>
</div>
<!-- Sing-box Output -->
<div class="output-panel" id="panel-singbox" data-panel="singbox">
<!-- Sub Tabs for Sing-box -->
<div class="sub-tabs">
<button class="sub-tab active" data-subtab="singbox-standard">
Standard
</button>
<button class="sub-tab" data-subtab="singbox-nekoray">
Nekoray
</button>
<button class="sub-tab" data-subtab="singbox-nekobox">
Nekobox
</button>
</div>
<!-- Sub Panel: Standard -->
<div class="sub-panel active" id="subpanel-singbox-standard">
<div class="output-header">
<h3>📋 Sing-box Configuration</h3>
<div class="output-actions">
<button class="btn-copy" id="btn-copy-singbox" title="Copy to clipboard">
<span class="copy-icon">📋</span> Copy
</button>
<button class="btn-download" id="btn-download-singbox" title="Download as JSON">
<span class="download-icon">💾</span> Download
</button>
</div>
</div>
<div class="output-remark" id="output-remark-singbox"></div>
<pre class="output-code"><code id="output-json-singbox"></code></pre>
</div>
<!-- Sub Panel: Nekoray -->
<div class="sub-panel" id="subpanel-singbox-nekoray">
<div class="output-header">
<h3>📋 Nekoray Configuration</h3>
<div class="output-actions">
<button class="btn-copy" id="btn-copy-singbox-client" title="Copy to clipboard">
<span class="copy-icon">📋</span> Copy
</button>
<button class="btn-download" id="btn-download-singbox-client" title="Download as JSON">
<span class="download-icon">💾</span> Download
</button>
</div>
</div>
<div class="output-remark" id="output-remark-singbox-client"></div>
<pre class="output-code"><code id="output-json-singbox-client"></code></pre>
</div>
<!-- Sub Panel: Nekobox -->
<div class="sub-panel" id="subpanel-singbox-nekobox">
<div class="output-header">
<h3>📋 Nekobox Configuration</h3>
<div class="output-actions">
<button class="btn-copy" id="btn-copy-nekobox" title="Copy to clipboard">
<span class="copy-icon">📋</span> Copy
</button>
<button class="btn-download" id="btn-download-nekobox" title="Download as JSON">
<span class="download-icon">💾</span> Download
</button>
</div>
</div>
<div class="output-remark" id="output-remark-nekobox"></div>
<pre class="output-code"><code id="output-json-nekobox"></code></pre>
</div>
</div>
</div>
<!-- Info -->
<details class="info-section">
<summary>ℹ️ How Chain Proxy Works</summary>
<div class="info-content">
<p>A <strong>chain proxy</strong> routes your traffic through two proxies in sequence:</p>
<div class="info-flow">
<code>You → Config 1 (Worker/CDN) → Config 2 (Chain) → Internet</code>
</div>
<p>This fixes your outgoing IP address to the chain proxy's IP, ensuring a consistent IP for all
destinations.</p>
<h4>Supported Protocols</h4>
<ul>
<li><strong>VLESS</strong> — <code>vless://uuid@server:port?params</code></li>
<li><strong>VMess</strong> — <code>vmess://base64-json</code></li>
<li><strong>Trojan</strong> — <code>trojan://password@server:port?params</code></li>
<li><strong>Shadowsocks</strong> — <code>ss://base64(method:pass)@server:port</code></li>
<li><strong>SOCKS</strong> — <code>socks://user:pass@server:port</code></li>
<li><strong>HTTP</strong> — <code>http://user:pass@server:port</code></li>
<li><strong>SSH</strong> — <em>Sing-box only</em> (4-field input: server, port, username, password)
</li>
</ul>
<h4>Output Formats</h4>
<ul>
<li><strong>Xray JSON</strong> — Use with any Xray-compatible client (v2rayN, v2rayNG, Nekoray,
etc.)</li>
<li><strong>Sing-box JSON</strong> — Use with <a href="https://sing-box.sagernet.org/"
target="_blank">sing-box</a> client</li>
</ul>
<h4>Supported Transports</h4>
<p>TCP, TCP (http header), WebSocket, gRPC, HTTPUpgrade</p>
<h4>Supported TLS</h4>
<p>TLS, Reality, None</p>
<h4>⚠️ Important Notes</h4>
<ul>
<li><strong>SOCKS & HTTP</strong> configs must include <strong>username and password</strong>.</li>
<li><strong>Xray</strong> does not support <strong>raw</strong> (headerless TCP) configs.</li>
<li><strong>Shadowsocks</strong> cannot have any transport (WebSocket, gRPC, etc.) and cannot have
TLS.</li>
<li><strong>SSH</strong> is only supported by <a href="https://sing-box.sagernet.org/"
target="_blank">Sing-box</a> — Xray tab is disabled when SSH is used.</li>
</ul>
</div>
</details>
<footer class="footer">
<p>Project Repository: <a href="https://github.com/Hidden-Node/proxy-builder"
target="_blank">Hidden-Node/proxy-builder</a></p>
<p>Based on <a href="https://github.com/bia-pain-bache/BPB-Worker-Panel"
target="_blank">BPB-Worker-Panel</a> chain proxy logic</p>
</footer>
</div>
<!-- ===== View: Fragment + Fingerprint Enhancer ===== -->
<div id="view-enhancer">
<!-- Input -->
<div class="config-card" id="enhancer-card">
<div class="card-header">
<div class="card-title">
<span class="card-icon">🧬</span>
<div>
<h2>Proxy URL Enhancer</h2>
<p class="card-hint">Adds <code>cs</code> (cipher suites), <code>fm</code> (fragment mask)
and <code>fp</code> to VLESS / Trojan URLs (supports single or multiple URLs)</p>
</div>
</div>
<div class="card-header-right">
<span class="protocol-tag" id="enhancer-protocol-tag">—</span>
</div>
</div>
<div class="input-group">
<textarea id="enhancer-input" class="config-input"
placeholder="Paste VLESS or Trojan URL(s) here (one per line)... e.g. vless://uuid@address:port?params#remark"
spellcheck="false"></textarea>
<button class="btn-clear" id="enhancer-clear" title="Clear">✕</button>
</div>
<div class="parsed-info" id="enhancer-parsed"></div>
</div>
<!-- Options -->
<div class="settings-card">
<h3 class="settings-title">⚙️ Enhancement Options</h3>
<div class="settings-grid">
<div class="setting-item">
<label for="enhancer-server">Server (IP / Domain)</label>
<input type="text" id="enhancer-server"
placeholder="Auto-filled from URL — empty to keep original" spellcheck="false">
</div>
<div class="setting-item">
<label for="enhancer-fp">Fingerprint (fp)</label>
<select id="enhancer-fp">
<option value="unsafe" selected>unsafe</option>
<option value="chrome">chrome</option>
<option value="firefox">firefox</option>
<option value="safari">safari</option>
<option value="random">random</option>
<option value="none">none</option>
</select>
</div>
<div class="setting-item setting-item-wide">
<label for="enhancer-cs">Cipher Suites (cs) — empty to skip</label>
<textarea id="enhancer-cs" class="setting-textarea" rows="3" spellcheck="false">TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256:TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384:TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384:TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256:TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256:TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256:TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256:TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA:TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA:TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256:TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256</textarea>
</div>
<div class="setting-item setting-item-wide">
<label for="enhancer-fm">Final Mask (fm) — empty to skip</label>
<textarea id="enhancer-fm" class="setting-textarea" rows="5" spellcheck="false">{"tcp": [{"type": "fragment", "settings": {"packets": "tlshello", "lengths": ["5", "94", "1"], "delays": ["0"], "maxSplit": "0"}},{"type": "fragment", "settings": {"packets": "1-1", "lengths": ["109", "1"], "delays": ["1"], "maxSplit": "355"}}]}</textarea>
</div>
</div>
</div>
<!-- Generate -->
<div class="generate-section">
<button class="btn-generate" id="btn-enhance" disabled>
<span class="btn-icon">✨</span>
Enhance URL
</button>
<p class="generate-hint" id="enhance-hint">Paste VLESS or Trojan URL(s) above to enable</p>
</div>
<!-- Output -->
<div class="output-section" id="enhancer-output-section" style="display:none;">
<div class="output-header">
<h3>📋 Enhanced URL(s)</h3>
<div class="output-actions">
<button class="btn-copy" id="btn-copy-enhancer" title="Copy to clipboard">
<span class="copy-icon">📋</span> Copy
</button>
</div>
</div>
<div class="output-remark" id="enhancer-output-remark"></div>
<pre class="output-code enhancer-output-code"><code id="enhancer-output-url"></code></pre>
</div>
<details class="info-section">
<summary>ℹ️ How the Enhancer Works</summary>
<div class="info-content">
<p>Paste <strong>VLESS</strong> or <strong>Trojan</strong> URL(s) (one per line) and this tool adds:</p>
<ul>
<li><strong>cs</strong> — TLS cipher suite list for the handshake.</li>
<li><strong>fm</strong> — final mask / fragment settings (packet fragmentation for TLS
handshakes).</li>
<li><strong>fp</strong> — TLS fingerprint (default <code>unsafe</code>, overrides the URL's own
value).</li>
<li><strong>Server</strong> — IP/domain override, auto-filled from the pasted URL; empty to keep
the original address.</li>
</ul>
<p><code>cs</code> and <code>fm</code> are only added when the config uses <strong>tls</strong>
security. Clear a field to skip that parameter.</p>
<p><strong>⚠️ TLS required:</strong> this tool only works with configs that have <strong>TLS</strong>
enabled (security <code>tls</code> or <code>reality</code>). Non-TLS configs are not supported
and will not work.</p>
<h4>Client Requirements</h4>
<ul>
<li><strong>Windows</strong> — use <strong>v2rayN</strong> version <strong>7.24.7</strong> or
higher.</li>
<li><strong>Android</strong> — use <a href="https://github.com/patterniha/PattNG"
target="_blank">PattNG</a> or <strong>v2rayNG</strong> version <strong>2.3.4</strong> or
higher.</li>
</ul>
</div>
</details>
<footer class="footer">
<p>Project Repository: <a href="https://github.com/Hidden-Node/proxy-builder"
target="_blank">Hidden-Node/proxy-builder</a></p>
<p>Based on <a href="https://github.com/patterniha/PattNG" target="_blank">PattNG</a> export-to-clipboard
logic (cs / fm / fp injection)</p>
</footer>
</div>
</div>
<script src="script.js"></script>
</body>
</html>