sing-box icon indicating copy to clipboard operation
sing-box copied to clipboard

Hangs when no network and ntp on

Open mazzz1y opened this issue 7 months ago • 0 comments

Operating system

Android

System version

Android 9(TV) & Android 14(OneUI 6.1)

Installation type

sing-box for Android Graphical Client

Version

SFA-1.9.3-armeabi-v7a.apk
SFA-1.9.3-arm64-v8a.apk 

Description

Sing-box client becomes stuck if NTP is enabled and the network is not available at the moment. After the network becomes available, the client does not start working. I have to restart it by using "force close"

I expect that the client should continue trying to synchronize until it succeeds or waiting for network, but it seems to crash after the first attempt

Reproduction

  1. Sing-box 1.9.3 from github
  2. Import this simplified config:
{
  "log": {
    "disabled": false,
    "level": "debug"
  },
  "inbounds": [
    {
      "type": "mixed",
      "tag": "mixed-in",
      "listen": "127.0.0.1",
      "listen_port": 1085
    }
  ],
  "ntp": {
    "enabled": true,
    "server": "time.apple.com",
    "server_port": 123,
    "interval": "30m",
    "detour": "direct-out"
  },
  "outbounds": [
    {
      "type": "direct",
      "tag": "direct-out"
    }
  ],
  "route": {
    "auto_detect_interface": true,
    "final": "direct-out"
  }
}
  1. Start VPN
  2. Check the status of VPN and try to stop it

Logs

ERROR[0000] router: missing default interface
INFO[0000] outbound/direct[direct-out]: outbound packet connection to time.apple.com:123
DEBUG[0000] lookup domain time.apple.com
WARN[0010] router: initialize time service take too much time to finish!
### I enabled network here 
INFO[0032] router: updated default interface wlan0, index 37

Supporter

Integrity requirements

  • [X] I confirm that I have read the documentation, understand the meaning of all the configuration items I wrote, and did not pile up seemingly useful options or default values.
  • [X] I confirm that I have provided the server and client configuration files and process that can be reproduced locally, instead of a complicated client configuration file that has been stripped of sensitive data.
  • [X] I confirm that I have provided the simplest configuration that can be used to reproduce the error I reported, instead of depending on remote servers, TUN, graphical interface clients, or other closed-source software.
  • [X] I confirm that I have provided the complete configuration files and logs, rather than just providing parts I think are useful out of confidence in my own intelligence.

mazzz1y avatar Jul 15 '24 20:07 mazzz1y