mirror of
https://github.com/XTLS/Xray-examples.git
synced 2025-06-28 21:26:06 +08:00
151 lines
3.2 KiB
JSON
151 lines
3.2 KiB
JSON
{
|
|
"dns": {
|
|
"servers": ["h2c://8.8.8.8/dns-query"],
|
|
"tag": "dns-query"
|
|
},
|
|
|
|
"inbounds": [
|
|
{
|
|
"port": 4431,
|
|
"listen": "127.0.0.1",
|
|
"tag": "mitim-h11",
|
|
"protocol": "dokodemo-door",
|
|
"settings": {
|
|
"network": "tcp",
|
|
"port": 443,
|
|
"followRedirect": true
|
|
},
|
|
"streamSettings": {
|
|
"security": "tls",
|
|
"tlsSettings": {
|
|
"alpn": ["http/1.1"],
|
|
"certificates": [
|
|
{
|
|
"usage": "issue",
|
|
"certificateFile": "mycert.crt",
|
|
"keyFile": "mycert.key"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"port": 4432,
|
|
"listen": "127.0.0.1",
|
|
"tag": "mitim-h2",
|
|
"protocol": "dokodemo-door",
|
|
"settings": {
|
|
"network": "tcp",
|
|
"port": 443,
|
|
"followRedirect": true
|
|
},
|
|
"streamSettings": {
|
|
"security": "tls",
|
|
"tlsSettings": {
|
|
"alpn": ["h2","http/1.1"],
|
|
"certificates": [
|
|
{
|
|
"usage": "issue",
|
|
"certificateFile": "mycert.crt",
|
|
"keyFile": "mycert.key"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
|
|
{
|
|
"port": 10808,
|
|
"listen": "127.0.0.1",
|
|
"tag": "socks-in",
|
|
"protocol": "socks",
|
|
"sniffing": {
|
|
"enabled": true,
|
|
"destOverride": ["http","tls"]
|
|
}
|
|
}
|
|
],
|
|
"outbounds": [
|
|
{
|
|
"tag": "direct",
|
|
"protocol": "freedom",
|
|
"settings": {
|
|
"domainStrategy": "ForceIP"
|
|
}
|
|
},
|
|
{
|
|
"tag": "dns-out",
|
|
"protocol": "dns"
|
|
},
|
|
{
|
|
"tag": "redirect-out-h11",
|
|
"protocol": "freedom",
|
|
"settings": {
|
|
"redirect": "127.0.0.1:4431"
|
|
}
|
|
},
|
|
{
|
|
"tag": "redirect-out-h2",
|
|
"protocol": "freedom",
|
|
"settings": {
|
|
"redirect": "127.0.0.1:4432"
|
|
}
|
|
},
|
|
{
|
|
"tag": "tls-repack",
|
|
"protocol": "freedom",
|
|
"settings": {
|
|
"domainStrategy": "ForceIP"
|
|
},
|
|
"streamSettings": {
|
|
"security": "tls",
|
|
"tlsSettings": {
|
|
"fingerprint": "chrome",
|
|
"serverName": "www.bing.com",
|
|
"verifyPeerCertInNames": ["fromMitM"],
|
|
"alpn": ["fromMitM"]
|
|
}
|
|
}
|
|
}
|
|
],
|
|
|
|
"routing": {
|
|
"domainStrategy": "AsIs",
|
|
"rules": [
|
|
{
|
|
"outboundTag": "dns-out",
|
|
"inboundTag": ["socks-in"],
|
|
"port": 53
|
|
},
|
|
{
|
|
"outboundTag": "tls-repack",
|
|
"inboundTag": ["mitim-h11", "mitim-h2", "dns-query"]
|
|
},
|
|
{
|
|
"outboundTag": "redirect-out-h11",
|
|
"inboundTag": ["socks-in"],
|
|
"protocol": "tls",
|
|
"domain": ["domain:googlevideo.com"]
|
|
},
|
|
{
|
|
"outboundTag": "redirect-out-h2",
|
|
"inboundTag": ["socks-in"],
|
|
"protocol": "tls",
|
|
"domain": [
|
|
"geosite:google",
|
|
"geosite:twitter",
|
|
"geosite:reddit",
|
|
"geosite:facebook",
|
|
"geosite:instagram",
|
|
"geosite:whatsapp"
|
|
]
|
|
},
|
|
{
|
|
"outboundTag": "direct",
|
|
"inboundTag": ["socks-in"]
|
|
}
|
|
]
|
|
}
|
|
}
|
|
|