@ValdikSS получилось, вот инструкция может кому пригодится
-
Обычный DNS рулим на VDS стандартными средствами, ресолвер вешаем на 127.0.0.1:53, помним про /etc/resolve.conf
-
Сломался outbound protocol=“wireguard” , пришлось запускать 2-й экземпляр XRay и лазить в него из основного через socks:
{
"log": {
"loglevel": "warning",
"access": "\/var\/log\/xray\/wg-access.log",
"error": "\/var\/log\/xray\/wg-error.log",
"dnsLog": false
},
"dns": {
"servers": [
"tcp+local:1.1.1.1",
"tcp+local:1.0.0.1"
]
},
"inbounds": [
{
"port": "1081",
"listen": "127.0.0.1",
"tag": "wireproxy",
"protocol": "socks",
"settings": {
"auth": "noauth",
"udp": true
}
}
],
"outbounds": [
{
"tag": "WARP",
"protocol": "wireguard",
"settings": {
"secretKey": "...",
"address": [
"172.16.0.2\/32",
"2606:4700:110:8de1:4b29:ef08:2482:535d\/128"
],
"peers": [
{
"endpoint": "engage.cloudflareclient.com:2408",
"publicKey": "bmXOC+F1FxEMF9dyiK2H5\/1SUtzH0JuVo51h2wPfgyo="
}
],
"mtu": 1280
}
}
],
"routing": {
"domainStrategy": "IPOnDemand",
"rules": []
}
}
- Ставим привокси:
listen-address 127.0.0.1:8118
accept-intercepted-requests 1
user-manual /usr/share/doc/privoxy/user-manual
confdir /etc/privoxy
logdir /var/log/privoxy
forward-socks5t .onion 127.0.0.1:9050 .
forward .i2p 127.0.0.1:4444
logfile logfile
toggle 0
enable-remote-toggle 0
enable-remote-http-toggle 0
enable-edit-actions 0
enforce-blocks 0
buffer-limit 4096
enable-proxy-authentication-forwarding 0
forwarded-connect-retries 0
allow-cgi-request-crunching 0
split-large-forms 0
keep-alive-timeout 5
tolerate-pipelining 1
socket-timeout 300
- xray
{
"dns": {
"tag": "dns_inbound",
"servers": [
"localhost"
],
"hosts": {
"domain:onion": "155.155.155.155",
"domain:i2p": "155.155.155.155"
}
},
"inbounds": [
{
"listen": "127.0.0.4",
"port": 53,
"protocol": "dokodemo-door",
"network": "tcp,udp",
"settings": {
"address": "127.0.0.1",
"port": 53,
"network": "tcp,udp"
},
"tag": "dns-in"
},
.....
],
"outbounds": [
{
"protocol": "freedom",
"domainStrategy": "AsIs",
"tag": "freedom",
"settings": {}
},
{
"protocol": "freedom",
"domainStrategy": "AsIs",
"tag": "privoxy",
"redirect": "127.0.0.1:8118",
"userLevel": 5,
"settings": {}
},
{
"protocol": "dns",
"address": "9.9.9.9",
"port": 53,
"settings": {
"nonIPQuery": "drop"
},
"tag": "dns-out"
},
{
"tag": "WARP",
"protocol": "socks",
"settings": {
"servers": [
{
"address": "127.0.0.1",
"port": 1081
}
],
}
},
{
"tag": "TOR",
"protocol": "socks",
"settings": {
"servers": [
{
"address": "127.0.0.1",
"port": 9050,
"users": [
{
"user": "tor-user",
"pass": "tor-pass",
"level": 5
}
]
}
]
}
},
{
"tag": "i2p",
"protocol": "socks",
"settings": {
"servers": [
{
"address": "127.0.0.1",
"port": 4447,
"users": [
{
"user": "i2p-user",
"pass": "i2p-pass",
"level": 5
}
]
}
]
}
},
{
"protocol": "blackhole",
"tag": "block"
}
],
"routing": {
"domainStrategy": "IPIfNonMatch",
"rules": [
{
"type": "field",
"inboundTag": [
"dns_inbound"
],
"outboundTag": "freedom",
"network": "tcp,udp"
},
{
"type": "field",
"port": "53",
"outboundTag": "dns-out",
"network": "tcp,udp"
},
{
"type": "field",
"outboundTag": "TOR",
"domain": [
"domain:onion"
]
},
{
"type": "field",
"outboundTag": "i2p",
"domain": [
"domain:i2p"
]
},
{
"type": "field",
"ip": [
"155.155.155.15"
],
"outboundTag": "privoxy",
"network": "tcp"
},
{
"type": "field",
"ip": [
"geoip:private"
],
"outboundTag": "block"
},
{
"type": "field",
"port": "25, 587, 465, 2525",
"network": "tcp",
"outboundTag": "block"
},
{
"type": "field",
"outboundTag": "block",
"domain": [
"geosite:category-ads-all"
]
},
{
"type": "field",
"user": [
"rl_0_Dmitry"
],
"outboundTag": "WARP"
},
{
"type": "field",
"protocol": [
"bittorrent"
],
"outboundTag": "block"
}
]
},
"policy": {
"levels": {
"0": {
"handshake": 5,
"connIdle": 120
},
"5": {
"handshake": 120,
"connIdle": 300
}
}
}
}
- Настрока v2rayng
включаем эту галочку
а тут забавнее. Явно тыкаем на удаленная DNS и очищаем значение. При этом в UI все равно будет отображаться 1.1.1.1 Поэтому тыкаем и убеждаемся что в окошке редактирования поле пустое
Касательно “Внутренная DNS” наоборот - открывам и явно прописываем 223.5.5.5 (тыкаем и убеждаемся что в окошке редактирования поле НЕ пустое)