Created
August 18, 2026 19:54
-
-
Save Appendme/4f03e91b5ba6a5fca0c2609899e9c9cb to your computer and use it in GitHub Desktop.
3x-ui caddyfile example with path routing and direct ip https
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| default_sni 123.123.123.123 | |
| layer4 { | |
| :443 { | |
| @domains tls { | |
| sni example.com www.example.com | |
| } | |
| route @domains { | |
| proxy 3xui:443 | |
| } | |
| route { | |
| proxy localhost:8443 | |
| } | |
| } | |
| } | |
| } | |
| 123.123.123.123:8443 { | |
| tls { | |
| issuer acme { | |
| profile shortlived | |
| } | |
| } | |
| redir /3xui /3xui/ 301 | |
| redir /subs /subs/ 301 | |
| handle /subs/* { | |
| reverse_proxy 3xui:2096 | |
| } | |
| handle /3xui/* { | |
| reverse_proxy 3xui:2053 | |
| } | |
| handle { | |
| error "Not Found" 404 | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment