Skip to content

Bind local DNS before starting proxy#3250

Open
TurboTheTurtle wants to merge 1 commit into
shadowsocks:masterfrom
TurboTheTurtle:fix-hostname-dns-resolution
Open

Bind local DNS before starting proxy#3250
TurboTheTurtle wants to merge 1 commit into
shadowsocks:masterfrom
TurboTheTurtle:fix-hostname-dns-resolution

Conversation

@TurboTheTurtle
Copy link
Copy Markdown

Summary:

  • Start LocalDnsWorker before launching ss-local.
  • Avoid hostname resolution racing the unix://local_dns_path DNS socket at startup.
  • Keep ss-local on the local DNS socket instead of reverting to system DNS.

Why:
ss-local can resolve the remote server hostname immediately after it starts. When the config points DNS at unix://local_dns_path, the Unix socket needs to be bound first; otherwise domain-based profiles can fail during startup with empty resolution results.

Closes #3246.
Refs #3232.
Refs #3223.

Validation:

  • git diff --check
  • JAVA_HOME=/opt/homebrew/opt/openjdk@21 ANDROID_HOME=/Users/andy/Library/Android/sdk ./gradlew :core:compileDebugKotlin

Please preserve author attribution if this PR is squashed or reworked:
Co-authored-by: Andy Ye 35905412+TurboTheTurtle@users.noreply.github.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

最新版如果服务器写域名就不能连接 老版没事

1 participant