注意 部分香港CMI屏蔽了UDP 53的查询,本服务已经开启了TCP53,直接修改VPS的DNS时请在/etc/resolv.conf文件中第一行添加
如果您使用DOH,对于Xray系来说,您需要在 dns.json
一行配置一个默认DNS,如1.1.1.1,然后在后面写分流规则;否则DOH因为是默认第一个域名,XraryCore会请求DoH,但是由于DoH之前没有获取到IP,所以会向DoH请求DoH的IP,造成 context exceed timeout
{
"servers": [
"1.1.1.1",
{
"address": "https://您的doh",
"port": 443,
"domains": []
}
]
}
{
"servers": [
"1.1.1.1",
"8.8.8.8",
"localhost",
{
"address": "4.4.4.4(以实际为准)",
"port": 53,
"domains": ["geosite:netflix"]
}
],
"tag": "dns_inbound"
}
DnsConfigPath: /etc/XrayR/dns.json
EnableDNS: true
DNSType: UseIP
docker run --dns 8.8.8.8 busybox:latest
vi /etc/docker/daemon.json
{
"dns" : [
"填写指定dns"
]
}
systemctl daemon-reload
systemctl restart docker
-e default_dns=4.4.4.4 \
-e dns_cache_time=1 \
-e dns_strategy=ipv4_first \
docker run --restart=on-failure --name soga -d \
-v /etc/soga/:/etc/soga/ --network host \
-e type=sspanel-uim \
-e server_type=ssr \
-e api=webapi \
-e webapi_url=https://api.soga.com \
-e webapi_key=admin \
-e node_id=10 \
-e default_dns=4.4.4.4 \
-e dns_cache_time=1 \
-e dns_strategy=ipv4_first \
-e forbidden_bit_torrent=true \
-e cert_domain=image.baidu.com \
-e cert_mode=http \
-e tunnel_enable=false \
-e tunnel_proxy_protocol=true \
-e proxy_protocol=true \
vaxilu/soga
/etc/soga/soga.conf 修改 default_dns=4.4.4.4