Skip to content

Instantly share code, notes, and snippets.

@phlinhng
Last active June 19, 2021 06:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save phlinhng/6312d0904be9ff2242b45cee1fab3b9b to your computer and use it in GitHub Desktop.
Save phlinhng/6312d0904be9ff2242b45cee1fab3b9b to your computer and use it in GitHub Desktop.
trojan-go with caddy as remote web server & https redirector
must.have.sni.com:80 {
redir https://must.have.sni.com{uri}
}
must.have.sni.com:8080 {
bind 127.0.0.1
root /var/www/html
index index.html
tls off
}
{
"run_type": "server",
"local_addr": "0.0.0.0",
"local_port": 443,
"remote_addr": "127.0.0.1",
"remote_port": 8080,
"log_level": 3,
"password": [
"your_password"
],
"ssl": {
"verify_hostname": true,
"cert": "/path/to/server.crt",
"key": "/path/to/server.key",
"sni": "must.have.sni.com"
},
"router": {
"enabled": true,
"block": [
"geoip:private"
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment