Closed papampi closed 5 days ago
When switch profile while TUN is enabled gives an error on device or resource busy, should click ok and then start profile again then the new profile starts with no problems.
This is also common in running sing-box in terminal. sometimes the process remains at background. Stop and restarting the proxy in nekoray usually make it to work again.
Maybe add a kill nekobox_core to restart profile command could solve it. Here is the log when tried to restart a running profile, failed to start profile when clicked ok on error and tried to start profile, killed nekobox_core, then profile started with no problem.
Stopping profile [Socks] socks-local
2024/06/19 21:06:29 [Info] sing-box closed in 5 ms
Starting profile [Socks] socks-local
Failed to start profile [Socks] socks-local
Starting profile [Socks] socks-local
Failed to start profile [Socks] socks-local
Starting profile [Socks] socks-local
Failed to start profile [Socks] socks-local
[Error] Core exited, restarting.
sing-box: 1.9.3
2024/06/19 21:06:51 nekobox_core grpc server listening at 127.0.0.1:34671
Starting profile [Socks] socks-local
Before [Error] Core exited restarting
... I issued pkill -x nekobox_core
in terminal, then click to start profile.
First of all thank you for your awesome work and fast fix/response to issues and problems.
The problem
When switch profile while TUN is enabled gives an error on device or resource busy, should click ok and then start profile again then the new profile starts with no problems. Seems like it needs a small sleep or check if last profile is stopped then start new one so TUN device is free to start new process and wont gives the error.