mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-05-14 00:51:12 +03:00
Add new admin panel, failover, dns fallback, providers, limiters. Update XHTTP
This commit is contained in:
91
examples/provider/inline.json
Normal file
91
examples/provider/inline.json
Normal file
@@ -0,0 +1,91 @@
|
||||
{
|
||||
"log": {
|
||||
"level": "info"
|
||||
},
|
||||
"dns": {
|
||||
"servers": [
|
||||
{
|
||||
"type": "local",
|
||||
"tag": "default"
|
||||
}
|
||||
]
|
||||
},
|
||||
"inbounds": [
|
||||
{
|
||||
"type": "mixed",
|
||||
"tag": "mixed-in",
|
||||
"listen_port": 7897
|
||||
}
|
||||
],
|
||||
"outbounds": [
|
||||
{
|
||||
"type": "direct",
|
||||
"tag": "direct"
|
||||
},
|
||||
{
|
||||
"type": "selector",
|
||||
"tag": "proxy",
|
||||
"outbounds": [
|
||||
"direct"
|
||||
],
|
||||
"providers": [
|
||||
"my-inline"
|
||||
],
|
||||
"default": "direct",
|
||||
"interrupt_exist_connections": true
|
||||
}
|
||||
],
|
||||
"providers": [
|
||||
{
|
||||
"type": "inline",
|
||||
"tag": "my-inline",
|
||||
// Outbounds are listed in-place. They are registered with the
|
||||
// provider on start and become available to any group that
|
||||
// references this provider via "providers" or
|
||||
// "use_all_providers".
|
||||
"outbounds": [
|
||||
{
|
||||
"type": "shadowsocks",
|
||||
"tag": "ss-hk",
|
||||
"server": "hk.example.com",
|
||||
"server_port": 8388,
|
||||
"method": "aes-256-gcm",
|
||||
"password": "password"
|
||||
},
|
||||
{
|
||||
"type": "trojan",
|
||||
"tag": "trojan-jp",
|
||||
"server": "jp.example.com",
|
||||
"server_port": 443,
|
||||
"password": "password",
|
||||
"tls": {
|
||||
"enabled": true,
|
||||
"server_name": "jp.example.com"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "vless",
|
||||
"tag": "vless-sg",
|
||||
"server": "sg.example.com",
|
||||
"server_port": 443,
|
||||
"uuid": "00000000-0000-0000-0000-000000000000",
|
||||
"tls": {
|
||||
"enabled": true,
|
||||
"server_name": "sg.example.com"
|
||||
}
|
||||
}
|
||||
],
|
||||
"health_check": {
|
||||
"enabled": true,
|
||||
"url": "https://www.gstatic.com/generate_204",
|
||||
"interval": "5m",
|
||||
"timeout": "5s"
|
||||
}
|
||||
}
|
||||
],
|
||||
"route": {
|
||||
"final": "proxy",
|
||||
"default_domain_resolver": "default",
|
||||
"auto_detect_interface": true
|
||||
}
|
||||
}
|
||||
64
examples/provider/local.json
Normal file
64
examples/provider/local.json
Normal file
@@ -0,0 +1,64 @@
|
||||
{
|
||||
"log": {
|
||||
"level": "info"
|
||||
},
|
||||
"dns": {
|
||||
"servers": [
|
||||
{
|
||||
"type": "local",
|
||||
"tag": "default"
|
||||
}
|
||||
]
|
||||
},
|
||||
"inbounds": [
|
||||
{
|
||||
"type": "mixed",
|
||||
"tag": "mixed-in",
|
||||
"listen_port": 7897
|
||||
}
|
||||
],
|
||||
"outbounds": [
|
||||
{
|
||||
"type": "direct",
|
||||
"tag": "direct"
|
||||
},
|
||||
// A "selector" group that pulls all of its members from the
|
||||
// outbound provider tagged "my-local". The provider parses the
|
||||
// file at "path" on every change (fswatch-based hot reload).
|
||||
{
|
||||
"type": "selector",
|
||||
"tag": "proxy",
|
||||
"outbounds": [
|
||||
"direct"
|
||||
],
|
||||
"providers": [
|
||||
"my-local"
|
||||
],
|
||||
"default": "direct",
|
||||
"interrupt_exist_connections": true
|
||||
}
|
||||
],
|
||||
"providers": [
|
||||
{
|
||||
"type": "local",
|
||||
"tag": "my-local",
|
||||
// Subscription file. Supported formats are auto-detected:
|
||||
// - sing-box JSON ({ "outbounds": [...] })
|
||||
// - Clash YAML
|
||||
// - SIP008 (shadowsocks)
|
||||
// - Raw shareable links (vless://, vmess://, ss://, trojan://, ...)
|
||||
"path": "subscriptions/my-sub.txt",
|
||||
"health_check": {
|
||||
"enabled": true,
|
||||
"url": "https://www.gstatic.com/generate_204",
|
||||
"interval": "5m",
|
||||
"timeout": "5s"
|
||||
}
|
||||
}
|
||||
],
|
||||
"route": {
|
||||
"final": "proxy",
|
||||
"default_domain_resolver": "default",
|
||||
"auto_detect_interface": true
|
||||
}
|
||||
}
|
||||
72
examples/provider/remote.json
Normal file
72
examples/provider/remote.json
Normal file
@@ -0,0 +1,72 @@
|
||||
{
|
||||
"log": {
|
||||
"level": "info"
|
||||
},
|
||||
"dns": {
|
||||
"servers": [
|
||||
{
|
||||
"type": "local",
|
||||
"tag": "default"
|
||||
}
|
||||
]
|
||||
},
|
||||
"inbounds": [
|
||||
{
|
||||
"type": "mixed",
|
||||
"tag": "mixed-in",
|
||||
"listen_port": 7897
|
||||
}
|
||||
],
|
||||
"outbounds": [
|
||||
{
|
||||
"type": "direct",
|
||||
"tag": "direct"
|
||||
},
|
||||
// The "urltest" group below uses every outbound exposed by every
|
||||
// registered provider thanks to "use_all_providers": true.
|
||||
// The fastest member is selected based on the URL test result.
|
||||
{
|
||||
"type": "urltest",
|
||||
"tag": "auto",
|
||||
"outbounds": [
|
||||
"direct"
|
||||
],
|
||||
"use_all_providers": true,
|
||||
"url": "https://www.gstatic.com/generate_204",
|
||||
"interval": "10m",
|
||||
"tolerance": 50,
|
||||
"interrupt_exist_connections": true
|
||||
}
|
||||
],
|
||||
"providers": [
|
||||
{
|
||||
"type": "remote",
|
||||
"tag": "my-remote",
|
||||
// Subscription URL. The response body can be any auto-detected
|
||||
// format: sing-box JSON, Clash YAML, SIP008, base64-encoded
|
||||
// shareable links, or plain link list.
|
||||
"url": "https://example.com/subscription.txt",
|
||||
"user_agent": "sing-box",
|
||||
// Fetch the subscription through this outbound instead of the
|
||||
// default route (useful when the subscription host is blocked).
|
||||
"download_detour": "direct",
|
||||
// Refresh interval. Minimum is 1 minute; default is 24h.
|
||||
"update_interval": "12h",
|
||||
// Optional regex filters applied after parsing the subscription.
|
||||
// "exclude" wins over "include" when both match.
|
||||
"exclude": "(?i)expire|流量|官网",
|
||||
"include": "(?i)hk|jp|sg|us",
|
||||
"health_check": {
|
||||
"enabled": true,
|
||||
"url": "https://www.gstatic.com/generate_204",
|
||||
"interval": "5m",
|
||||
"timeout": "5s"
|
||||
}
|
||||
}
|
||||
],
|
||||
"route": {
|
||||
"final": "auto",
|
||||
"default_domain_resolver": "default",
|
||||
"auto_detect_interface": true
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user