openwrt-passwall2 icon indicating copy to clipboard operation
openwrt-passwall2 copied to clipboard

最新版编译,每次重启后都无法连接网络

Open 0987363 opened this issue 2 years ago • 9 comments

lede+passwall2 6月9号编译,lede跟passwall2都是最新源码 pppoe拨号

每次重启后 可以解析dns,可以ping,但是无法进行tcp连接,包括路由器自身和其他电脑 尝试添加延迟启动,问题一样 但网络实际上是通的

这是刚刚重启后路由器上的测试

root@OpenWrt:~# nslookup qq.com
Server:         127.0.0.1
Address:        127.0.0.1:53

Non-authoritative answer:
Name:   qq.com
Address: 61.129.7.47
Name:   qq.com
Address: 183.3.226.35
Name:   qq.com
Address: 123.151.137.18


root@OpenWrt:~# curl qq.com
curl: (7) Failed to connect to qq.com port 80 after 1 ms: Connection refused
root@OpenWrt:~# nslookup google.com
Server:         127.0.0.1
Address:        127.0.0.1:53

Non-authoritative answer:
Name:   google.com
Address: 172.217.25.14


root@OpenWrt:~# curl google.com
curl: (7) Failed to connect to google.com port 80 after 0 ms: Connection refused

root@OpenWrt:~#ping 114.114.114.114
PING 114.114.114.114 (114.114.114.114): 56 data bytes
64 bytes from 114.114.114.114: seq=0 ttl=66 time=36.954 ms

重新关闭再打开passwall2后网络正常 改用srr+重启则没问题

passwsall2配置大概如下

使用分流
启用socks
其他基本全默认

0987363 avatar Jun 12 '22 04:06 0987363

same issue 72cab3af724e45f2fc637a1f8f90ea4d

ecrasy avatar Jun 21 '22 12:06 ecrasy

确实有这情况,不仅是最新代码。要从新保存一下才能正常

swxk521 avatar Jun 22 '22 11:06 swxk521

same issue

nudewolf avatar Jul 22 '22 13:07 nudewolf

一样的问题,必须手动关闭再打开一次

tobarcn avatar Aug 07 '22 04:08 tobarcn

唉,看了个把小时源码,防火墙,总算找到问题了

app.sh start在启动时执行了两次

第一次是在/etc/hotplug.d/iface/98-passwall2 , 由网络接口启动触发执行 第二次是在/etc/rc.d/S99zzz_passwall2 , 由系统启动触发执行

手动删除掉其中一次执行就好了

tobarcn avatar Aug 10 '22 10:08 tobarcn

看了下,2个地方都是引用的/etc/init.d/passwall2

我是openwrt拨号,所以把/etc/rc.d/S99zzz_passwall2删掉就行了

0987363 avatar Aug 11 '22 02:08 0987363

same issue

davidtall avatar Oct 01 '22 09:10 davidtall

感觉是这个提交后引起的 https://github.com/xiaorouji/openwrt-passwall2/commit/c2d8fd8ac861e5610899fcfe70dcfa43099d73ca

davidtall avatar Oct 01 '22 10:10 davidtall

1,按照楼上的方法,删除 /etc/rc.d/S99zzz_passwall2 后在面板修改配置后点保存和应用就无法重启插件了 2,无法连接网络,是因为openwrt重启后,wan拨号联网先于passwall2插件的boot启动,所以插件会 先restart,再start,启动了两个实例就冲突了 3,正确的处理办法是在 /usr/share/passwall2/app.sh 的start 函数头部中加入去重代码,防止重复执行

if [ "$(ps | grep /tmp/etc/passwall2 | grep -v grep)" != "" ]; then
   echolog "程序已启动,无需重复启动!"
   return 0
fi

@xiaorouji

davidtall avatar Oct 04 '22 01:10 davidtall

1,按照楼上的方法,删除 /etc/rc.d/S99zzz_passwall2 后在面板修改配置后点保存和应用就无法重启插件了 2,无法连接网络,是因为openwrt重启后,wan拨号联网先于passwall2插件的boot启动,所以插件会 先restart,再start,启动了两个实例就冲突了 3,正确的处理办法是在 /usr/share/passwall2/app.sh 的start 函数头部中加入去重代码,防止重复执行

if [ "$(ps | grep /tmp/etc/passwall2 | grep -v grep)" != "" ]; then
   echolog "程序已启动,无需重复启动!"
   return 0
fi

@xiaorouji

谢谢大佬,所以只要更新到最新源码就能解决了是吗

adfnkjasd avatar Oct 25 '22 04:10 adfnkjasd

最新的也有这个问题哦

zycshiniye avatar Nov 14 '22 14:11 zycshiniye

管理已经合并了我提交的PR,用最新的代码重新编译就可以了

davidtall avatar Dec 09 '22 13:12 davidtall