Routing Settings

Servers

NetLeafyRelay

Creates a full zipped relay structure for your Netlify Edge deployment.

Fake HTML Generator

Bypass restrictions using uniquely structured safe domains.

Config Editor Options

Select what components of your VLESS config to overwrite.

VLESS Configs

Paste multiple configs here to parse and update them.

Load Balancer

Paste VLESS configs and generate a load balancer config.json.

Output

Generated Xray config.json with load balancing.

Title

Content

0 Configs Generated

Click to see configs

`; } function generateFakeHtmlGrid() { document.getElementById('fake-html-results').style.display = 'none'; showLoader('html-loader'); setTimeout(() => { const container = document.getElementById('fake-html-results'); container.innerHTML = ''; for (let i=0; i<4; i++) { const htmlContent = generateSingleFakeHtml(false); const blob = new Blob([htmlContent], { type: 'text/html' }); const url = URL.createObjectURL(blob); const card = document.createElement('div'); card.className = 'fake-html-card'; card.onclick = () => downloadHtmlBlob(url, i+1); card.innerHTML = `

Click to Download

`; container.appendChild(card); } container.style.display = 'grid'; hideLoader('html-loader'); }, 3000); } function downloadHtmlBlob(url, layoutNum) { const a = document.createElement('a'); a.href = url; a.download = `layout-${layoutNum}.html`; document.body.appendChild(a); a.click(); document.body.removeChild(a); } const infoTexts = { direct_sni: { title: "Direct SNI", content: "In this mode, the SNI is used directly as the config address.

⚠️ It's recommended to use the IP + SNI mode for better connectivity." }, ip_sni: { title: "IP + SNI", content: "This mode increases the connection probability by combining healthy IPs with SNIs.

⚠️ This generates a large number of configs, so test them on a desktop client first." }, parsa: { title: "Server Selection", content: "Switch between community-donated servers, define your own custom server connection details, or use G2ray.

G2ray: Paste your G2ray Config. The routing mode will be locked to IP + SNI for optimal performance." } }; function showInfo(event, key) { event.stopPropagation(); const modal = document.getElementById("infoModal"); if (infoTexts[key]) { document.getElementById("infoModalTitle").innerHTML = infoTexts[key].title; document.getElementById("infoModalBody").innerHTML = infoTexts[key].content; modal.classList.add("active"); } } function closeInfoModal() { const modal = document.getElementById("infoModal"); modal.style.opacity = '0'; setTimeout(() => { modal.classList.remove("active"); modal.style.opacity = ''; }, 300); } function closeInfoModalOnOutside(event) { if (event.target === document.getElementById("infoModal")) closeInfoModal(); } function closeConfigModal() { const modal = document.getElementById("configModal"); modal.style.opacity = '0'; setTimeout(() => { modal.classList.remove("active"); modal.style.opacity = ''; }, 300); } function closeConfigModalOnOutside(event) { if (event.target === document.getElementById("configModal")) closeConfigModal(); } function revealConfigs() { document.getElementById("modal-result-area").classList.remove("blurred"); document.getElementById("result-blur-overlay").classList.add("hidden"); } async function copyConfigs() { const text = document.getElementById("modal-result-area").value; const btn = document.getElementById("modal-copy-btn"); const originalHtml = btn.innerHTML; if (!text) return; let copySuccess = false; try { if (navigator.clipboard && window.isSecureContext) { await navigator.clipboard.writeText(text); copySuccess = true; } else { const ta = document.createElement("textarea"); ta.value = text; ta.style.cssText = "position:fixed;left:-9999px;"; document.body.appendChild(ta); ta.select(); copySuccess = document.execCommand("copy"); document.body.removeChild(ta); } } catch (err) { copySuccess = false; } btn.innerHTML = copySuccess ? "Copied ✓" : "Failed"; setTimeout(() => btn.innerHTML = originalHtml, 2000); } function downloadConfigs() { const text = document.getElementById("modal-result-area").value; if (!text) return; try { const blob = new Blob([text], { type: "text/plain" }), url = URL.createObjectURL(blob), a = document.createElement("a"); a.href = url; const ds = new Date(); a.download = `NetLeafy_Configs_${ds.getFullYear()}${String(ds.getMonth() + 1).padStart(2, '0')}${String(ds.getDate()).padStart(2, '0')}_${String(ds.getHours()).padStart(2, '0')}${String(ds.getMinutes()).padStart(2, '0')}.txt`; document.body.appendChild(a); a.click(); document.body.removeChild(a); URL.revokeObjectURL(url); } catch(e) {} }

Star NetLeafy on GitHubgithub.com/Code-Leafy/NetLeafy