Commit Graph

35 Commits

Author SHA1 Message Date
Marten Seemann
24be84cd00 introduce separate tracing calls for sent long and short header packets 2023-01-17 21:53:37 +13:00
Marten Seemann
9e5f92b561 return a coalesced packet when packing a probe packet
The coalesced packet will only consist of a single packet, but this will
make the refactoring easier.
2023-01-17 21:53:04 +13:00
Marten Seemann
b52d34008f add Allow0RTT opt in the quic.Config to control 0-RTT on the server side (#3635) 2023-01-04 16:18:11 -08:00
Marco Munizaga
f2d3cb8f43 expose the QUIC version of a connection (#3620)
* Expose the QUIC version of a connection via connection state

* Update interface.go

Co-authored-by: Marten Seemann <martenseemann@gmail.com>

* Finish rename

* gofmt

* Use public type for version number

Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2022-11-15 14:59:49 -08:00
Toby
5fe9f9bd89 chore: fix multiple typos in comments (#3612)
* chore: fix multiple typos I run into

* Update conn_id_generator_test.go

Co-authored-by: Marten Seemann <martenseemann@gmail.com>

* Update internal/ackhandler/sent_packet_handler_test.go

Co-authored-by: Marten Seemann <martenseemann@gmail.com>

Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2022-11-06 10:59:16 -08:00
Marten Seemann
ee013d9d23 use a monotonous timer for the connection (#3570)
There's no point in having the timer fire multiple times for the same
timestamp. By using a monotonuos timer we avoid busy-looping in cases where the
timer fires, but we can't actually send a packet.
2022-10-11 05:36:10 -07:00
Marten Seemann
fe277dc663 log the size of buffered packets (#3571) 2022-10-11 02:27:26 -07:00
Marten Seemann
1f6a9ecafd use a Peek / Pop API for the datagram queue (#3582) 2022-10-11 02:25:17 -07:00
Marten Seemann
2b54aeac2d Merge pull request #3545 from lucas-clemente/simplify-ack-only-packing
simplify packing of ACK-only packets
2022-09-09 14:00:07 +03:00
Marten Seemann
d1d9f49ed4 Merge pull request #3547 from lucas-clemente/pool-ack-frames
use a sync.Pool for ACK frames
2022-09-09 11:56:15 +03:00
Marten Seemann
818768df38 remove the MaybePackAckPacket from the packet packer 2022-09-09 11:39:25 +03:00
Marten Seemann
c57ea6f276 prioritize sending ACKs over sending new DATAGRAM frames (#3544) 2022-09-09 01:38:38 -07:00
Marten Seemann
63764c429c use a sync.Pool for ACK frames 2022-09-06 14:41:13 +03:00
Marten Seemann
dfd35cb071 use a single bytes.Reader for frame parsing (#3536) 2022-09-01 01:06:50 -07:00
Marten Seemann
656f3d2d7d remove the wire.ShortHeader in favor of more return values (#3535) 2022-08-30 04:37:36 -07:00
Marten Seemann
4f3d3b36ac introduce a separate code path for unpacking short header packets 2022-08-29 15:55:37 +03:00
Marten Seemann
ed15a94703 split the tracing function for received short and long header packets 2022-08-29 15:32:27 +03:00
Marten Seemann
e3723a0ef1 move the check for empty payload to the unpacker 2022-08-29 13:11:58 +03:00
Marten Seemann
fd1b3a23c4 remove unneeded packet number field from the unpackedPacket 2022-08-29 13:11:57 +03:00
Marten Seemann
7d827d515e don't pass the header to connection.tryQueueingUndecryptablePacket 2022-08-29 13:11:16 +03:00
Marten Seemann
4cbb4f8114 remove ConnectionID.Equal function
Connection IDs can now be compared with ==.
2022-08-29 11:30:32 +03:00
Marten Seemann
1aced95d41 use an array instead of a byte slice for Connection IDs 2022-08-29 11:30:31 +03:00
Marten Seemann
9e0f9e62ff parse arbitrary length Connection IDs in Version Negotiation packets 2022-08-29 10:58:33 +03:00
Marten Seemann
53412e9ba3 trace arbitrary length Connection IDs for Version Negotiation packets 2022-08-29 10:58:33 +03:00
João Oliveirinha
66f6fe0b71 add support for providing a custom Connection ID generator via Config (#3452)
* Add support for providing a custom ConnectionID generator via Config

This work makes it possible for servers or clients to control how
ConnectionIDs are generated, which in turn will force peers in the
connection to use those ConnectionIDs as destination connection IDs  when sending packets.

This is useful for scenarios where we want to perform some kind
selection on the QUIC packets at the L4 level.

* add more doc

* refactor populate config to not use provided config

* add an integration test for custom connection ID generators

* fix linter warnings

Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2022-08-24 04:06:16 -07:00
KevinZønda
a90135751b fix datagram support detection (#3511)
* fix: datagram support detection

- treat zero MaxDatagramFrameSize as unsupported.
- avoid send corresponding transport parameters when support is disabled
- report error when calling Send/ReceiveMessage and support is disabled

see https://github.com/lucas-clemente/quic-go/issues/3505

* patch: always initiate datagram

* fix: remove useless nil check
2022-08-22 03:02:40 -07:00
Marten Seemann
b659414495 use a single Go routine to send copies of CONNECTION_CLOSE packets 2022-08-21 15:41:47 +03:00
Marten Seemann
c3ab9c4ea9 replace all connection IDs at the same time when connection is closed 2022-08-21 14:09:49 +03:00
Benedikt Spies
7da024da5a Disable anti-amplification limit by address validation token (#3326) 2022-08-20 08:02:17 -07:00
Marten Seemann
7fde609eef make sure RunHandshake has returned before closing, improve MITM tests 2022-08-13 17:42:45 +03:00
Marten Seemann
43bde14cf7 implement generic Min and Max functions 2022-08-10 14:59:05 +02:00
Nuno Diegues
4c96cf75bf make the keep alive interval configurable (#3444)
* Make keep alive configurable

* Fix unit tests
2022-06-09 08:31:37 -07:00
Marten Seemann
53be3ee500 don't send CONNECTION_CLOSE if error occurred before sending anything 2022-05-20 12:27:00 +02:00
Marten Seemann
2e98150cd4 don't send path MTU probe packets on a timer (#3423) 2022-05-20 03:10:39 -07:00
Marten Seemann
4b17343631 rename the session to connection 2022-03-27 12:50:14 +01:00