* chore: Attempt at drafting a readme
* spelling
* Fix crypto wording
* typo
* remove support for version 2
seems that needs a little more work
* add modern stuff folks demand
* qlog typo
* Try and be slightly less confusing
* WIP
* Prettify parsing code
* Fix error in docs
* clippy
* Some optimizations:
- use a lazy iterator over the ALPNs
- fast path for when the ALPNs are in the first crypto frame
Also some tests for the rarely used assembly stuff.
* Fix doc comments regarding allocations
* Add a newtype wrapper for the decrypted initial packet.
We can then add all the various convenience methods to it, not to the main Incoming.
So even if we have a lot of stuff on it we don't pollute the incoming API.
Also we cache the decryption.
* Extend comments about decrypt
Not sure how to do this. You could make non-fallback use a feature flag that is enabled by default,
but then everybody that runs no-default-features would not get GSO/GRO despite
being on unix...
* Switch to `aes-gcm` crate for retry token logic when using rustls
* Split `rustls-ring` and `rustls-aws-lc-rs` features into `rustls`, `ring` and `aws-lc-rs` features.
* Better document the features.
* `cargo make format`
* Fix outdated feature references
* Avoid double-defining `configured_provider`
* File an issue about suddenly working PQC handshakes now breaking a test
* Fix rebase
* Only enable `aes-gcm` dependency when needed
* Add features for backwards compatibility
* Add some links to the spec's retry packet integrity section
Drop the connection state lock before cloning ConnectionRef in the existing-path branch of open_path_ensure, and add a multipath regression test that verifies ensuring an existing path resolves quickly and returns consistent path details.
At some point in the past this probably worked around some borrowing
issues. Now it is distracting (just kidding, it was always
distracting but sadly necessary).
Some refactors:
- Move code around so that helpers structs come after the Connection,
kind of more the style and keeps connection code more together.
- Use some defensive coding in the spaces impls. Fix a few bugs
detected by it
* fix path challenge issues
* the tests
* keep two set of challenges
* fmt
* remove proptest, there's no need
* tone down descriptions
* passive migration sets ip
* adjust test
* spelling
* take into account MSRV
* add more info to the ignored variant
* allow the case when the challenge was sent without knowing our src ip
* test(proto): add failing seeds found in CI
* ci: add expanded proptest runs to ci
Adds daily runs, and a longer run for regular tests, also available as cargo make tasks
* ci: fight windows
* another failing seed
* apply CR
* add seeds found in CI
---------
Co-authored-by: Philipp Krüger <philipp.krueger1@gmail.com>
* Failing regression test extract from failing proptest
* fix(proto): Avoid generating protocol violation errors for unreciprocated path abandons
* Only increase MAX_PATH_ID once we drain paths, remove AbandonState
* expand use of SpaceKind where SpaceId::Data(PathId) does not fit
* remove methods no longer needed
* upgrade_crypto needs a kind not a spaceid
* move SpaceKind to spaces.rs
* fix import
* fmt
* address review
* track reahc_outs as a set
* improve readability
* do not claim too many addresses if the frame is repeated
* remove unused variable
* revert unintended change
* move `sent_with_keys` into `CryptoSpace` and out of `PacketNumberSpace`
* remove function with single call delegation
* wip
* move confidentiality limits to.. better places
* fix some bugs
* increase readability
* clippy
* add docs, sorry @flub
* add CryptoState and burte force its usage
* add CryptoState::has_keys
* add CryptoState::local_crypto and CryptoState::remote_crypto
* use local_crypto and remote_crypto
* local_crypto uses SpaceId instead to select zero rtt when needed
* move update_keys to CryptoState
* add more util fns and rename EncryptionLevel
* rename to `EncryptionLevel` again
* add some util fns
* add space kind
* use SpaceKind were it fits
* use SpaceKind in connection too
* packet header declares encryption level, not packet number space
* move module functions to CryptoState methods
* random improvements
* fmt
* fix for merge
* key phase is also part of the connections crypto state
* revert making the highest space a SpaceKind. Leave for later PR
* revert taking SpaceKindn in Connection methods, leave for other PR
* packet.space.header is SpaceId again
* fmt
* fixes after self review
* address review
* introduce CidQueue::remaining
* add method to send nat traversal path challenges
* remove rand data from poll transmit
* remove unused import
* remvoe active_probes from nat traversal state
* register all the things
* do not set the timer, handle ina different pr
* deal with network changes
* expose new trait
* adjust test
* spelling
* add public api
* update behaviour based on review
* remove the need for a default hint value
* provide methods to get or not a hint
* so many annoying changes
* fixes
* remove mergetool file
* reduce awkwardness
* go back to a single method for even less awkwardness
* clippy and fmt
* make docs clearer (?), include client-side note
* update API name to match that of proto
* cleanup proto api by moving async bounds to the async crate
* aim for more clarity
* more failsafes
* public import
* add network change test for the vanilla quic case
* bugfix: do not send pathopen events for non-multipath
* add test for multipath network changes without a hint
* add a test for a selective network change hint
* add some logs
* fix(quinn-udp): disable IP_PKTINFO under Wine
Wine's IP_PKTINFO implementation maps Linux's ipi_addr (the IP header
destination address) to Windows' IN_PKTINFO.ipi_addr. On multi-homed hosts,
ipi_addr and ipi_spec_dst (the local address) can differ, causing QUIC to
discard packets with 'sent to incorrect interface'.
This commit:
- Detects Wine at runtime via ntdll.dll's wine_get_version export
- Disables pktinfo when running under Wine (both send and recv paths)
- Exports is_wine() from the crate for use by downstream tests
- Skips the local_ip assertion in echo tests under Wine
- Upgrades windows-sys to 0.61
See:
- Wine's convert_control_headers(): https://github.com/wine-mirror/wine/blob/master/dlls/ntdll/unix/socket.c
- Linux in_pktinfo fields: https://man7.org/linux/man-pages/man7/ip.7.html
- Windows IN_PKTINFO: https://learn.microsoft.com/en-us/windows/win32/api/ws2ipdef/ns-ws2ipdef-in_pktinfo
* apply CR
* fixup
* cleanup
* add basic struct and methods
* dispatch using side
* use ConnPair in multipath tests
* use `Side` variants directly
* add testresult to dev deps
* always use time from underlying pair
* use ConnPair in multipath tests even if they don't use multipath_pair
* use stats(side) directly
* introduce ConnPair::connect_with
* introduce ConnPair::with_default_endpoint
* reduce LOCs
* introduce ConnPair::with_transport_cfg for even less noise
* only keep the public api
* fmt
* take advantage of derive_more
* add some basic docs
* revert weird windows update
* fix(udp): make potentially non available socket options optional
This is likely the reason we are seeing issues when trying to bind under wine currently
Ref https://github.com/n0-computer/iroh/issues/3901
* fix(udp): track ecn for ipv4 and ipv6 seperately
* fix: expand error type checks
* fix: make DONTFRAGMENT socket options gracefully degrade
Wine doesn't support IP_DONTFRAGMENT and IPV6_DONTFRAG socket options,
returning WSAEOPNOTSUPP. Allow these to fail gracefully with a warning
instead of failing socket creation entirely.
* fmt
* fix: only query IPV6_V6ONLY on IPv6 sockets
On Wine, calling getsockopt with IPPROTO_IPV6 on an IPv4 socket
returns WSAEOPNOTSUPP (10045). Only query IPV6_V6ONLY when the
socket is actually IPv6.
* fix: detect wine in tests
* fixup: feature enabling
* fixup: types
* fix(udp): properly track may_fragment
* fixup: add comment