Skip to content

Validate obfuscation regular port advertisement - #268

Closed
snapetech wants to merge 1 commit into
mainfrom
agent/validate-obfuscation-regular-port
Closed

Validate obfuscation regular port advertisement#268
snapetech wants to merge 1 commit into
mainfrom
agent/validate-obfuscation-regular-port

Conversation

@snapetech

Copy link
Copy Markdown
Owner

What changed

  • Reject soulseek.obfuscation.advertise_regular_port: false when obfuscation is enabled.
  • Add a focused regression test for compatibility mode.
  • Document the startup fix in the Unreleased changelog.

Root cause

The public options validator accepted the unsupported combination, but PeerObfuscationOptions rejected it later during dependency construction. The daemon therefore terminated with an ArgumentException instead of reporting invalid configuration.

User impact

Invalid obfuscation configuration now fails early with a clear validation error and a non-zero exit status, instead of reaching runtime construction and terminating unexpectedly.

Validation

  • dotnet test tests/slskd.Tests.Unit/slskd.Tests.Unit.csproj -c Release --filter FullyQualifiedName~SoulseekOptionsValidationTests — 11 passed.
  • Startup reproduction with SLSKD_SLSK_OBFUSCATION=true and SLSKD_SLSK_OBFUSCATION_ADVERTISE_REGULAR_PORT=false now reports Invalid configuration and exits 1.

@snapetech snapetech closed this Jul 17, 2026
@snapetech
snapetech deleted the agent/validate-obfuscation-regular-port branch July 24, 2026 17:36
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