refactor: Clean up ipv4-to-ipv6 address mapping in QNT code
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 413
- Forks
- 63
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 6
Description
Currently, QNT "detects" if our quinn::Endpoint::is_ipv6 is set by looking at the paths and seeing if any of them are ipv6 and uses this info to transform addresses it knows about to ipv6-mapped ipv4 addresses, if needed:
https://github.com/n0-computer/quinn/blob/1df76577f753afd86f88cd949b434d94a6255fb8/quinn-proto/src/connection/mod.rs#L6276-L6279
https://github.com/n0-computer/quinn/blob/1df76577f753afd86f88cd949b434d94a6255fb8/quinn-proto/src/connection/mod.rs#L6190-L6205
We should try to clean this up.
The quinn::Endpoint has an ipv6: bool variable, and we should make use of that and somehow get it into proto::Connection:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read quinn/src/endpoint.rs around the ipv6 field and the referenced sections of quinn-proto/src/connection/mod.rs. Trace how Endpoint creates or initializes proto::Connection, then inspect the existing path-based address mapping. Done means Connection can use the endpoint's ipv6 value rather than inferring it from paths, with the related behavior covered by the existing tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- networking
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100