Skip to content

Instantly share code, notes, and snippets.

@ju0594
Created November 30, 2018 14:11
Show Gist options
  • Save ju0594/57a612ec40ecd50328b866c94fc87d38 to your computer and use it in GitHub Desktop.
Save ju0594/57a612ec40ecd50328b866c94fc87d38 to your computer and use it in GitHub Desktop.
使用v2ray区分国内外流量实现自动分流
{
"inbound": {
"port": 1081,
"listen": "0.0.0.0",
"protocol": "socks",
"settings": {
"auth": "noauth"
}
},
"inboundDetour": [
{
"port": 1082,
"listen": "0.0.0.0",
"protocol": "http",
"settings": {
"timeout": 1000
}
}
],
"outbound": {
"protocol": "socks",
"settings": {
"servers": [
{
"address": "127.0.0.1",
"port": 2333,
"users": []
}
]
},
"tag": "forgin"
},
"outboundDetour": [
{
"protocol": "freedom",
"settings": {},
"tag": "direct"
}
],
"routing": {
"strategy": "rules",
"settings": {
"domainStrategy": "IPIfNonMatch",
"rules": [
{
"type": "chinaip",
"outboundTag": "direct"
},
{
"type": "chinasites",
"outboundTag": "direct"
},
{
"type": "field",
"ip": [
"0.0.0.0/8",
"10.0.0.0/8",
"100.64.0.0/10",
"127.0.0.0/8",
"169.254.0.0/16",
"172.16.0.0/12",
"192.0.0.0/24",
"192.0.2.0/24",
"192.168.0.0/16",
"198.18.0.0/15",
"198.51.100.0/24",
"203.0.113.0/24",
"::1/128",
"fc00::/7",
"fe80::/10"
],
"outboundTag": "direct"
}
]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment