采用透明代理后,家里大部分米家设备都掉线了,而且无法重新连接,必须去除透明代理。是我的配置有问题吗? #688
-
我完全仿照《透明代理(TProxy)配置教程 by @BioniCosmos》里的iptable设置在一台linux服务器上做了透明代理,然后采用主路由的dhcp 网关指向这台linux服务器,linux服务器的网关指向主路由的方式连接,全屋电脑可以翻墙。但是遇到2个问题:
|
Beta Was this translation helpful? Give feedback.
Replies: 8 comments 21 replies
-
先提两个意见:一、建议用 ``` 包裹代码块;二、敏感信息如域名、IP 地址、UUID 等进行手动打码。 关于第一个问题,试着将 DHCP 分配的默认网关改为主路由地址并进行测试。 关于第二个问题,可以先试试以下配置: {
"log": {
"loglevel": "warning",
"error": "/var/log/xray/error.log",
"access": "/var/log/xray/access.log"
},
"inbounds": [
{
"tag": "dns-in",
"port": 53,
"protocol": "dokodemo-door",
"settings": {
"network": "tcp,udp",
"address": "8.8.4.4",
"port": 53
}
},
{
"port": 12345,
"protocol": "dokodemo-door",
"settings": {
"network": "tcp,udp",
"followRedirect": true
},
"sniffing": {
"enabled": true,
"destOverride": [
"http",
"tls"
]
},
"streamSettings": {
"sockopt": {
"tproxy": "tproxy"
}
}
}
],
"outbounds": [
{
"tag": "direct",
"protocol": "freedom",
"settings": {
"domainStrategy": "UseIPv4"
},
"streamSettings": {
"sockopt": {
"mark": 2
}
}
},
{
"tag": "proxy",
"protocol": "vless",
"settings": {
"vnext": [
{
"address": "",
"port": 443,
"users": [
{
"id": "",
"flow": "xtls-rprx-direct",
"encryption": "none"
}
]
}
]
},
"streamSettings": {
"network": "tcp",
"security": "xtls",
"sockopt": {
"mark": 2,
"domainStrategy": "UseIPv4"
}
}
},
{
"tag": "block",
"protocol": "blackhole",
"settings": {
"response": {
"type": "http"
}
}
},
{
"tag": "dns-out",
"protocol": "dns",
"proxySettings": {
"tag": "proxy"
},
"streamSettings": {
"sockopt": {
"mark": 2
}
}
}
],
"dns": {
"hosts": {
"": ""
},
"servers": [
"119.29.29.29",
"114.114.114.114",
{
"address": "8.8.4.4",
"domains": [
"geosite:geolocation-!cn"
]
}
]
},
"routing": {
"domainStrategy": "IPIfNonMatch",
"rules": [
{
"type": "field",
"inboundTag": [
"dns-in"
],
"outboundTag": "dns-out"
},
{
"type": "field",
"protocol": [
"bittorrent"
],
"outboundTag": "direct"
},
{
"type": "field",
"ip": [
"8.8.4.4"
],
"outboundTag": "proxy"
},
{
"type": "field",
"domain": [
"geosite:category-ads-all"
],
"outboundTag": "block"
},
{
"type": "field",
"domain": [
"geosite:geolocation-!cn"
],
"outboundTag": "proxy"
},
{
"type": "field",
"ip": [
"geoip:telegram"
],
"outboundTag": "proxy"
}
]
}
} 如调整后问题仍存在,请将日志等级调整为 |
Beta Was this translation helpful? Give feedback.
-
谢谢。我还纳闷怎么···代码块没作用呢,后来发现是我用了中文符号。 用了你的config后,运行xray报错如下,不能启动。
把inbound "dns-in"注释掉以后能够启动,但问题依然存在,google play可以打开,但无法下载和更新app。附上我的日志记录,麻烦帮我诊断一下,谢谢! |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
我总结一下,首先,我的透明代理教程和后来发的配置本质上没有区别,唯一的改动是 DNS 部分。我的路由配置一直是默认直连,但 DNS 配置不是,所以你可以继续使用以前的配置,只更改 Xray 的 DNS 部分。 其次,无论是哪一个配置,我都是自用过一段时间的,并没有发现 Play Store 的问题。其实这本来就是一个比较玄学的东西,服务器的 IP、App 本身都可能造成影响。建议更换不同服务器或者清空 Google 框架数据以尝试修复问题。 再次,#293 中提到的问题和你的问题比较相似,但相关 PR 并没有合到主分支当中,你可以尝试开发版或者自己进行合并和测试。 |
Beta Was this translation helpful? Give feedback.
-
手机和米家设备有问题,电脑正常。电脑是否连接网线,其他设备连接Wi-Fi,是否可能是无线接口配置有误? |
Beta Was this translation helpful? Give feedback.
-
报告一下测试结果:
|
Beta Was this translation helpful? Give feedback.
-
最好先检查ipv6的情况。。。。。。 |
Beta Was this translation helpful? Give feedback.
-
是所有的小米设备,都用了一个奇怪的域名“Mijia Cloud”,然后被sniff出来了,结果DNS又不能解析。所以就都掉线了。
maryjeck ***@***.***> 于2021年12月13日周一 13:19写道:
… 最好先检查ipv6的情况。。。。。。
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#688 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABPLTYNVHQAPHFBNGRGRBRLUQV66FANCNFSM5DEX5YNQ>
.
|
Beta Was this translation helpful? Give feedback.
我总结一下,首先,我的透明代理教程和后来发的配置本质上没有区别,唯一的改动是 DNS 部分。我的路由配置一直是默认直连,但 DNS 配置不是,所以你可以继续使用以前的配置,只更改 Xray 的 DNS 部分。
其次,无论是哪一个配置,我都是自用过一段时间的,并没有发现 Play Store 的问题。其实这本来就是一个比较玄学的东西,服务器的 IP、App 本身都可能造成影响。建议更换不同服务器或者清空 Google 框架数据以尝试修复问题。
再次,#293 中提到的问题和你的问题比较相似,但相关 PR 并没有合到主分支当中,你可以尝试开发版或者自己进行合并和测试。