Skip to content

Conversation

@AliRezaBeigy
Copy link
Contributor

@AliRezaBeigy AliRezaBeigy commented Jan 22, 2026

Adds Windows support with socket type compatibility, OpenSSL linking fixes, and IPv6 fallback for UDP socket binding.

Changes:

  • Add winapi dependency for Windows socket types
  • Fix OpenSSL library linking on Windows (libssl/libcrypto instead of ssl/crypto)
  • Replace pthread with ws2_32 on Windows
  • Implement Windows-compatible sockaddr_storage using winapi
  • Add Windows versions of socket_addr_to_storage and sockaddr_storage_to_socket_addr
  • Update all server/client code to use platform-agnostic SockaddrStorage type
  • Add IPv6→IPv4 fallback for UDP socket binding (common on Windows)

I test and build the changes in https://github.com/AliRezaBeigy/slipstream-rust-deploy

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fd96c36d12

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request adds comprehensive Windows support to the Slipstream QUIC proxy by implementing platform-specific socket type handling, fixing OpenSSL linking, and adding IPv6 to IPv4 fallback for UDP socket binding.

Changes:

  • Added Windows-compatible socket type abstractions using winapi crate with conditional compilation
  • Updated OpenSSL and pthread library linking to use Windows-appropriate libraries (libssl/libcrypto and ws2_32)
  • Implemented IPv6→IPv4 fallback for UDP socket binding to handle Windows systems without IPv6 support

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
crates/slipstream-ffi/Cargo.toml Adds winapi dependency for Windows socket types
crates/slipstream-ffi/build.rs Conditionally links OpenSSL libraries (libssl/libcrypto on Windows) and replaces pthread with ws2_32 on Windows
crates/slipstream-ffi/src/runtime.rs Implements Windows-compatible SockaddrStorage type alias and socket conversion functions using winapi structures
crates/slipstream-ffi/src/picoquic.rs Updates imports to use Windows socket types conditionally
crates/slipstream-ffi/src/lib.rs Exports SockaddrStorage type for use by other crates
crates/slipstream-server/src/udp_fallback.rs Updates type signatures and test helper to use platform-agnostic SockaddrStorage
crates/slipstream-server/src/server.rs Updates socket address storage variables to use SockaddrStorage type
crates/slipstream-client/src/runtime/setup.rs Adds IPv6 to IPv4 fallback for UDP socket binding
crates/slipstream-client/src/runtime/path.rs Updates socket address storage to use SockaddrStorage type
crates/slipstream-client/src/runtime.rs Updates socket address storage variables to use SockaddrStorage type
crates/slipstream-client/src/dns/response.rs Updates type signature to use SockaddrStorage
crates/slipstream-client/src/dns/resolver.rs Updates struct fields and function signatures to use SockaddrStorage
crates/slipstream-client/src/dns/poll.rs Updates socket address storage variables to use SockaddrStorage type
crates/slipstream-client/src/dns/path.rs Updates socket address storage variable to use SockaddrStorage type

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@AliRezaBeigy
Copy link
Contributor Author

AliRezaBeigy commented Jan 23, 2026

Sorry for the late reply, I need more time to manage the test and copilot. Before that I have to manage picoquic. I will create a pr for that too.

@AliRezaBeigy
Copy link
Contributor Author

picoquic compatibility change pull request created PR, I suggest merging that before this.
@Mygod could you please approve the workflow

@Mygod
Copy link
Owner

Mygod commented Jan 23, 2026

Hi I have limited bandwidth so it will be a while until I get to this. Thanks for the patience. :)

@AliRezaBeigy
Copy link
Contributor Author

Branch has been rebased and all tests have passed successfully. However, this branch requires Mygod/slipstream-picoquic#1 to achieve full Windows compatibility. Please take a look that PR first if you find time.

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.

2 participants