Skip to content

feat(proxy): JWT-preserving OAuth phantoms and DNS-based hostname recovery#3

Merged
nnemirovsky merged 1 commit intomainfrom
feat/jwt-phantom-and-hostname-recovery
Apr 7, 2026
Merged

feat(proxy): JWT-preserving OAuth phantoms and DNS-based hostname recovery#3
nnemirovsky merged 1 commit intomainfrom
feat/jwt-phantom-and-hostname-recovery

Conversation

@nnemirovsky
Copy link
Copy Markdown
Owner

Summary

  • OAuth phantom tokens now preserve JWT header and payload, re-signed with sluice's HMAC key. Clients can extract claims (accountId, email) from phantom JWTs. Non-JWT tokens fall back to SLUICE_PHANTOM strings.
  • DNS reverse cache maps IPs to hostnames from intercepted DNS responses. SOCKS5 handler uses this to show hostnames in Telegram approval messages and match hostname-based policy rules.

…overy

Two features:

1. OAuth phantom tokens now preserve JWT structure. When the real
   access token is a JWT, the phantom keeps the header and payload
   (so clients can extract claims like accountId) but re-signs with
   sluice's own HMAC key. Non-JWT tokens fall back to deterministic
   SLUICE_PHANTOM strings.

2. DNS reverse cache recovers hostnames from IP-only SOCKS5 CONNECT
   requests. The DNS interceptor populates an IP->hostname cache from
   A/AAAA response records. The SOCKS5 handler uses this cache so
   Telegram approval messages show hostnames and hostname-based policy
   rules match correctly.
@nnemirovsky nnemirovsky merged commit e82be80 into main Apr 7, 2026
@nnemirovsky nnemirovsky deleted the feat/jwt-phantom-and-hostname-recovery branch April 7, 2026 13:02
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