SagerNet / sing-box

The universal proxy platform
https://sing-box.sagernet.org/
Other
15.38k stars 1.89k forks source link

The GUI client does not work properly with profile that working fine on CLI #1840

Closed HUMORCE closed 2 weeks ago

HUMORCE commented 2 weeks ago

Operating system

macOS

System version

Sonoma 14.5

Installation type

sing-box for macOS Graphical Client

If you are using a graphical client, please provide the version of the client.

1.9.0 (267)

Version

sing-box version 1.9.0

Environment: go1.22.3 darwin/arm64
Tags: with_gvisor,with_quic,with_wireguard,with_utls,with_reality_server,with_clash_api
CGO: enabled

Description

The GUI client does not work properly with profile that working fine on CLI. Or maybe it contains incorrect config entries? but why is the GUI not compatible with it when the CLI is.

sample.json

{
  "log": {
    "level": "debug",
    "timestamp": true
  },
  "inbounds": [
    {
      "type": "mixed",
      "tag": "mixed-in",
      "listen": "0.0.0.0",
      "listen_port": 2080
    }
  ],
  "outbounds": [
    {
      "type": "direct",
      "tag": "direct"
    },
    {
      "type": "block",
      "tag": "block"
    },
    {
      "type": "dns",
      "tag": "dns"
    }
  ],
  "route": {
    "rules": [
      {
        "protocol": "dns",
        "outbound": "dns"
      },
      {
        "domain_suffix": ".org",
        "outbound": "block"
      }
    ],
    "final": "direct"
  }
}

Reproduction

  1. Install sing-box GUI from App Store ( I did not try brew install sfm, because I prefer MAS Apps.
  2. Install sing-box CLI with homebrew: brew install sing-box
  3. Tests the profile above with CLI and GUI client
curl https://example.com -x http://127.0.0.1:2080
curl https://python.org -x http://127.0.0.1:2080

All sites are inaccessible while started the profile with GUI client.

Logs

(packet-tunnel): Here I stand
INFO[0000] router: updated default interface en0, index 15
INFO[0000] inbound/mixed[mixed-in]: tcp server started at 0.0.0.0:2080
INFO[0000] sing-box started (0.22s)

Supporter

Integrity requirements

dyhkwong commented 2 weeks ago

If listening on 0.0.0.0 does not work (but other addresses work) for the apple GUI client, it is a known issue (unable to access the server listening on 0.0.0.0 from local network), and there is no solution.

HUMORCE commented 2 weeks ago

:: also does not work with GUI client.

While this is a known issue for you, I have not found related issues/docs. Thank you for pointing this out.