chika0801 / sing-box-examples

sing-box ้…็ฝฎ็คบไพ‹
https://github.com/SagerNet/sing-box
1.8k stars 299 forks source link

Why can it only be started once...and then it cannot be started again? #54

Closed zhouxinghong closed 1 year ago

zhouxinghong commented 1 year ago

Why can it only be started once...and then it cannot be started again? Windows 10 sing-box 1.4.6

chika0801 commented 1 year ago

You didn't provide logs, and your config file, I can't help you.

I suggest you go to the official sing-box github page and post for help.

zhouxinghong commented 1 year ago
    "outbound": [
   {
      "type": "ss",
      "tag": "proxy",
      "server": "udp.piyo-idc.top",
      "server_port": 80536,
      "alter_id": 0,
      "transport": {
        "path": "/gitee"
      }
    },
zhouxinghong commented 1 year ago

After the first startup, after I exited by ending the process through the task manager, it could no longer be started.

zhouxinghong commented 1 year ago

Launched via the following batch process start /min sing-box.exe run

chika0801 commented 1 year ago

From the analysis of the phenomenon you said, I think there is a problem with your configuration, or less and administrator rights to start the program, so sing-box program error.

My test method is, in the windows system, set to enter the terminal programme, there is an option to always start with administrator in the setup options.

Then I start a terminal programme (with administrator privileges) and enter the command sing-box.exe run (you have to enter the path to the sing-box folder beforehand). At this point, if there are any errors reported, the terminal programme window does not message and you can see what the log shows. In order to do the next step in the analysis to find the cause.

zhouxinghong commented 1 year ago

Thank you for your help! I will try your method again. ๐Ÿ‘๐Ÿ‘๐Ÿ˜œ

chika0801 commented 1 year ago

There is another way. In the CMD window, you type sing-box -h. I remember that there is a command check. you add the name of your configuration file with this command, and it will check if there are any errors in your configuration. If you check this way there are no errors. If you run the batch file with administrator privileges, and the command window still flashes back, you have to start the CMD window with administrator privileges as I replied to you earlier, and run the command sing-box.exe run, and then analyse the reason through the error message.

zhouxinghong commented 1 year ago

Thank you very much for your attentive help! ๐Ÿ‘๐Ÿ‘๐Ÿ˜œ I have a few questions that I would like to ask you:

  1. Is there any command in the terminal that can stop and exit the program?
  2. How to switch service nodes?
  3. How to update the service node?
  4. How to test the delay time and speed of the service node?
chika0801 commented 1 year ago

Is there any command in the terminal that can stop and exit the program?

ctrl+c

How to switch service nodes?

I have only 1 outbound (proxy) in my configuration. I'm not a CLASH user, I'm not a purchaser of the service provided by the merchant, so for me I don't have the need to switch nodes from that panel of the CLASH client. If you look at the sing-box website, there is support for the CLASH panel and the Selector parameter of the configuration file.

How to test the delay time and speed of the service node?

How to test that you can ping your VPS's IP locally, and that you can use route tracing on the VPS to measure the backhaul route to your local IP. These should not be questions for sing-box configuration issues. The only relevant one is the parameter https://sing-box.sagernet.org/zh/configuration/outbound/urltest/

zhouxinghong commented 1 year ago

Thank you very much! I need to study more uses of it๐Ÿ˜œ๐Ÿ‘