| 214 | function safeClose(ws) { try { ws.close(1000); } catch {} } |
| 215 | |
| 216 | function landingPage() { |
| 217 | return `<!doctype html> |
| 218 | <html lang="en"><head><meta charset="utf-8"><title>snix worker</title> |
| 219 | <style>body{font-family:system-ui;max-width:40em;margin:4em auto;padding:0 1em}</style> |
| 220 | </head><body> |
| 221 | <h1>snix worker</h1> |
| 222 | <p>This is a private Cloudflare Worker acting as a VLESS proxy for a |
| 223 | <a href="https://github.com/SamNet-dev/snix">snix</a> deployment.</p> |
| 224 | <p>If you're looking at this in a browser, the server is healthy; configure |
| 225 | your proxy client with the UUID the owner gave you to connect.</p> |
| 226 | </body></html>`; |
| 227 | } |