团队使用
定制及使用问题联系TG (opens new window)
以下示例解锁DNS为4.4.4.4,实际使用以系统显示为准有些VPS无法配置DNS或配置DNS无效请联系客服定制SOCKS5等分流版本
- 注意 部分香港CMI屏蔽了UDP 53的查询,我的落地已经开启了TCP53.直接修改VPS的DNS时请在/etc/resolv.conf文件中第一行添加
options use-vc
在配置文件中使用以下格式
tcp://4.4.4.4
例子
"address": "tcp://4.4.4.4"
# XrayR
- 1.首先配置 DNS 文件
vi /etc/XrayR/dns.json
全部删除覆盖
{
"servers": [
"1.1.1.1",
"8.8.8.8",
{
"address": "4.4.4.4(以实际显示为准)",
"port": 53,
"domains": ["geosite:netflix","geosite:disney","geosite:hbo","sora.com","openai.com","chatgpt.com","oaistatic.com","oaiusercontent.com","anthropic.com","claude.ai","gemini.google.com","proactivebackend-pa.googleapis.com","aistudio.google.com","alkalimakersuite-pa.clients6.google.com","generativelanguage.googleapis.com","copilot.microsoft.com"]
}
],
"tag": "dns_inbound"
}
- 2.修改 XrayR 配置文件
第 5 行去掉#号开启
DnsConfigPath: /etc/XrayR/dns.json
第 35 行附近修改参数 (如果机器带V6但是访问谷歌等异常可以将“UseIP”改为“UseIPv4”)
EnableDNS: true
DNSType: UseIP
- 3.重启
XrayR restart
# SoGa
修改配置文件
/etc/soga/dns.yml
例子
4.4.4.4:
strategy: ipv4_first
rules: # 配置一个或多个域名匹配规则
- geosite:netflix
- domain:google.com
- regexp:.*facebook\.com
# V2bX
# singbox
修改配置文件中对应的json,比如下面例子里的sing_origin.json
// SingBox源配置文件目录,用于引用标准SingBox配置文件
"OriginalPath": "/etc/V2bX/sing_origin.json"
添加dns配置,例子
👉 点击展开 / 折叠 sing_origin.json 完整配置
{
"dns": {
"servers": [
{
"tag": "dns_custom",
"address": "4.4.4.4(以实际显示为准)",
"detour": "direct"
},
{
"tag": "cf",
"address": "1.1.1.1",
"detour": "direct"
}
],
"rules": [
{
"rule_set": [
"geosite-netflix",
"geosite-disney",
"geosite-hbo",
"geosite-openai"
],
"domain_suffix": [
"sora.com",
"openai.com",
"chatgpt.com",
"oaistatic.com",
"oaiusercontent.com",
"gemini.google.com",
"proactivebackend-pa.googleapis.com",
"robinfrontend-pa.googleapis.com",
"aisandbox-pa.googleapis.com",
"aistudio.google.com",
"alkalimakersuite-pa.clients6.google.com",
"generativelanguage.googleapis.com",
"anthropic.com",
"claude.ai",
"copilot.microsoft.com"
],
"server": "dns_custom"
}
],
"final": "cf",
"strategy": "prefer_ipv4"
},
"outbounds": [
{
"tag": "direct",
"type": "direct",
"domain_resolver": {
"server": "cf",
"strategy": "prefer_ipv4"
}
},
{
"type": "block",
"tag": "block"
}
],
"route": {
"rules": [
{
"ip_is_private": true,
"outbound": "block"
},
{
"domain_regex": [
"(api|ps|sv|offnavi|newvector|ulog.imap|newloc)(.map|).(baidu|n.shifen).com",
"(.+.|^)(360|so).(cn|com)",
"(Subject|HELO|SMTP)",
"(torrent|.torrent|peer_id=|info_hash|get_peers|find_node|BitTorrent|announce_peer|announce.php?passkey=)",
"(^.@)(guerrillamail|guerrillamailblock|sharklasers|grr|pokemail|spam4|bccto|chacuo|027168).(info|biz|com|de|net|org|me|la)",
"(.?)(xunlei|sandai|Thunder|XLLiveUD)(.)",
"(..||)(dafahao|mingjinglive|botanwang|minghui|dongtaiwang|falunaz|epochtimes|ntdtv|falundafa|falungong|wujieliulan|zhengjian).(org|com|net)",
"(ed2k|.torrent|peer_id=|announce|info_hash|get_peers|find_node|BitTorrent|announce_peer|announce.php?passkey=|magnet:|xunlei|sandai|Thunder|XLLiveUD|bt_key)",
"(.+.|^)(360).(cn|com|net)",
"(.*.||)(guanjia.qq.com|qqpcmgr|QQPCMGR)",
"(.*.||)(rising|kingsoft|duba|xindubawukong|jinshanduba).(com|net|org)",
"(.*.||)(netvigator|torproject).(com|cn|net|org)",
"(..||)(visa|mycard|gash|beanfun|bank).",
"(.*.||)(gov|12377|12315|talk.news.pts.org|creaders|zhuichaguoji|efcc.org|cyberpolice|aboluowang|tuidang|epochtimes|zhengjian|110.qq|mingjingnews|inmediahk|xinsheng|breakgfw|chengmingmag|jinpianwang|qi-gong|mhradio|edoors|renminbao|soundofhope|xizang-zhiye|bannedbook|ntdtv|12321|secretchina|dajiyuan|boxun|chinadigitaltimes|dwnews|huaglad|oneplusnews|epochweekly|cn.rfi).(cn|com|org|net|club|net|fr|tw|hk|eu|info|me)",
"(.*.||)(miaozhen|cnzz|talkingdata|umeng).(cn|com)",
"(.*.||)(mycard).(com|tw)",
"(.*.||)(gash).(com|tw)",
"(.bank.)",
"(.*.||)(pincong).(rocks)",
"(.*.||)(taobao).(com)",
"(.*.||)(laomoe|jiyou|ssss|lolicp|vv1234|0z|4321q|868123|ksweb|mm126).(com|cloud|fun|cn|gs|xyz|cc)",
"(flows|miaoko).(pages).(dev)"
],
"outbound": "block"
},
{
"outbound": "direct",
"network": [
"udp",
"tcp"
]
}
],
"rule_set": [
{
"tag": "geosite-netflix",
"type": "remote",
"format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-netflix.srs",
"download_detour": "direct"
},
{
"tag": "geosite-disney",
"type": "remote",
"format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-disney.srs",
"download_detour": "direct"
},
{
"tag": "geosite-hbo",
"type": "remote",
"format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-hbo.srs",
"download_detour": "direct"
},
{
"tag": "geosite-openai",
"type": "remote",
"format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-openai.srs",
"download_detour": "direct"
}
]
},
"experimental": {
"cache_file": {
"enabled": true
}
}
}
# Xray
三处修改 第一第二是修改 /etc/V2bX/config.json
在cores部分定义dns配置文件
"DnsConfigPath": "/etc/V2bX/dns.json"
在nodes里开启dns分流设置
"EnableDNS": true,
同时注意
设置IPV4优先,将SendIP设为"0.0.0.0"。
设置IPV4优先,将DNSType设为"UseIP"。
第三修改 /etc/V2bX/dns.json
{
"servers": [
"1.1.1.1",
"8.8.8.8",
{
"address": "4.4.4.4(以实际显示为准)",
"port": 53,
"domains": [
"geosite:netflix","geosite:disney","geosite:hbo","sora.com","openai.com","chatgpt.com","oaistatic.com","oaiusercontent.com","anthropic.com","claude.ai","gemini.google.com","proactivebackend-pa.googleapis.com","aistudio.google.com","alkalimakersuite-pa.clients6.google.com","generativelanguage.googleapis.com","copilot.microsoft.com"
]
}
],
"tag": "dns_inbound"
}
编辑 (opens new window)
上次更新: 2026/09/01, 14:32:10