x-ui 配置dns服务器
关于
x-ui:https://github.com/vaxilu/x-ui
模板
{
"dns": {
"hosts": {
"geosite:netflix": "5.5.5.5",
"geosite:disney": "5.5.5.5"
},
"servers": [
"8.8.8.8",
"1.1.1.1"
]
},
"api": {
"services": [
"HandlerService",
"LoggerService",
"StatsService"
],
"tag": "api"
},
"inbounds": [{
"listen": "127.0.0.1",
"port": 62789,
"protocol": "dokodemo-door",
"settings": {
"address": "127.0.0.1"
},
"tag": "api"
}],
"outbounds": [{
"protocol": "freedom",
"settings": {
"domainStrategy": "UseIP"
}
},
{
"protocol": "blackhole",
"settings": {},
"tag": "blocked"
}
],
"policy": {
"system": {
"statsInboundDownlink": true,
"statsInboundUplink": true
}
},
"routing": {
"rules": [{
"inboundTag": [
"api"
],
"outboundTag": "api",
"type": "field"
},
{
"ip": [
"geoip:private"
],
"outboundTag": "blocked",
"type": "field"
},
{
"outboundTag": "blocked",
"protocol": [
"bittorrent"
],
"type": "field"
}
]
},
"stats": {}
}
其中,在 host 项里,默认配置了 Netflix 和 Disney,5.5.5.5 代表要配置的 dns 服务器。替换为已解锁的 dns 服务器的 IP 后,即可实现解锁,也可以手动配置其他解锁,如:"geosite:youtube": "5.5.5.5"
,每个解锁服务器之间尾部要跟上一个英文逗号
需要注意的是,若配置 x-ui 的 dns 解锁后,小鸡的全局解锁则不会在 x-ui 搭建的节点上生效!
其他
由于这个项目已经很长时间没有更新,所以项目中的路由 IP 规则库并不能支持一些新的站点,如:geosite:openai
需要手动更新下才能用新的路由规则,更新 x-ui 的 bin 目录下 geoip.dat 和 geosite.dat 即可实现更新
共有 0 条评论