MatsuriDayo / NekoBoxForAndroid

NekoBox for Android / sing-box / universal proxy toolchain for Android
https://matsuridayo.github.io/
Other
11.34k stars 948 forks source link

BUG: 手机息屏一段时间后 VPN图标消失,链接断开 #574

Closed Goforfreedom closed 1 week ago

Goforfreedom commented 7 months ago

描述问题

预期行为:后台保持连接

实际行为:app 1.3.1手机pixel 系统Android14 ,app电池电量使用无限制,未黑域。手机待机一段时间后,VPN图标消失,网断。点击app图标,打开软件后,VPN图标出现,连接恢复正常。

如何复现

提供有帮助的截图,录像,文字说明,订阅链接等。

日志

如果有日志,请上传。请在文档内查看导出日志的详细步骤。

ghost commented 7 months ago

打開程式 位於 設定 中的 CPU喚醒鎖 再試試看 :)

Goforfreedom commented 7 months ago

打開程式 位於 設定 中的 CPU喚醒鎖 再試試看 :)

当时已经试过,还是一样的问题。

2444989513 commented 7 months ago

一样的问题小米 安卓13 IMG_20240227_042928

liliaotc commented 7 months ago

我也是同样的问题,手机熄屏后一段时间,节点断开。在系统设置里保留后台运行也没用。系统是安卓14

2444989513 commented 7 months ago

2024/02/28 10:24:59 [Debug] [VpnService] Add allow: com.cloudflare.onedotonedotonedotone, com.apkpure.aegon, com.accuweather.android, com.google.android.projection.gearhead, com.google.android.ext.services, com.google.android.webview, com.google.android.marvin.talkback, com.google.android.setupwizard, com.google.android.apps.authenticator2, com.yandex.browser, com.google.android.ims, com.android.chrome, com.google.android.configupdater, com.deepl.mobiletranslator, com.facebook.katana, org.mozilla.firefox, com.google.android.inputmethod.latin, com.google.android.gm, com.google.android.googlequicksearchbox, com.google.android.apps.cloudconsole, com.google.android.apps.subscriptions.red, com.google.android.partnersetup, com.google.ar.core, com.android.vending, com.google.android.gms, com.google.android.play.games, com.google.android.music, com.google.android.syncadapters.calendar, com.google.android.gsf, com.google.android.tts, com.google.android.syncadapters.contacts, com.instagram.android, com.topjohnwu.magisk, com.facebook.orca, me.twrp.twrpapp, com.thirtydegreesray.openhub, com.google.android.printservice.recommendation, org.zwanoo.android.speedtest, com.valvesoftware.android.steam.community, org.telegram.messenger, com.google.android.apps.googlevoice, com.twitter.android, ru.yandex.mail, com.google.android.youtube, com.google.android.apps.maps, com.google.android.feedback, com.google.android.apps.restore, com.mi.globalbrowser, com.google.android.apps.photos, com.android.updater, com.google.android.apps.translate, com.google.android.soundpicker, com.tinder, com.zing.zalo, moe.nb4a 2024/02/28 10:24:59 [Debug] [TrafficLooper] traffic count proxy to 2 panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x74673545b4]

goroutine 44 [running]: github.com/sagernet/sing-box/transport/fakeip.(Store).Create(0x400025f040, {0x40003ea300, 0x15}, 0x0) github.com/sagernet/sing-box@v1.0.0/transport/fakeip/store.go:77 +0x34 github.com/sagernet/sing-box/transport/fakeip.(Transport).Lookup(0x4000260b80, {0x746741f920?, 0x0?}, {0x40003ea300, 0x15}, 0x0?) github.com/sagernet/sing-box@v1.0.0/transport/fakeip/server.go:75 +0x6c github.com/sagernet/sing-dns.(Client).Lookup(0x4000244f30, {0x7467648208, 0x40003720e0}, {0x746764e5f0, 0x4000260b80}, {0x40003ea300, 0x16}, 0x3) github.com/sagernet/sing-dns@v0.1.12/client.go:226 +0x8c8 github.com/sagernet/sing-dns.(Client).exchangeToLookup(0x400037baf8?, {0x7467648208, 0x40003720e0}, {0x746764e5f0?, 0x4000260b80?}, 0x4000332510, {{0x40003ea300?, 0x74d3849f18?}, 0xbb38?, 0x37?}) github.com/sagernet/sing-dns@v0.1.12/client.go:370 +0x64 github.com/sagernet/sing-dns.(Client).Exchange(0x4000244f30, {0x7467648208, 0x40003720e0}, {0x746764e5f0, 0x4000260b80}, 0x4000332510, 0x3) github.com/sagernet/sing-dns@v0.1.12/client.go:105 +0x46c github.com/sagernet/sing-box/route.(Router).Exchange(0x4000212008, {0x7467648160, 0x400030ef30}, 0x4000332510) github.com/sagernet/sing-box@v1.0.0/route/router_dns.go:103 +0x268 github.com/sagernet/sing-box/outbound.(DNS).newPacketConnection.func1.1() github.com/sagernet/sing-box@v1.0.0/outbound/dns.go:238 +0x98 created by github.com/sagernet/sing-box/outbound.(DNS).newPacketConnection.func1 in goroutine 43 github.com/sagernet/sing-box@v1.0.0/outbound/dns.go:237 +0x8c 2024/02/28 10:25:00 loaded geosite database: 1403 codes

llllllllqq commented 7 months ago

同样问题, panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x7d18d90954]

goroutine 17 [running, locked to thread]: libcore.(*BoxInstance).Sleep(0x4000130580) libcore@v0.0.0-00010101000000-000000000000/box.go:151 +0x24 main.proxylibcore_BoxInstance_Sleep(0xffffff01?) gobind/gobind/go_libcoremain.go:128 +0x38

gravelyt commented 7 months ago

看看nekobox设置里的唤醒锁是否打开了,这个设置挺重要的。 没打开这个选项,长时间熄屏唤醒后容易断流(系统的电池和后台进程都设置了),打开后就没有这种情况了。

himan85 commented 7 months ago

同样的问题~

NikoCat233 commented 7 months ago

同样问题,唤醒锁已开,后台电池优化已忽略

ZevAlain commented 6 months ago

+1

askfname commented 6 months ago

似乎和Android系统上个月的安全更新有关,之前是不存在这个问题的,如果有添加快捷磁贴的话下拉通知栏即可恢复连接,很迷惑的操作

xf22001 commented 5 months ago

我装的1.3.1版也是这样的问题。后台电池优化已忽略,后台锁定。从快捷开关打开后,锁屏一段时间后,vpn图标消失。同样的配置茉莉一直正常。android 12.

imaqine commented 5 months ago

我的也一样,给app上后台锁,熄屏时间长一些就掉了

ZevAlain commented 5 months ago

换成1.2.9后没问题了

joimjnbg commented 4 months ago

1.3.1确实有这个问题,退回1.29了。差点刷机,幸亏,Google一下。 系统版本是note turbo 12 .aospa 打了4月的补丁,没有发现异常log.