Skip to content

[Bug] Rule-set download fails because DNS lookup is performed via ::1:53 (localhost), causing connection refused #69

Description

@FSSocrates

Environment

  • App: SingCast
  • Version: Latest release (also reproduced on previous release)
  • Device: Realme 9
  • Android: 14

Description

When importing or starting any configuration that requires downloading remote rule sets, SingCast fails before the rule sets are downloaded.

The Rule-Set Proxy is set to:

https://gh-proxy.org

The app forces this field to be non-empty.

Opening https://gh-proxy.org in a browser works correctly (it redirects to https://gh-proxy.com), so the proxy itself appears to be reachable.

Error

PlatformException(
CORE_ERROR,
start instance:
(initialize rule-set[0]:
initial rule-set: geoip-sg:
Get "https://gh-proxy.org/https://raw.githubusercontent.com/SagerNet/sing-geoip/rule-set/geoip-sg.srs":
lookup gh-proxy.org:
(exchange4: gh-proxy.org.: read response: read udp [::1]:41429->[::1]:53: read: connection refused |
exchange6: gh-proxy.org.: read response: read udp [::1]:38136->[::1]:53: read: connection refused)
...
),
null,
null
)

Changing the Rule-Set Proxy to:

https://raw.githubusercontent.com

produces:

https://raw.githubusercontent.com/https://raw.githubusercontent.com/...

which confirms that the Rule-Set Proxy is simply prepended to the original URL.

However, the failure still occurs during DNS resolution:

lookup raw.githubusercontent.com
read udp [::1]:xxxxx->[::1]:53
connection refused

Troubleshooting already performed

  • Disabled all VPN applications.
  • Disabled all DNS applications.
  • Disabled Android Private DNS.
  • Verified https://gh-proxy.org is reachable in a web browser.
  • Reproduced on both the latest and previous SingCast releases.

Expected behavior

SingCast should resolve the hostname using the Android system DNS (or a valid configured DNS server) and download the rule sets successfully.

Likely cause

The embedded sing-box core appears to be attempting DNS resolution through the localhost IPv6 resolver (::1:53), but no DNS server is running there, resulting in connection refused.

Could you check whether SingCast is unintentionally configuring DNS to ::1/localhost before rule-set initialization, or whether the DNS initialization order is causing rule-set downloads to occur before a resolver is available?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions