v2board
1.首先配置 DNS 文件
vi /etc/XrayR/dns.json
全部删除覆盖
{
"servers": [
"1.1.1.1",
"8.8.8.8",
"localhost",
{
"address": "100.100.100.100",
"port": 53,
"domains": [
"geosite:netflix",
"domain:instagram.com",
"domain:www.instagram.com",
"domain:i.instagram.com",
"domain:wikipedia.org"
]
}
],
"tag": "dns_inbound"
}
2.修改 XrayR 配置文件
第 5 行去掉#号开启
DnsConfigPath: /etc/XrayR/dns.json
第 35 行附近修改参数 (如果机器带V6但是访问谷歌等异常可以将“UseIP”改为“UseIPv4”)
EnableDNS: true
DNSType: UseIP
3.配置route文件
vi /etc/XrayR/route.json
Tailscale的DNS IP为内网IP (100.100.100.100), 因大部分机场后端会默认封禁内网IP,导致解析失败
所以需要添加以下路由规则对其放行:
{
"outboundTag": "direct",
"ip": [
"100.64.0.0/10"
],
"type": "field"
},
以下是配置文件的范例,仅供参考
{
"dns": {
"servers": [
"1.1.1.1",
"8.8.8.8",
{
"address": "100.100.100.100",
"port": 53,
"domains": [
"geosite:netflix",
"domain:instagram.com"
]
}
],
"tag": "dns_inbound"
},
"api": {
"services": [
"HandlerService",
"LoggerService",
"StatsService"
],
"tag": "api_internal"
},
"inbounds": [
{
"listen": "127.0.0.1",
"port": 62789,
"protocol": "dokodemo-door",
"settings": {
"address": "127.0.0.1"
},
"sniffing": {
"enabled": true,
"destOverride": ["http", "tls"]
},
"tag": "api"
}
],
"outbounds": [
{
"protocol": "freedom",
"tag": "direct"
},
{
"protocol": "blackhole",
"settings": {},
"tag": "blocked"
}
],
"routing": {
"rules": [
{
"outboundTag": "direct",
"ip": [
"100.100.100.100"
],
"type": "field"
},
{
"inboundTag": [
"api_internal"
],
"outboundTag": "api",
"type": "field"
},
{
"ip": [
"geoip:private"
],
"outboundTag": "blocked",
"type": "field"
},
{
"outboundTag": "blocked",
"protocol": [
"bittorrent"
],
"type": "field"
}
]
}
}
Last updated