diff options
Diffstat (limited to 'roles/hysteria/templates/config.json.j2')
| -rw-r--r-- | roles/hysteria/templates/config.json.j2 | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/roles/hysteria/templates/config.json.j2 b/roles/hysteria/templates/config.json.j2 new file mode 100644 index 00000000..40dde2e4 --- /dev/null +++ b/roles/hysteria/templates/config.json.j2 @@ -0,0 +1,52 @@ +{ + "listen": "0.0.0.0:{{ hysteria_port | default('4435') }}", + "tls": { + "cert": "/certs/server-cert.pem", + "key": "/certs/server-key.pem" + }, + "disableUDP": false, + "bandwidth": { + "up": "1 gbps", + "down": "1 gbps" + }, + "auth": { + "type": "userpass", + "userpass": {} + }, + "obfs": { + "type": "salamander", + "salamander": { + "password": "{{ salamander_password }}" + } + }, + "resolver": { + "type": "udp", + "udp": { +{% if not lookup('vars', 'disable_dns', default=false) %} + "addr": "{{ ansible_all_ipv4_addresses[0] }}" +{% else %} + "addr": "9.9.9.9" +{% endif %} + } + }, + "outbounds": [{ + "name": "direct_out", + "type": "direct", + "direct": { + "mode": "auto" + }}], + "trafficStats": { + "listen": "127.0.0.1:9999", + "secret": "secret" + }, + "masquerade": { + "type": "string", + "string": { + "content": "Hello World", + "headers": { + "content-type": "text/plain" + }, + "statusCode": 200 + } + } +} |
