mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-07-18 13:42:29 +03:00
Add examples
This commit is contained in:
84
examples/amnezia/client.json
Normal file
84
examples/amnezia/client.json
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
{
|
||||||
|
"log":{
|
||||||
|
"level":"error"
|
||||||
|
},
|
||||||
|
"dns":{
|
||||||
|
"servers":[
|
||||||
|
{
|
||||||
|
"address":"local",
|
||||||
|
"detour":"direct"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"endpoints":[
|
||||||
|
{
|
||||||
|
"type":"wireguard",
|
||||||
|
"tag":"wireguard-out",
|
||||||
|
"system":false,
|
||||||
|
"name":"",
|
||||||
|
"mtu":1408,
|
||||||
|
"address":[],
|
||||||
|
"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
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"udp_timeout":"",
|
||||||
|
"workers":0,
|
||||||
|
"amnezia":{
|
||||||
|
"jc":120,
|
||||||
|
"jmin":23,
|
||||||
|
"jmax":911,
|
||||||
|
"s1":0,
|
||||||
|
"s2":0,
|
||||||
|
"h1":1,
|
||||||
|
"h2":2,
|
||||||
|
"h3":3,
|
||||||
|
"h4":4
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"inbounds":[
|
||||||
|
{
|
||||||
|
"type":"mixed",
|
||||||
|
"tag":"mixed-in",
|
||||||
|
"listen_port":7897
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outbounds":[
|
||||||
|
{
|
||||||
|
"type":"direct",
|
||||||
|
"tag":"direct"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type":"dns",
|
||||||
|
"tag":"dns-out"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"route":{
|
||||||
|
"rules":[
|
||||||
|
{
|
||||||
|
"protocol":"dns",
|
||||||
|
"outbound":"dns-out"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"port":53,
|
||||||
|
"outbound":"dns-out"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"final":"wireguard-out",
|
||||||
|
"auto_detect_interface":true
|
||||||
|
}
|
||||||
|
}
|
||||||
79
examples/warp/client.json
Normal file
79
examples/warp/client.json
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
{
|
||||||
|
"log":{
|
||||||
|
"level":"error"
|
||||||
|
},
|
||||||
|
"dns":{
|
||||||
|
"servers":[
|
||||||
|
{
|
||||||
|
"address":"local",
|
||||||
|
"detour":"direct"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"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":""
|
||||||
|
},
|
||||||
|
"amnezia":{
|
||||||
|
"jc":120,
|
||||||
|
"jmin":23,
|
||||||
|
"jmax":911,
|
||||||
|
"h1":1,
|
||||||
|
"h2":2,
|
||||||
|
"h3":3,
|
||||||
|
"h4":4
|
||||||
|
}
|
||||||
|
// Dial Fields
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"inbounds":[
|
||||||
|
{
|
||||||
|
"type":"mixed",
|
||||||
|
"tag":"mixed-in",
|
||||||
|
"listen_port":7897
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outbounds":[
|
||||||
|
{
|
||||||
|
"type":"direct",
|
||||||
|
"tag":"direct"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type":"dns",
|
||||||
|
"tag":"dns-out"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"route":{
|
||||||
|
"rules":[
|
||||||
|
{
|
||||||
|
"protocol":"dns",
|
||||||
|
"outbound":"dns-out"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"port":53,
|
||||||
|
"outbound":"dns-out"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"final":"warp-out",
|
||||||
|
"auto_detect_interface":true
|
||||||
|
},
|
||||||
|
"experimental":{
|
||||||
|
"cache_file":{
|
||||||
|
"enabled":true,
|
||||||
|
"store_warp_config":true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
97
examples/xhttp/client.json
Normal file
97
examples/xhttp/client.json
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
{
|
||||||
|
"log":{
|
||||||
|
"level":"error"
|
||||||
|
},
|
||||||
|
"dns":{
|
||||||
|
"servers":[
|
||||||
|
{
|
||||||
|
"address":"local",
|
||||||
|
"detour":"direct"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"inbounds":[
|
||||||
|
{
|
||||||
|
"type":"mixed",
|
||||||
|
"tag":"mixed-in",
|
||||||
|
"listen_port":7897
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outbounds":[
|
||||||
|
{
|
||||||
|
"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
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"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
|
||||||
|
},
|
||||||
|
"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
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type":"dns",
|
||||||
|
"tag":"dns-out"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"route":{
|
||||||
|
"rules":[
|
||||||
|
{
|
||||||
|
"protocol":"dns",
|
||||||
|
"outbound":"dns-out"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"port":53,
|
||||||
|
"outbound":"dns-out"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"final":"vless-out",
|
||||||
|
"auto_detect_interface":true
|
||||||
|
}
|
||||||
|
}
|
||||||
65
examples/xhttp/server.json
Normal file
65
examples/xhttp/server.json
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
{
|
||||||
|
"log":{
|
||||||
|
"level":"error"
|
||||||
|
},
|
||||||
|
"dns":{
|
||||||
|
"servers":[
|
||||||
|
{
|
||||||
|
"address":"local",
|
||||||
|
"detour":"direct"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"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":[
|
||||||
|
{
|
||||||
|
"name":"user",
|
||||||
|
"uuid":"3179dce2-2ff9-413c-85b4-c1d53ed41668"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"transport":{
|
||||||
|
"type":"xhttp",
|
||||||
|
"mode":"stream-up",
|
||||||
|
"path":"/xhttp"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outbounds":[
|
||||||
|
{
|
||||||
|
"type":"direct",
|
||||||
|
"tag":"direct"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type":"dns",
|
||||||
|
"tag":"dns-out"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"route":{
|
||||||
|
"rules":[
|
||||||
|
{
|
||||||
|
"protocol":"dns",
|
||||||
|
"outbound":"dns-out"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"port":53,
|
||||||
|
"outbound":"dns-out"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"final":"direct",
|
||||||
|
"auto_detect_interface":true
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user