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

Implement QUIC over SCION #56

Open
4 tasks
mlegner opened this issue Nov 28, 2023 · 3 comments
Open
4 tasks

Implement QUIC over SCION #56

mlegner opened this issue Nov 28, 2023 · 3 comments
Milestone

Comments

@mlegner
Copy link
Contributor

mlegner commented Nov 28, 2023

  • Implement interfaces of UDP socket that QUINN can use
  • Additionally create wrapper around UDP socket that handles path lookup, reversal, and caching.
    • Set path on the socket/connection
    • Listening socket on server side with path reversal for each client
      • Store path per client in a hash map (with expiring entries)? Timeout coordinated with QUIC timeouts.
      • Update path for source when different path is seen
      • Fallback with path lookup from sciond if no path is cached
@mlegner mlegner added this to the MVP milestone Nov 28, 2023
@mlegner mlegner modified the milestones: v0.1, v0.2 Jan 23, 2024
@amdfxlucas
Copy link

@mlegner here is the scion-quinn fork that uses the Rust-Pan bindings: https://github.com/amdfxlucas/scion-quinn/tree/scion-final
I build it for my current programming project at university ( https://github.com/amdfxlucas/libp2p-episub/tree/scion ) and it served me reasonably well. What is your opinion on this ?

@mlegner
Copy link
Contributor Author

mlegner commented Feb 6, 2024

@amdfxlucas Thanks a lot for the pointer, this definitely looks very interesting. Really cool that you got Quinn to play along with pan.

For this library, we are planning to go a slightly different route though: We would prefer to avoid having to maintain a fork/branch of Quinn ourselves. So our plan (although not fleshed out in detail) is to use upstream Quinn directly and build stuff around it when necessary (e.g., to work around the restriction of only having IP address types). Potentially, we would also contribute some changes directly upstream. From your experience working with Quinn, does this seam feasible to you?

In any case, it's great to have a functioning QUIC/SCION Rust implementation that we can use as an inspiration.

@amdfxlucas
Copy link

@mlegner You have a point with that, I'm lacking behind so many commits on my fork already...

Regarding the addresses problem, the solution i use in my scion forks, is to substitute a custom crate for std::net where SockAddr enum has an additional SCION variant (as I wish it were in the first place) but is otherwise an exact likeness.
It is intrusive but on the other hand easy to use, as all types impl. From/To with the original std::net types.
Perhaps the Quinn people could be convinced to consider such a compromise.

Or at least to weaken this: Transmit,
RecvMeta
into some kind of indirection like Into<SocketAddr> or even an &str as with Go's net.Addr

In the event, we came to a solution with them, we could implement the exported AsyncUdpSocket trait
within scion-rs and use it with new_with_abstract_socket() to construct an Endpoint (whose interface also had to change slightly: i.e. connect(SockAddr ) etc. ) and off we go speaking SCION-QUIC ..

As a last resort there is a dirty hack that the 14bytes of SCION addresses with IPv4 host part and port fit into the kernels sockaddr struct binary representation , but I haven't had to try this in rust yet xD

The only thing I really couldn't get to work is the ECN codepoints, they're ultimately gone after the dispatcher. But this causes only an Info message in the Traces

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

No branches or pull requests

2 participants