Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use secure DNS for websocket connection establishment #5386

Merged
merged 8 commits into from
Feb 4, 2025

Conversation

jmwample
Copy link
Contributor

@jmwample jmwample commented Jan 23, 2025

Adjust the websocket connection establishment (using tokio_tungstenite) to use a custom DNS resolver that tries DoH and DoT.

instead of relying on the tokio_tungstenite to open the tokio::net::TcpStream (which it does here) which would kick in the default network resolver we do the resolution and open the TcpStream ourselves before handing off to the websocket libary,


This change is Reviewable

@jmwample jmwample requested review from octol and jstuczyn January 23, 2025 18:41
@jmwample jmwample added this to the Ruta milestone Jan 23, 2025
@jmwample jmwample requested a review from aniampio January 23, 2025 18:43
Copy link

vercel bot commented Jan 23, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs-nextra ⬜️ Ignored (Inspect) Visit Preview Jan 27, 2025 5:22pm
nym-next-explorer ⬜️ Ignored (Inspect) Visit Preview Jan 27, 2025 5:22pm

Copy link
Contributor Author

@jmwample jmwample left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 10 files reviewed, 3 unresolved discussions (waiting on @aniampio, @jstuczyn, and @octol)

common/client-core/src/init/websockets.rs Show resolved Hide resolved
common/client-libs/gateway-client/src/client/websockets.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@octol octol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming it works in wasm, looks good!

@jmwample
Copy link
Contributor Author

jmwample commented Feb 4, 2025

Wasm is intentionally and explicitly (via compiler directives) excluded from these changes. There is no change to the wasm behavior.

@jmwample jmwample merged commit 1d2e6d9 into develop Feb 4, 2025
19 of 20 checks passed
@jmwample jmwample deleted the jmwample/websockets-dns branch February 4, 2025 18:20
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.

3 participants