Skip to content

fix(proxy): forward DNS for all non-denied domains, remove ChannelGateMiddleware#8

Merged
nnemirovsky merged 1 commit into
mainfrom
fix/dns-and-channel-gate
Apr 7, 2026
Merged

fix(proxy): forward DNS for all non-denied domains, remove ChannelGateMiddleware#8
nnemirovsky merged 1 commit into
mainfrom
fix/dns-and-channel-gate

Conversation

@nnemirovsky
Copy link
Copy Markdown
Owner

Summary

  • DNS interceptor now forwards all queries except explicitly denied domains. Non-denied domains resolve via DNS so connections reach the SOCKS5 layer where approval flow works.
  • Removed ChannelGateMiddleware. API accessible with just SLUICE_API_TOKEN, no HTTP channel required.
  • Added Engine.IsDeniedDomain() for port/protocol-agnostic deny checking.

…eMiddleware

Two fixes:

1. DNS interceptor now only blocks domains with explicit deny rules.
   Previously, any domain not matching an allow rule got NXDOMAIN,
   silently preventing connections from reaching the SOCKS5 approval
   flow. Now DNS resolves for all domains, and policy enforcement
   (allow/ask/deny) happens at the SOCKS5 CONNECT level where the
   Telegram approval broker can prompt the user.

2. Removed ChannelGateMiddleware that blocked all /api/* routes when
   no HTTP channel was enabled. The API is now accessible whenever
   SLUICE_API_TOKEN is set, regardless of channel configuration.
   Bearer token auth is sufficient protection.
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