Last active
November 5, 2023 15:01
-
-
Save jimmylu2333/bf2252ade4d4ecd901e27bdee2015ad5 to your computer and use it in GitHub Desktop.
v2ray配置文件 - v2ray client configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"policy" : { | |
"levels": { | |
"0": { | |
"handshake": 4, | |
"connIdle": 300, | |
"uplinkOnly": 300, | |
"downlinkOnly": 300 | |
} | |
} | |
}, | |
"dns": { | |
"hosts": {}, | |
"servers": [ | |
"223.5.5.5", | |
"114.114.114.114", | |
"8.8.8.8", | |
"8.8.4.4", | |
"localhost" | |
] | |
}, | |
"outboundDetour" : [ | |
{ | |
"protocol" : "freedom", | |
"tag" : "direct", | |
"settings" : {} | |
}, | |
{ | |
"protocol": "blackhole", | |
"settings": {}, | |
"tag": "block" | |
} | |
], | |
"inboundDetour": [ | |
{ | |
"protocol": "dokodemo-door", | |
"port": 10000, | |
"settings": { | |
"address": "000.000.000.000", | |
"port": 10000, | |
"network": "tcp,udp" | |
} | |
} | |
], | |
"inbound" : { | |
"listen" : "127.0.0.1", | |
"port" : 1086, | |
"protocol" : "socks", | |
"settings" : { | |
"auth" : "noauth", | |
"udp" : false, | |
"ip" : "127.0.0.1" | |
} | |
}, | |
"log" : { | |
"error" : "/var/log/v2ray/error.log", | |
"loglevel" : "warning", | |
"access" : "/var/log/v2ray/access.log" | |
}, | |
"routing" : { | |
"strategy" : "rules", | |
"settings" : { | |
"domainStrategy" : "IPIfNonMatch", | |
"rules" : [ | |
{ | |
"port" : "1-52", | |
"type" : "field", | |
"outboundTag" : "direct" | |
}, | |
{ | |
"domain": [ | |
"tanx.com" | |
], | |
"type": "field", | |
"outboundTag": "block" | |
}, | |
{ | |
"port" : "54-79", | |
"type" : "field", | |
"outboundTag" : "direct" | |
}, | |
{ | |
"port" : "81-442", | |
"type" : "field", | |
"outboundTag" : "direct" | |
}, | |
{ | |
"port" : "444-65535", | |
"type" : "field", | |
"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", | |
"geoip:cn" | |
], | |
"outboundTag" : "direct" | |
}, | |
{ | |
"type": "chinasites", | |
"outboundTag": "direct" | |
} | |
] | |
} | |
}, | |
"outbound" : { | |
"protocol" : "vmess", | |
"mux": { | |
"enabled": false | |
}, | |
"settings" : { | |
"vnext" : [ | |
{ | |
"address" : "000.000.000.000", | |
"port" : 00000, | |
"users" : [ | |
{ | |
"id" : "3cfb2db1-7161-44d5-998c-e20d5b30544c", | |
"alterId" : 64, | |
"security" : "auto", | |
"level" : 0 | |
} | |
], | |
"remark" : "do" | |
} | |
] | |
}, | |
"streamSettings" : { | |
"network" : "kcp", | |
"kcpSettings" : { | |
"header" : { | |
"type" : "none" | |
}, | |
"mtu" : 1350, | |
"congestion" : false, | |
"tti" : 20, | |
"uplinkCapacity" : 10, | |
"writeBufferSize" : 1, | |
"readBufferSize" : 1, | |
"downlinkCapacity" : 100 | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
说明文件
这是Linux客户端的配置文件。是我当前正在用的。使用方法是将这个配置文件替换/etc/v2ray/config.json 里面的内容即可。当然,在这之前有几个项需要改。
该配置文件可以使用的功能有。
国内的域名通过 chinasites这项实现。如果域名不在chinasites这个特殊变量里面。则使用dns块的设置进行dns解析得到ip地址后
通过geoip:cn进行匹配,符合国内ip特征则直接连接不走代理。