NekoBoxForAndroid
NekoBoxForAndroid copied to clipboard
Time mismatch issue during daylight saving transition in Iran affecting reality protocol verification in NekoBox
Hello NekoBox Team,
I am facing an issue with your application related to device time synchronization. In Iran, the government did not observe the daylight saving time transition this spring, resulting in the time being stuck in 'winter mode'. This has caused some Android devices to have incorrect times when set to automatic mode, forcing users to update their device time manually.
This has subsequently impacted the reality protocol verification feature within the NekoBox app, which appears to fail under these conditions.
I have found a potential workaround using the Sing-Box Core's NTP support. I created a custom JSON client configuration that when applied to Sing-Box Core, effectively resolves the time discrepancy issue. However, when applying the same configuration to NekoBox, it fails to work.
Here is the configuration:
{
"dns": {
"rules": [],
"servers": [
{
"address": "https://8.8.8.8/dns-query",
"address_resolver": "dns-local",
"detour": "direct",
"strategy": "",
"tag": "dns-remote"
},
{
"address": "underlying://0.0.0.0",
"address_resolver": "dns-local",
"detour": "direct",
"strategy": "",
"tag": "dns-direct"
},
{
"address": "underlying://0.0.0.0",
"detour": "direct",
"tag": "dns-local"
}
]
},
"ntp": {
"enabled": true,
"server": "time.apple.com",
"server_port": 123,
"detour": "direct"
},
"inbounds": [
{
"domain_strategy": "",
"listen": "127.0.0.1",
"listen_port": 7890,
"sniff": true,
"sniff_override_destination": false,
"tag": "mixed-in",
"type": "mixed"
}
],
"log": {
"level": "info"
},
"outbounds": [
{
"domain_strategy": "",
"flow": "",
"server": "185.139.7.249",
"server_port": 443,
"tag": "proxy",
"tls": {
"enabled": true,
"reality": {
"enabled": true,
"public_key": "N1111111",
"short_id": "n2222222"
},
"server_name": "www.aloo.net",
"utls": {
"enabled": true,
"fingerprint": "chrome"
}
},
"type": "vless",
"uuid": "47b11d37"
},
{
"tag": "direct",
"type": "direct"
},
{
"tag": "bypass",
"type": "direct"
},
{
"tag": "block",
"type": "block"
},
{
"tag": "dns-out",
"type": "dns"
}
],
"route": {
"final": "proxy",
"rules": [
{
"outbound": "dns-out",
"protocol": "dns"
}
]
}
}
It seems that NekoBox doesn't process or handle the configuration in the same way as Sing-Box Core.
I would appreciate your assistance in addressing this issue, as it's impacting the usability of your application in environments where time synchronization is manually managed. If the application could support an NTP-based solution similar to Sing-Box Core, that would be ideal.
Thank you for your time and looking forward to your response.
same here
@arm64v8a
Please provide your debug log
Please note that I've omitted my proxy configuration details from the logs for security reasons. Be assured that my configuration works perfectly when the automatic time setting is enabled. Therefore, the configuration is fine.
Date: 2023-08-08 15:24:23.985 UTC
OS_VERSION: 4.14.175-gd7103c943974-dirty
SDK_INT: 29
RELEASE: 10
ID: QSR1.210802.001
DISPLAY: QSR1.210802.001
INCREMENTAL: 7603624
SECURITY_PATCH: 2019-09-05
IS_DEBUGGABLE: 0
IS_EMULATOR: null
IS_TREBLE_ENABLED: true
TYPE: user
TAGS: release-keys
MANUFACTURER: Google
BRAND: google
MODEL: Android SDK built for arm64
PRODUCT: sdk_gphone64_arm64
BOARD: goldfish_arm64
HARDWARE: ranchu
DEVICE: emulator64_arm64
SUPPORTED_ABIS: arm64-v8a
Settings:
mixedPort: 2080
portLocalDns: 6450
transproxyPort: 9200
isAutoConnect: false
nightTheme: 0
serviceMode: vpn
tunImplementation: 1
mtu: 9000
speedInterval: 1000
profileTrafficStatistics: true
showGroupInNotification: false
alwaysShowAddress: false
meteredNetwork: false
showDirectSpeed: true
proxyApps: false
bypassLan: false
bypassLanInCore: false
trafficSniffing: 1
resolveDestination: false
ipv6Mode: 0
rulesProvider: 0
mux: []
muxType: 0
muxConcurrency: 8
remoteDns: https://8.8.8.8/dns-query
domain_strategy_for_remote: auto
directDns: https://223.5.5.5/dns-query
domain_strategy_for_direct: auto
domain_strategy_for_server: auto
enableDnsRouting: true
enableFakeDns: false
appendHttpProxy: false
requireTransproxy: false
transproxyMode: 0
allowAccess: false
connectionTestURL: http://cp.cloudflare.com/
acquireWakeLock: false
enableClashAPI: false
tcpKeepAliveInterval: 15
appTLSVersion: 1.2
showBottomBar: false
nekoPlugins:
logLevel: 3
profileId: 3
profileGroup: 1
profileCurrent: 3
Logcat:
--------- beginning of main
08-08 20:52:10.979 4448 4448 W TabLayout: MODE_SCROLLABLE + GRAVITY_FILL is not supported, GRAVITY_START will be used instead
08-08 20:52:42.511 4448 4448 W TabLayout: MODE_SCROLLABLE + GRAVITY_FILL is not supported, GRAVITY_START will be used instead
08-08 20:52:43.676 4448 4478 D EGL_emulation: eglMakeCurrent: 0x7eab023e60: ver 3 0 (tinfo 0x7eab018820)
08-08 19:53:08.239 4448 4478 D EGL_emulation: eglMakeCurrent: 0x7eab023e60: ver 3 0 (tinfo 0x7eab018820)
08-08 19:53:54.231 4448 4448 W TabLayout: MODE_SCROLLABLE + GRAVITY_FILL is not supported, GRAVITY_START will be used instead
08-08 19:54:13.030 4448 4448 W TabLayout: MODE_SCROLLABLE + GRAVITY_FILL is not supported, GRAVITY_START will be used instead
2023/08/08 15:24:14 [Info] sing-box closed in 0 ms
2023/08/08 15:24:14 [Debug] [TrafficLooper] finally traffic post done
2023/08/08 15:24:16 INFO[0000] outbound/direct[direct]: outbound packet connection to time.apple.com:123
2023/08/08 15:24:16 INFO[0000] outbound/direct[direct]: outbound connection to 8.8.8.8:443
2023/08/08 15:24:16 INFO[0000] outbound/direct[direct]: outbound connection to 8.8.8.8:443
2023/08/08 15:24:16 INFO[0000] dns: exchanged time.apple.com CNAME time.apple.com. 704 IN CNAME time.g.aaplimg.com.
2023/08/08 15:24:16 INFO[0000] dns: exchanged time.apple.com A time.g.aaplimg.com. 704 IN A 17.253.14.123
2023/08/08 15:24:16 INFO[0000] dns: exchanged time.apple.com A time.g.aaplimg.com. 704 IN A 17.253.38.253
2023/08/08 15:24:16 INFO[0000] dns: exchanged time.apple.com A time.g.aaplimg.com. 704 IN A 17.253.38.125
2023/08/08 15:24:16 INFO[0000] dns: exchanged time.apple.com CNAME time.apple.com. 635 IN CNAME time.g.aaplimg.com.
2023/08/08 15:24:16 INFO[0000] dns: exchanged time.apple.com AAAA time.g.aaplimg.com. 635 IN AAAA 2a01:b740:a30:3000::1f2
2023/08/08 15:24:16 INFO[0000] dns: exchanged time.apple.com AAAA time.g.aaplimg.com. 635 IN AAAA 2a01:b740:a08:4000::1f2
2023/08/08 15:24:16 INFO[0000] dns: exchanged time.apple.com AAAA time.g.aaplimg.com. 635 IN AAAA 2a01:b740:a08:3000::1f2
2023/08/08 15:24:17 INFO[0001] ntp: updated time: 2023-08-08 16:24:32 +0000
2023/08/08 15:24:17 INFO[0001] inbound/mixed[mixed-in]: tcp server started at 127.0.0.1:6450
2023/08/08 15:24:17 INFO[0001] sing-box started (1.333s)
2023/08/08 15:24:17 [Debug] [TrafficLooper] traffic count proxy to 3
2023/08/08 15:24:18 INFO[0002] outbound/vless[proxy]: outbound connection to cp.cloudflare.com:80
2023/08/08 15:24:18 [Warning] [StatsBar$testConnection$1] java.lang.IllegalStateException: Get "http://cp.cloudflare.com/": reality verification failed```
@arm64v8a
try to change dest domain