Closed Gabirel closed 2 years ago
未出现过,看看有没有其他人有这种情况吧。
1e100.net
这个域名应该是google的,不过不知道是什么用的。
系统 - 软件包 - luci-app-passwall 后有版本号
另外想问下你是127.0.0.1#5553
是自己配置的第三方国内DNS吗?
1e100.net
的确是google的。在Loyalsoldier/v2ray-rules-dat中也有被block(但是没有block全),我就尝试直接domain:1e100.net
全block了,虽然没有用AdGuardHome
作为dnsmasq的上游设置的
看还有什么我可以提供的
最新源码编译passwall 测了一下午,xray分流+xray,各种刷网站,三台设备一起刷,最高237,最低39。 与你的设置唯一的区别就是没有用AdGuradHome作为上游DNS,直接用dnsmasq。 无法复现你的问题。
辛苦感谢大佬的一下午的测试
相关测试更新:
直接用dnsmasq
是指的不使用任何的DNS吗?(均已经关闭ADGuard Home的情况下)
我测试的时候,DNS设置
Xray分流,与你的设置一致,默认节点是xray+vless+xtls
没有出现你说的问题
奇怪…因为我也测试过DNS过滤,也测过不缓存DNS(虽然个人觉得缓存应该和这个没有影响)(在ADGuard Home开始的情况下)
因为元旦,不太方便继续测试。当可以方便测试的时候,我再重新测试一下
@Gabirel 我似乎也有同样的问题,passwall的DNS 和 tcp会有大量增长导致内存短时间内oom,我尝试给到10G的内存,发现在一般情况下passwall在最近两次 commit下 都会短时间内吃到6~8G然后回落到100+mb
我测试的时候,DNS设置
- DNS过滤模式使用的是pdnsd
- 缓存解析结果未勾选,
- 远程DNS 8.8.8.8
- ChinaDNS-NG开启
Xray分流,与你的设置一致,默认节点是xray+vless+xtls
没有出现你说的问题
@smallprogram
环境更新:现在重装了虚拟化,然后用了LuCI Master (git-21.335.48743-5f363d9)
固件,passwall版本号为:4.45-1
相同设置(but fresh installation),可是我还是有这样的问题。不过这次由于分配性能不一样,但是同样TCP链接数量激增,导致内存直接超过了说分配的1GB,然后passwall的xray程序就没了
另1:无论是否开启ChinaDNS-NG都会导致该问题出现。 另2:经过测试,若开启DNS结果缓存,必定会导致该问题(经过测试,4次测试下4次完全复现,100%概率)
@Gabirel 我似乎也有同样的问题,passwall的DNS 和 tcp会有大量增长导致内存短时间内oom,我尝试给到10G的内存,发现在一般情况下passwall在最近两次 commit下 都会短时间内吃到6~8G然后回落到100+mb
@realJustinLee 我的软路由环境最多只有4GB空间,完全够不到8GB,内存是否有回落现象,这个我不能确定了~
目前我平时需要使用,只能暂时放弃「Xray分流:总节点」。希望可以修复,我就可以切过去了
Update:看到隔壁pandavan固件的通告说dnsmasq 2.86 会在加载过多规则时卡死
退回2.80版本
于是打算自己尝试一下会退到2.80版本以排除目前版本2.86
的因素。
结果安装出现依赖无法满足的问题:
遂,这个尝试暂时做不了~不知道是否有其他勇士测试一下
Update:看到隔壁pandavan固件的通告说
dnsmasq 2.86 会在加载过多规则时卡死
退回2.80版本
于是打算自己尝试一下会退到2.80版本以排除目前版本
2.86
的因素。结果安装出现依赖无法满足的问题:
遂,这个尝试暂时做不了~不知道是否有其他勇士测试一下
这个dnsmasq 2.86
规则太多的确会卡死,我刚才试了一下直接用dnsmasq-chinalist而不用chinadns-ng直接挂了。。
@xiaorouji
我这边有一个疑问,就是即使使用了dnsmasq,但是我的分流规则里是屏蔽了1e100.net
的,理论上来说,都被屏蔽了dnsmasq还会加载?还会导致卡死?应该不会吧
所以为了使用分流节点,要把chinadns-ng勾了就行?我的测试经验下来,好像这样不能解决这个问题
不知 我这里正常
我前几天刷最新版本,也出现了passwall 太多分流规则,每次保存配置后一直处于loading的状态。
不知 我这里正常
经过测试,全局代理 + Xray分流总节点 + chinadns-ng并不能解决问题。所以还是分流总节点模式出现的问题
另外,是不是我可以通过下低版本的openwrt,然后我去安装最新版的passwall,这样来看是不是dnsmasq的版本带来的问题?这样时候可行呢?比如会不会出现无法解决的依赖问题?
Update:测试了passwall的4.34-1
的分流总结点模式 + dnsmasq 2.85
版本,问题依旧……似乎可以排除dnsmasq 2.86
版本(除非2.85
版本也有问题)
所以目前还是只能将问题定位到passwall身上
我看info级别的日志似乎是有环路?怎么一直在tcp:app.smartmailcloud.com:443
和tcp:ping.manjaro.org:80
,而且都accept了,而且本地软路由肯定可以连接成功的。体现在超短的时间内爆发,然后内存2G打满,又卡死了
详见日志:日志有所截取(因为都是重复的内容)
经过刚刚的一番比较,之前一直以为是最开始说的1e100.net
(谷歌的这个追踪/广告)导致的
但偶然一次另一外一台manjaro的电脑连接了,然后从上面的日志发现,并没有1e100.net
,反而是app.smartmailcloud.com
和ping.manjaro.org
。出现这样的原因是因为,我之前一直是用手机在Google应用上测试的,这次反而没有连,因此没有。
另:很大程度是怀疑存在某种“环路”,我观察内存暴涨的速度基本上是(大概估摸)呈指数级上涨,我想只有“环路”的“环路”才会导致这种情况(有可能是错的,忽略)。
PS:iptables这种东西都是默认,自己没有改过。因为这个问题,今天又重新安装了固件,所以可以确保我没动过。第一个调试的插件也是passwall
。
在内存增加的时候,看配置文件,似乎生成json有点问题。分流的规则和proxy的outbounds没有生成(版本为4.47)
{
"outbounds": [
{
"streamSettings": {
"sockopt": {
"mark": 255
}
},
"settings": {
"domainStrategy": "UseIPv4"
},
"protocol": "freedom",
"tag": "direct"
},
{
"protocol": "blackhole",
"tag": "blackhole"
}
],
"log": {
"loglevel": "error"
},
"routing": {
"domainStrategy": "IPIfNonMatch",
"rules": [
{
"type": "field",
"protocol": [
"bittorrent"
],
"outboundTag": "direct"
},
{
"type": "field",
"network": "tcp",
"outboundTag": "direct"
}
],
"domainMatcher": "hybrid"
},
"inbounds": [
{
"port": 1041,
"protocol": "dokodemo-door",
"streamSettings": {
"sockopt": {
"tproxy": "tproxy"
}
},
"sniffing": {
"enabled": true,
"RouteOnly": true,
"destOverride": [
"http",
"tls"
]
},
"settings": {
"network": "tcp",
"followRedirect": true
}
}
]
}
@xiaorouji Summary: 目前测试下来的结论:无法使用passwall的分流模式,最终只能使用访问控制列表手动全局 + Xray分流
完成(我能测的部分已经全部测完了,且在我这边复现率基本上是100%)
PS(分流验证): 通过xray的blockhole(譬如通过分流模式中的AD列表),屏蔽domain:ip.sb
,终端机访问被屏蔽,证明分流成功(虽然并未找到分流的日志,可能是功能缺失?或者是我没有找到?@xiaorouji )
依据在于:
配置了以下情况:
domain:ip.sb
验证:在openwrt的terminal里curl ip.sb
有ip返回(理论上:不应该返回数据,因为访问控制的优先级应该比passwall的设置的模式高)
至于为什么passwall默认会有这样的问题,源码也没有看出来,具体原因可能是有 https://github.com/xiaorouji/openwrt-passwall/issues/1677#issuecomment-1013808607 或者其他什么原因。但是导致可能这样的“环路”或者连接数暴涨,不知道为什么。
原始内容:
修改为如下内容: 注释掉53的iptables规则即可
请问一下老哥,你用的宽带是移动固定/静态IP吗? 因为我有梅林的设备也出现和你完全一样的问题,xray分流会TCP连接暴涨+内存吃满 但是在路由器完全相同的设置情况下,该问题又仅在移动固定IP的宽带下才出现,另外几台使用电信PPPOE拨号的宽带一切正常……
你用的宽带是移动固定/静态IP吗?
动态ip,现在很少有纯静态的了吧
因为我有梅林的设备也出现和你完全一样的问题,xray分流会TCP连接暴涨+内存吃满
建议使用passwall2,并且注释掉53端口的iptables规则,就OK了
最终解决方案
- 解决方案来源:@xiaorouji
- 解决办法:删除自定义规则里面把DNS劫持规则,如下图所示:
原始内容:
修改为如下内容: 注释掉53的iptables规则即可
我也遇到了想通问题,xray开启分流节点,软路由内存占满,虚拟机cpu占满,临时空间几个G被写满,无法保存软路由的设置,只能在启动项里重启,但是通过单节点,软路由一切正常。我现在使用nftable,请问如何解决
在有更好的办法之前,建议保留udp 53端口的劫持规则,否则任何一个设备只要稍不小心DNS服务器没有指向网关就会造成DNS泄漏。简而言之,浏览器在少数情况下,会通过TCP而不是UDP进行dns查询,有人发现在这种情况下会产生DNS泄漏,就建议也劫持TCP的53端口并在xray内路由至dns服务器。但个人猜测,xray的DNS over TCP好像并不是为透明代理底下大量产生的这类请求所设计(应该是缓存问题,设置disableCache为true则问题立即消失),从而产生了连接爆炸的问题。呼叫@RPRX 来看一眼
描述bug
1e100.net
复现步骤
netstat | grep tcp
你想要实现的目的
在使用Xray分流总节点掉情况下,TCP连接数正常即可
日志信息
个人觉得有用信息比较少
截图
正常情况截图(使用正常节点)
PS: 即使保持一段时间后,这个TCP的链接数量也是在可控范围
异常情况截图(使用Xray分流节点)
截图为部分内容:(短时间内激增,是激增没错)
PS:
100.66.186.57
是wan的分配给软路由的IP地址,因此可见是软路由自身的行为。统计个数:
系统相关信息
Xray分流:分流总结点配置情况如下
展开我
![image](https://user-images.githubusercontent.com/12933851/147803808-bda5b257-aeb1-4b47-8298-fd59b7b2e4c7.png)其他相关信息
切换xray版本不影响本issue(包括了最新的1.5.2)
规则列表(优先级最高的列表)中block掉
1e100.net
无效在AD这个rules中加了
domain:1e100.net
,仍然看到TCP连接。可见没有遵循Xray分流总节点的规则查看相关程序信息,可以确定是xray发出的(应该吧)
二次确认不是xray的问题。查看服务端都是正常的;另一个备用的软路由用了ss-tproxy + xray的组合,tcp也正常
关闭自动切换和守护进程,没有变化,确定没有影响
DNS设置如下:(DNS使用默认的pdnsd亦没有对该问题有变化)
展开我
![image](https://user-images.githubusercontent.com/12933851/147804894-1fe8f709-5297-47bf-a6c1-01a619d7e165.png)关闭passwall就一定没有这个问题,或者,使用非xray分流总节点也一定没有问题
怀疑:是不是什么passwall的组件的问题?尤其是涉及到了Xray分流总节点才会发生,其他都不会发生。让我不禁怀疑
最终解决办法
查看最底部:https://github.com/xiaorouji/openwrt-passwall/issues/1677#issuecomment-1014203396