From 85a1a8a53b1125bc4172d342eeec59788d1748cb Mon Sep 17 00:00:00 2001 From: Sergei Maklagin Date: Sun, 15 Jun 2025 22:23:25 +0300 Subject: [PATCH] Format examples --- examples/amnezia/client.json | 99 +++++++++++------------- examples/warp/client.json | 96 ++++++++++++------------ examples/xhttp/client.json | 141 ++++++++++++++++++----------------- examples/xhttp/server.json | 80 ++++++++++---------- 4 files changed, 199 insertions(+), 217 deletions(-) diff --git a/examples/amnezia/client.json b/examples/amnezia/client.json index 797fa059..25274bef 100644 --- a/examples/amnezia/client.json +++ b/examples/amnezia/client.json @@ -1,84 +1,71 @@ { - "log":{ - "level":"error" + "log": { + "level": "error" }, - "dns":{ - "servers":[ + "dns": { + "servers": [ { - "address":"local", - "detour":"direct" + "address": "local", + "detour": "direct" } ] }, - "endpoints":[ + "endpoints": [ { - "type":"wireguard", - "tag":"wireguard-out", - "system":false, - "name":"", - "mtu":1408, - "address":[], - "private_key":"", - "listen_port":10000, - "peers":[ + "type": "wireguard", + "tag": "wireguard-out", + "mtu": 1408, + "address": null, + "private_key": "", + "listen_port": 10000, + "peers": [ { - "address":"example.com", - "port":10001, - "public_key":"", - "pre_shared_key":"", - "allowed_ips":[], - "persistent_keepalive_interval":0, - "reserved":[ - 0, - 0, - 0 - ] + "address": "example.com", + "port": 10001, + "reserved": "AAAA" } ], - "udp_timeout":"", - "workers":0, - "amnezia":{ - "jc":120, - "jmin":23, - "jmax":911, - "s1":0, - "s2":0, - "h1":1, - "h2":2, - "h3":3, - "h4":4 + "udp_timeout": "5m0s", + "amnezia": { + "jc": 120, + "jmin": 23, + "jmax": 911, + "h1": 1, + "h2": 2, + "h3": 3, + "h4": 4 } } ], - "inbounds":[ + "inbounds": [ { - "type":"mixed", - "tag":"mixed-in", - "listen_port":7897 + "type": "mixed", + "tag": "mixed-in", + "listen_port": 7897 } ], - "outbounds":[ + "outbounds": [ { - "type":"direct", - "tag":"direct" + "type": "direct", + "tag": "direct" }, { - "type":"dns", - "tag":"dns-out" + "type": "dns", + "tag": "dns-out" } ], - "route":{ - "rules":[ + "route": { + "rules": [ { - "protocol":"dns", - "outbound":"dns-out" + "protocol": "dns", + "outbound": "dns-out" }, { - "port":53, - "outbound":"dns-out" + "port": 53, + "outbound": "dns-out" } ], - "final":"wireguard-out", - "auto_detect_interface":true + "final": "wireguard-out", + "auto_detect_interface": true } } \ No newline at end of file diff --git a/examples/warp/client.json b/examples/warp/client.json index c32b0d83..22e40bda 100644 --- a/examples/warp/client.json +++ b/examples/warp/client.json @@ -1,79 +1,75 @@ { - "log":{ - "level":"error" + "log": { + "level": "error" }, - "dns":{ - "servers":[ + "dns": { + "servers": [ { - "address":"local", - "detour":"direct" + "address": "local", + "detour": "direct" } ] }, - "endpoints":[ + "endpoints": [ { - "type":"warp", - "tag":"warp-out", - "system":false, - "name":"", - "listen_port":10000, - "udp_timeout":"", - "workers":0, - "profile":{ - "detour":"direct", - "recreate":false, - // for getting existing WARP device profile - "id":"", - "private_key":"", - "auth_token":"" + "type": "warp", + "tag": "warp-out", + "listen_port": 10000, + "udp_timeout": "5m0s", + "amnezia": { + "jc": 120, + "jmin": 23, + "jmax": 911, + "h1": 1, + "h2": 2, + "h3": 3, + "h4": 4 }, - "amnezia":{ - "jc":120, - "jmin":23, - "jmax":911, - "h1":1, - "h2":2, - "h3":3, - "h4":4 + "profile": { + "detour": "direct", + // for getting existing WARP device profile + "id": "", + "private_key": "", + "auth_token": "" } // Dial Fields } ], - "inbounds":[ + "inbounds": [ { - "type":"mixed", - "tag":"mixed-in", - "listen_port":7897 + "type": "mixed", + "tag": "mixed-in", + "listen_port": 7897 } ], - "outbounds":[ + "outbounds": [ { - "type":"direct", - "tag":"direct" + "type": "direct", + "tag": "direct" }, { - "type":"dns", - "tag":"dns-out" + "type": "dns", + "tag": "dns-out" } ], - "route":{ - "rules":[ + "route": { + "rules": [ { - "protocol":"dns", - "outbound":"dns-out" + "protocol": "dns", + "outbound": "dns-out" }, { - "port":53, - "outbound":"dns-out" + "port": 53, + "outbound": "dns-out" } ], - "final":"warp-out", - "auto_detect_interface":true + "final": "warp-out", + "auto_detect_interface": true }, - "experimental":{ - "cache_file":{ - "enabled":true, - "store_warp_config":true + "experimental": { + "cache_file": { + "enabled": true, + "store_warp_config": true } } } \ No newline at end of file diff --git a/examples/xhttp/client.json b/examples/xhttp/client.json index 0c5fcce0..77590c52 100644 --- a/examples/xhttp/client.json +++ b/examples/xhttp/client.json @@ -1,97 +1,98 @@ { - "log":{ - "level":"error" + "log": { + "level": "error" }, - "dns":{ - "servers":[ + "dns": { + "servers": [ { - "address":"local", - "detour":"direct" + "address": "local", + "detour": "direct" } ] }, - "inbounds":[ + "inbounds": [ { - "type":"mixed", - "tag":"mixed-in", - "listen_port":7897 + "type": "mixed", + "tag": "mixed-in", + "listen_port": 7897 } ], - "outbounds":[ + "outbounds": [ { - "type":"direct", - "tag":"direct" + "type": "direct", + "tag": "direct" }, { - "type":"vless", - "tag":"vless-out", - "server":"example.com", - "server_port":443, - "uuid":"3179dce2-2ff9-413c-85b4-c1d53ed41668", - "tls":{ - "enabled":true, - "server_name":"example.com", - "alpn":[ - "h2" // h3 for QUIC - ] + "type": "vless", + "tag": "vless-out", + "server": "example.com", + "server_port": 443, + "uuid": "3179dce2-2ff9-413c-85b4-c1d53ed41668", + "tls": { + "enabled": true, + "server_name": "example.com", + "alpn": "h2" // h3 for QUIC }, - "packet_encoding":"", - "transport":{ - "type":"xhttp", - "mode":"stream-up", - "host":"example.com", - "path":"/xhttp", - "domain_strategy":"prefer_ipv4", - "xmux":{ - "max_concurrency":"0-1", - "max_connections":"0-1", - "c_max_reuse_times":"0-1", - "h_max_request_times":"0-1", - "h_max_reusable_secs":"0-1", - "h_keep_alive_period":60 + "transport": { + "type": "xhttp", + "mode": "stream-up", + "host": "example.com", + "path": "/xhttp", + "domain_strategy": "prefer_ipv4", + "xmux": { + "max_concurrency": "0-1", + "max_connections": "0-1", + "c_max_reuse_times": "0-1", + "h_max_request_times": "0-1", + "h_max_reusable_secs": "0-1", + "h_keep_alive_period": 60 }, - "download":{ - "server":"example.com", - "server_port":443, - "host":"example.com", - "path":"/xhttp", - "domain_strategy":"prefer_ipv4", - "detour":"direct", - "tls":{ - "enabled":true, - "server_name":"example.com", - "alpn":[ - "h2" // h3 for QUIC - ] + "download": { + "mode": "", + "host": "example.com", + "path": "/xhttp", + "domain_strategy": "prefer_ipv4", + "x_padding_bytes": "0-0", + "sc_max_each_post_bytes": "0-0", + "sc_min_posts_interval_ms": "0-0", + "sc_stream_up_server_secs": "0-0", + "xmux": { + "max_concurrency": "0-1", + "max_connections": "0-1", + "c_max_reuse_times": "0-1", + "h_max_request_times": "0-1", + "h_max_reusable_secs": "0-1", + "h_keep_alive_period": 60 }, - "xmux":{ - "max_concurrency":"0-1", - "max_connections":"0-1", - "c_max_reuse_times":"0-1", - "h_max_request_times":"0-1", - "h_max_reusable_secs":"0-1", - "h_keep_alive_period":60 - } + "server": "example.com", + "server_port": 443, + "tls": { + "enabled": true, + "server_name": "example.com", + "alpn": "h2" // h3 for QUIC + }, + "detour": "direct" } - } + }, + "packet_encoding": "" }, { - "type":"dns", - "tag":"dns-out" + "type": "dns", + "tag": "dns-out" } ], - "route":{ - "rules":[ + "route": { + "rules": [ { - "protocol":"dns", - "outbound":"dns-out" + "protocol": "dns", + "outbound": "dns-out" }, { - "port":53, - "outbound":"dns-out" + "port": 53, + "outbound": "dns-out" } ], - "final":"vless-out", - "auto_detect_interface":true + "final": "vless-out", + "auto_detect_interface": true } } \ No newline at end of file diff --git a/examples/xhttp/server.json b/examples/xhttp/server.json index 0df228d3..5775933d 100644 --- a/examples/xhttp/server.json +++ b/examples/xhttp/server.json @@ -1,65 +1,63 @@ { - "log":{ - "level":"error" + "log": { + "level": "error" }, - "dns":{ - "servers":[ + "dns": { + "servers": [ { - "address":"local", - "detour":"direct" + "address": "local", + "detour": "direct" } ] }, - "inbounds":[ + "inbounds": [ { - "type":"vless", - "tag":"vless-out", - "listen":"0.0.0.0", - "listen_port":443, - "tls":{ - "enabled":true, - "server_name":"example.com", - "certificate_path":"/path/to/fullchain.pem", - "key_path":"/path/to/privkey.pem", - "alpn":[ - "h2" // h3 for QUIC - ] - }, - "users":[ + "type": "vless", + "tag": "vless-out", + "listen": "0.0.0.0", + "listen_port": 443, + "users": [ { - "name":"user", - "uuid":"3179dce2-2ff9-413c-85b4-c1d53ed41668" + "name": "user", + "uuid": "3179dce2-2ff9-413c-85b4-c1d53ed41668" } ], - "transport":{ - "type":"xhttp", - "mode":"stream-up", - "path":"/xhttp" + "tls": { + "enabled": true, + "server_name": "example.com", + "alpn": "h2", // h3 for QUIC + "certificate_path": "/path/to/fullchain.pem", + "key_path": "/path/to/privkey.pem" + }, + "transport": { + "type": "xhttp", + "mode": "stream-up", + "path": "/xhttp", } } ], - "outbounds":[ + "outbounds": [ { - "type":"direct", - "tag":"direct" + "type": "direct", + "tag": "direct" }, { - "type":"dns", - "tag":"dns-out" + "type": "dns", + "tag": "dns-out" } ], - "route":{ - "rules":[ + "route": { + "rules": [ { - "protocol":"dns", - "outbound":"dns-out" + "protocol": "dns", + "outbound": "dns-out" }, { - "port":53, - "outbound":"dns-out" + "port": 53, + "outbound": "dns-out" } ], - "final":"direct", - "auto_detect_interface":true + "final": "direct", + "auto_detect_interface": true } -} \ No newline at end of file +}