Replies: 6 comments
-
I think these requests to 8.8.8.8 are sent by applications on your system, not v2ray. I don't understand what you're trying to do with the reverse proxy. You might actually want proxy chaining. |
Beta Was this translation helpful? Give feedback.
-
那请问如何设置像官网 https://toutyrater.github.io/app/tproxy.html 设置透明代理那样的DNS分流呢?下面是官网给出的DNS分流的例子,我在本例中使用的是反向代理参考官网 https://toutyrater.github.io/app/reverse.html,我该如何修改?烦请不吝赐教? {
"inbounds": [
{
"tag":"transparent",
"port": 12345,
"protocol": "dokodemo-door",
"settings": {
"network": "tcp,udp",
"followRedirect": true
},
"sniffing": {
"enabled": true,
"destOverride": [
"http",
"tls"
]
},
"streamSettings": {
"sockopt": {
"tproxy": "tproxy" // 透明代理使用 TPROXY 方式
}
}
},
{
"port": 1080,
"protocol": "socks", // 入口协议为 SOCKS 5
"sniffing": {
"enabled": true,
"destOverride": ["http", "tls"]
},
"settings": {
"auth": "noauth"
}
}
],
"outbounds": [
{
"tag": "proxy",
"protocol": "vmess", // 代理服务器
"settings": {
"vnext": [
...
]
},
"streamSettings": {
"sockopt": {
"mark": 255
}
},
"mux": {
"enabled": true
}
},
{
"tag": "direct",
"protocol": "freedom",
"settings": {
"domainStrategy": "UseIP"
},
"streamSettings": {
"sockopt": {
"mark": 255
}
}
},
{
"tag": "block",
"protocol": "blackhole",
"settings": {
"response": {
"type": "http"
}
}
},
{
"tag": "dns-out",
"protocol": "dns",
"streamSettings": {
"sockopt": {
"mark": 255
}
}
}
],
"dns": {
"servers": [
"8.8.8.8", // 非中中国大陆域名使用 Google 的 DNS
"1.1.1.1", // 非中中国大陆域名使用 Cloudflare 的 DNS(备用)
"114.114.114.114", // 114 的 DNS (备用)
{
"address": "223.5.5.5", //中国大陆域名使用阿里的 DNS
"port": 53,
"domains": [
"geosite:cn",
"ntp.org", // NTP 服务器
"$myserver.address" // 此处改为你 VPS 的域名
]
}
]
},
"routing": {
"domainStrategy": "IPOnDemand",
"rules": [
{ // 劫持 53 端口 UDP 流量,使用 V2Ray 的 DNS
"type": "field",
"inboundTag": [
"transparent"
],
"port": 53,
"network": "udp",
"outboundTag": "dns-out"
},
{ // 直连 123 端口 UDP 流量(NTP 协议)
"type": "field",
"inboundTag": [
"transparent"
],
"port": 123,
"network": "udp",
"outboundTag": "direct"
},
{
"type": "field",
"ip": [
// 设置 DNS 配置中的国内 DNS 服务器地址直连,以达到 DNS 分流目的
"223.5.5.5",
"114.114.114.114"
],
"outboundTag": "direct"
},
{
"type": "field",
"ip": [
// 设置 DNS 配置中的国内 DNS 服务器地址走代理,以达到 DNS 分流目的
"8.8.8.8",
"1.1.1.1"
],
"outboundTag": "proxy" // 改为你自己代理的出站 tag
},
{ // 广告拦截
"type": "field",
"domain": [
"geosite:category-ads-all"
],
"outboundTag": "block"
},
{ // BT 流量直连
"type": "field",
"protocol":["bittorrent"],
"outboundTag": "direct"
},
{ // 直连中国大陆主流网站 ip 和 保留 ip
"type": "field",
"ip": [
"geoip:private",
"geoip:cn"
],
"outboundTag": "direct"
},
{ // 直连中国大陆主流网站域名
"type": "field",
"domain": [
"geosite:cn"
],
"outboundTag": "direct"
}
]
}
} |
Beta Was this translation helpful? Give feedback.
-
可以根据 ip 路由 |
Beta Was this translation helpful? Give feedback.
-
本人菜鸟一个,能否给出具体参考案例?因为某些原因,不想在服务器端暴露端口怕IP被封,所以才有这种方式通过局域网vpn,中转到国内暴露到外网中。另外请教我使用nginx反向代理方式比这种官网给出反向代理方式,那个速度会快点? |
Beta Was this translation helpful? Give feedback.
-
@onlineyh The link you referenced is not the official site of V2Fly. Visit https://www.v2fly.org/ instead. And please use Discussions for questions like this. Create an issue only if you have more technical stuff to report or discuss. |
Beta Was this translation helpful? Give feedback.
-
详细看了官网 但是发现还是迷糊,不知道如何改进本案例中的配置?烦请不吝赐教? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
你正在使用哪个版本的 V2Ray?
服务端 docker 版本V2Ray 4.34.0
客户端V2Ray 4.34.0
你的使用场景是什么?
翻墙看视频
你看到的异常现象是什么?
因为某些原因 造成我访问 dns 8.8.8.8

现在出现了一种现象 我使用官网的透明代理的方式可以翻墙,但是我使用反向代理的方式如上图所示hold住了无法翻墙
我想请问我改如果在配置中修改默认的dns 8.8.8.8改成其他公共的dns解析如阿里云的223.5.5.5。我只想在服务端修改,而客户端不修改。如何配置
你期待看到的正常表现是怎样的?
请附上你的配置
服务端配置:
客户端配置:
请附上出错时软件输出的错误日志
服务器端错误日志:
// 在这里附上服务器端日志
客户端错误日志:
// 在这里附上客户端日志
请附上访问日志
// 在这里附上服务器端日志
其它相关的配置文件(如 Nginx)和相关日志
如果 V2Ray 无法启动,请附上
--test
命令的输出如果 V2Ray 服务运行异常,请附上 journal 日志
Beta Was this translation helpful? Give feedback.
All reactions