VLESS & Trojan CDN Configuration Optimizer with ECH support — 100% client-side.
Paste VLESS/Trojan URLs or subscription links, get optimized configs for CDN fronting in one click.
No backend. No build step. Nothing ever leaves your browser.
- Overview
- Features
- Supported Apps
- How It Works
- Tabs
- Optimizer Tab
- ECH Tab
- Default Values
- Supported Inputs
- File Structure
- Installation
- Usage
- Privacy
- Credits
- Copyright & Usage Restrictions
The project has two independent tabs:
| Tab | Purpose |
|---|---|
| بهینهساز (Optimizer) | Optimize VLESS/Trojan configs for CDN fronting |
| تبدیل به ECH (ECH Converter) | Generate ECH-enabled variants of VLESS/Trojan configs |
Each tab has its own input area, its own advanced settings panel, and its own output area. Switching tabs does not lose your input or settings.
- One-click optimization — sets
cs(Cipher Suites),fm(FinalMask) and optionally the address andfpon each config. - VLESS + Trojan support — both protocols are fully optimized. Other protocols are passed through untouched.
- Subscription support — paste a subscription URL (
http(s)://...) and the tool fetches and extracts configs. If the sub is filtered, it automatically retries through multiple CORS proxies. - ZEUS format support — handles JSON subscription responses and base64-encoded subscription content.
- Never rebuilds blindly — each URL is parsed first, then only the required parameters are added or replaced.
- Fragment / name safe — Persian text, emoji and spaces in the
#namepart survive untouched. - Multiple configs at once — one per line, or bulk from subscription.
- Advanced settings — optional server address, fingerprint (
unsafe/chrome/firefox/safari/edge/random), custom Cipher Suites, and custom FinalMask JSON with live validation. - JSON output — export optimized configs as a valid JSON array for desktop/iOS clients.
- Network-aware stream settings — generates the correct
ws/grpc/xhttp/tcp/http/quicblock based on each config'stype. - Security-aware TLS block — emits
tlsSettings,xtlsSettings,realitySettingsor no TLS block based onsecurity. - Parameter fidelity — reads and preserves
alpn,insecure/allowInsecure,muxand other per-config parameters.
- ECH conversion for vless and trojan — build ECH-enabled variants of your configs in one click.
- Full ECH list input — paste one complete ECH value per line (e.g.
cloudflare-ech.com+udp://1.1.1.1). Each line produces a separate variant of every input config. - Custom name template — configure the remark suffix using
{name},{ip},{domain}and{type}placeholders. - Original remark preserved — the original
#fragmentof each config is kept as the base name, and the template is applied on top. - ECH-aware JSON output — produces a valid JSON array where
echConfigListis set on the TLS block of every ECH variant. - Live regeneration — changing the ECH list or name template updates the output immediately.
- Drag & drop
.txtimport and Download TXT export. - Dark + light theme, remembered across visits, with no flash on load.
- Fully responsive — mobile-first, comfortable on desktop.
- Persistent settings — optimizer and ECH preferences are stored in
localStorage. - Private by design — only UI settings are stored in
localStorage. Your config URLs and subscription data are never saved, logged or uploaded.
| Platform | Apps |
|---|---|
| Android | PattNG, v2rayNG, V2rayTun |
| iOS | Streisand, INCY, Happ |
| Windows | PattN, v2rayN |
Important notes:
- Android — use normal or ECH output directly in the apps.
- iOS — first try normal output. If it doesn't work, use the JSON output.
- Windows — PattN supports both normal and JSON. v2rayN may require JSON.
- ECH support — not all clients support
echConfigList. Recommended: PattNG (Android), PattN (Windows), recent Streisand (iOS).
These optimized configurations use parameters (
fm,cs,ech) that only the recommended clients support correctly.
- Parse — VLESS/Trojan URLs and subscription responses are parsed into their components: UUID/password, host, port, query parameters and fragment. Nothing is guessed or regenerated.
- Validate — scheme must be
vless://ortrojan://. UUID (for VLESS) must match the standard v4 format, and the host must exist. - Replace — only
csandfmare always replaced;fpand address are replaced only if you set them in Advanced Settings. - Preserve —
path,security,alpn,encryption,host,type,sni,insecure,allowInsecure, the port, UUID/password and unknown parameters are kept as-is. - Rebuild — parameters are re-emitted in a fixed order, duplicates removed, every key and value passed through
encodeURIComponent(), then the original#fragmentis re-appended.
- Parse inputs — same rules as the optimizer.
- Strip any previous
ech=— the config is cleaned so a fresh value can be applied. - For each ECH line in the ECH list, and for each parsed config, a new variant is created with
ech=<value>appended. - Remark is rebuilt using the name template.
- Output — an ordered list of ECH variants plus a JSON array where each entry has
echConfigListset on the TLS block.
Optimizer tab:
cs, path, security, alpn, encryption, fm, insecure, host, fp, type, allowInsecure, sni
ECH tab:
path, security, alpn, encryption, insecure, host, fp, ech, type, allowInsecure, sni, cs, fm
Unknown parameters are appended after these, in their original order.
The UI is split into two tabs at the top of the page. Each tab has:
- Its own input area (configs or subscription link).
- Its own advanced settings accordion.
- Its own output area with Copy All, Download TXT and JSON Output buttons.
Switching tabs preserves your input and settings in both tabs.
- Config list — one
vless://ortrojan://URL per line, a subscription link, or a base64-encoded subscription body. - Advanced Settings (optional):
- Server address — if set, overrides the host of every config.
- Fingerprint — unsafe / chrome / firefox / safari / edge / random. Default: not modified.
- Cipher Suites (
cs) — applied to every config. - FinalMask (
fm) — JSON fragment profile, applied to every config.
The optimized configs in URL form. Pressing خروجی JSON switches the output to a JSON array where each config becomes a full client profile with DNS, inbounds, outbounds, routing, etc.
- Config list — one
vless://ortrojan://URL per line. - ECH list — one complete ECH value per line. Example:
cloudflare-ech.com+udp://1.1.1.1
cloudflare-ech.com+udp://8.8.8.8
- Name template — controls the remark of each generated config.
| Placeholder | Description |
|---|---|
{name} |
Original config remark. If present in the template, it replaces the default name + template behavior. |
{ip} |
The IP extracted from the ECH line (after udp://). |
{domain} |
The domain extracted from the ECH line (before +). |
{type} |
Protocol (vless or trojan). |
For every combination of (input config) × (ECH line), one config is generated.
Example: 2 configs × 2 ECH lines = 4 output configs.
Each output config has:
ech=<value>set in its URL query.- A remark built from the name template.
echConfigList: "<value>"set on the TLS block of the corresponding JSON entry.
vless://11111111-2222-3333-4444-555555555555@104.16.0.1:443?type=ws&security=tls&path=%2Fpath&host=example.com&sni=example.com&encryption=none&fp=chrome#🇩🇪 آلمان - سرور ۱
vless://11111111-2222-3333-4444-555555555555@104.16.0.1:443?cs=TLS_AES_256_GCM_SHA384%3A...&path=%2Fpath&security=tls&encryption=none&fm=%7B%22tcp%22%3A...%7D&host=example.com&fp=chrome&type=ws&sni=example.com#🇩🇪 آلمان - سرور ۱
vless://11111111-2222-3333-4444-555555555555@104.16.0.1:443?path=%2Fpath&security=tls&encryption=none&host=example.com&fp=chrome&ech=cloudflare-ech.com%2Budp%3A%2F%2F1.1.1.1&type=ws&sni=example.com#🇩🇪 آلمان - سرور ۱ ECH 1.1.1.1
Only the intended parameters change. Hostname, SNI, path, type, port, credentials and original fragment name remain preserved.
(empty — the address of each config is not modified)
(empty — the fingerprint of each config is not modified; JSON output defaults to unsafe)
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
{
"tcp": [
{
"type": "fragment",
"settings": {
"packets": "tlshello",
"lengths": ["0", "104", "1"],
"delays": ["0"],
"maxSplit": "0"
}
},
{
"type": "fragment",
"settings": {
"packets": "1-1",
"lengths": ["114", "1"],
"delays": ["1"],
"maxSplit": "11"
}
}
]
}cloudflare-ech.com+udp://1.1.1.1
cloudflare-ech.com+udp://8.8.8.8
ECH {ip}
| Type | Supported |
|---|---|
vless:// direct URL |
✅ |
trojan:// direct URL |
✅ |
vmess://, ss://, hysteria2://, tuic:// |
✅ passed through unchanged |
Subscription link (http(s)://...) |
✅ |
| ZEUS subscription format | ✅ |
| Base64-encoded subscription content | ✅ |
| Multiple configs | ✅ |
IPv4, IPv6 ([::1]:443) and domain hosts |
✅ |
| WebSocket, gRPC, TCP, XHTTP, HTTPUpgrade | ✅ |
| TLS, Reality, XTLS, none | ✅ |
| Custom ALPN lists | ✅ |
insecure / allowInsecure |
✅ |
mux and muxConcurrency |
✅ |
| Persian / emoji / spaces in fragments | ✅ |
Existing fp, cs, fm, ech values |
✅ replaced |
| Unknown / custom parameters | ✅ preserved |
| Duplicate parameters | ✅ deduplicated |
| Missing port | ✅ preserved as-is |
Configs with $ in the remark |
✅ |
cf-optimizor/
└── index.html
No frameworks, no bundler, no npm. Every icon is an inline SVG; the favicon is a data URI.
git clone https://github.com/ArasTey/cf-optimizor.git
cd cf-optimizorOpen index.html directly, or serve it with:
python3 -m http.server 8080Then open:
http://localhost:8080
- Push the repository to GitHub.
- Open Settings → Pages.
- Select the main branch and
/(root). - Save.
- Paste one or more VLESS/Trojan URLs or a subscription link into the textarea.
- Optionally open Advanced Settings.
- Press بهینهسازی or Ctrl / Cmd + Enter.
- Review the output.
- Use کپی همه, دانلود TXT, or خروجی JSON.
- Switch to the تبدیل به ECH tab.
- Paste your VLESS/Trojan configs into the input area.
- Open تنظیمات پیشرفته ECH.
- Set the ECH list (one full value per line) and the name template.
- Press ساخت ECH + JSON or Ctrl / Cmd + Enter.
- Use کپی همه, دانلود TXT, or خروجی JSON.
- Everything runs in your browser.
- There is no application backend, API, analytics or telemetry.
- Config URLs and subscription data are not saved to localStorage.
- Only UI preferences are stored locally under:
vpn_opt_prefs_v1— optimizer settingsvpn_ech_prefs_v1— ECH settingsvpn_theme— theme preference
- Clearing browser data removes those settings.
Important: subscription fetching necessarily makes a network request to the subscription URL and, when enabled, its configured proxy endpoints. This does not mean the application stores your subscription data on its own server.
Developed by Aras with ☕
- Telegram — @imArasTey
- Free configurations — ZEUS PANEL
- Android client — PattNG / v2rayNG
- Windows client — PattN / v2rayN
Copyright © 2026 Aras. All rights reserved.
This repository and its contents are proprietary unless a separate written license from Aras explicitly states otherwise.
Without prior written permission from Aras, you may not:
- Copy or republish this project or substantial portions of it.
- Fork, mirror, clone or redistribute the repository.
- Rebrand the project and publish it as another project.
- Remove, hide or modify copyright, attribution or ownership notices.
- Sell, sublicense or commercially redistribute the project.
- Publish modified or derivative versions.
- Reuse the source code, UI, design, documentation or branding in another public project.
- Claim the project or any derivative work as your own.
A public GitHub repository may technically expose GitHub's native Fork functionality. GitHub platform functionality cannot be disabled by a README or source-code license.
Accordingly, the repository owner does not grant permission to create or distribute a fork. Any GitHub fork or derivative copy is subject to these usage restrictions unless Aras has granted written permission.
The software is provided for its intended purpose without warranty of any kind. Aras is not responsible for damages, configuration failures, connectivity issues, service interruptions or misuse resulting from the software.
For permission requests, contact @imArasTey.
Built by Aras
Simple. Fast. Client-side.