add frame types
transport parameter encoding and decoding - to my best understanding
fix typo
add some utility functions
add initial observed address frames
add frame encoding and decoding
adjust stats
minimal debugging for received observed addr
simplify setting extension in transport parameter
rework frame structure and send observed addr frames with path challenge ones
tweak example to start testing
fix encoding, send with handshake
clippy
fix docs
reject observed addr frames when not negotiated
replace request_id with seq_no according to new spec
replace code point for transport parameter
replace code point for frames
remove sending observed address frame in handshake in server side
treat as probing frame in payload processing
ack is already managed by is_ack_eliciting
send with path_response as well
add frame to retransmits and ignore old frames
send observed addr at least once per path
fmt
reword comment
remove trailing whites
keep observed address reports per path
remove addressed TODO
small improvement in readability
add retransmission with fresh info
retransmit just once
fix should send logic
add observed addr event
surface the info
restore trace level of frames
some extra logs
rename roles and var
improve error msg
assuming the default as disabled is ok, remove comment
use safe arithmetic with varints for the seq_no
move transport param code to method instead of From impl
fix example, finally
remove excesive log
add helper fn
carry old report into new path
generate notification only on changed values
downgrade log
add sending test
add resumption test on the acceptance case
add resumption test on the rejection case
spelling
actual spelling and undo debug change
dumb lints
some spelling and formatting
add retransmission test
make a bit more readable
update hexas
make naming consistent, add test
check docs for consistency
This commit adds a new --connection-limit option to the server example
to illustrate how a user could implement a limit to the number of
connections open at a time with the new "incoming" API and
Endpoint::open_connections method rather than with the now-removed
concurrent_connections ServerConfig parameter.
This commit adds a new --block option to the server example to
illustate in a simplified way the general structure one would use to
implement IP address blocking with the new accept/reject/retry API.
For example:
cargo run --example server ./ --listen 127.0.0.1:4433 --stateless-retry --block 127.0.0.1:8065
cargo run --example client https://127.0.0.1:4433/Cargo.toml --host localhost --bind 127.0.0.1:8065
One thing to note is that that example places the reject condition
before the retry condition. This expends slightly less effort rejecting
connections, but does create a blocked IP address oracle for an attacker
who can do address spoofing.
This commit removes use_retry from the server config and provides a
public API for the user to manually accept/refuse/retry incoming
connections before a handshake begins, and inspect properties such as
an incoming connection's remote address and whether that address is
validated when doing so.
In quinn-proto, Incoming is made public, as well as Endpoint's accept/
refuse/retry methods which operate on it. The
DatagramEvent::NewConnection event is modified to return an incoming
but not yet accepted connection.
In quinn, awaiting Endpoint::accept now yields a new
quinn::Incoming type, rather than quinn::Connecting. The new
quinn::Incoming type has all the methods its quinn_proto equivalent has,
as well as an accept method to (fallibly) transition it into a
Connecting, and also refuse, retry, and ignore methods.
Furthermore, quinn::Incoming implements IntoFuture with the output type
Result<Connection, ConnectionError>>, which is the same as the Future
output type of Connecting. This lets server code which was
straightforwardly awaiting the result of quinn::Endpoint::accept work
with little to no modification.
The test accept_after_close was removed because the functionality it
was testing for no longer exists.
Currently, when trying to run the client example with an IPV6 address
URL, such as by running:
cargo run --example client https://[::1]:4433/Cargo.toml --host localhost
A "failed to lookup address information: Name or service not known"
error is raised. This is because `url.host_str()` is `"[::1]"`, which
is wrapped in brackets. These brackets, specified by by RFC 2732, are
part of the URL syntax, not the IP address syntax.
Although this code succeeds, because the standard library treats this
like a URL:
use std::net::ToSocketAddrs;
"[::1]:4433".to_socket_addrs()
This code does not:
use std::net::Ipv6Addr;
"[::1]".parse::<Ipv6Addr>()
As the stdlib expects to just receive "::1". Consequentially, this
does not succeed, counterintuitively:
use std::net::ToSocketAddrs;
("[::1]", 4433).to_socket_addrs()
This code fixes the client example's URL parsing behavior by
stripping out such brackets in the same way as [is done in
tokio-tungstenite][1].
[1]: https://github.com/snapview/tokio-tungstenite/blob/052d085aff4708b924b92becaa83923b15045841/src/lib.rs#L404