summaryrefslogtreecommitdiff
path: root/roles/hysteria/templates/config.json.j2
diff options
context:
space:
mode:
authorrepliqa <sarzilhossain@proton.me>2025-07-23 14:06:15 +0600
committerrepliqa <sarzilhossain@proton.me>2025-07-23 14:06:15 +0600
commit69acb7a82a68eeb439e55b994281056df52c81b1 (patch)
tree7c6a53694e11511a3014470c213255a503f9c95e /roles/hysteria/templates/config.json.j2
v0.0.1alphaHEADmain
Diffstat (limited to 'roles/hysteria/templates/config.json.j2')
-rw-r--r--roles/hysteria/templates/config.json.j252
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
+ }
+ }
+}