summaryrefslogtreecommitdiffhomepage
path: root/src (follow)
AgeCommit message (Collapse)AuthorFilesLines
2020-03-24Advertise our max_idle_timeout in transport parameters.Sergey Kandaurov1-0/+6
So we can easily tune how soon client would decide to close a connection.
2020-03-24QUIC streams don't need filter_need_in_memory after 7f0981be07c4.Sergey Kandaurov1-1/+0
Now they inherit c->ssl always enabled from the main connection, which makes r->main_filter_need_in_memory set for them.
2020-03-24Logging cleanup.Vladimir Homutov2-61/+71
+ Client-related errors (i.e. parsing) are done at INFO level + c->log->action is updated through the process of receiving, parsing. handling packet/payload and generating frames/output.
2020-03-24Added QUIC version check for sending HANDSHAKE_DONE frame.Vladimir Homutov1-1/+6
2020-03-24Implemented sending HANDSHAKE_DONE frame after handshake.Vladimir Homutov3-6/+43
This makes it possible to switch to draft 27 by default.
2020-03-23Fixed client certificate verification.Sergey Kandaurov3-0/+7
For ngx_http_process_request() part to work, this required to set both r->http_connection->ssl and c->ssl on a QUIC stream. To avoid damaging global SSL object, ngx_ssl_shutdown() is managed to ignore QUIC streams.
2020-03-23Respect QUIC max_idle_timeout.Roman Arutyunyan4-14/+27
2020-03-23Allow ngx_queue_frame() to insert frame in the front.Roman Arutyunyan1-10/+5
Previously a frame could only be inserted after the first element of the list.
2020-03-23Support for HTTP/3 ALPN.Roman Arutyunyan4-11/+22
This is required by Chrome.
2020-03-23Put zero in 'First ACK Range' when acknowledging one packet.Roman Arutyunyan1-2/+2
This fixes Chrome CONNECTION_ID_LIMIT_ERROR with the reason: "Underflow with first ack block length 2 largest acked is 1".
2020-03-23Avoid using QUIC connection after CONNECTION_CLOSE.Roman Arutyunyan1-4/+3
2020-03-23Better flow control and buffering for QUIC streams.Roman Arutyunyan2-9/+114
2020-03-23Limit output QUIC packets with client max_packet_size.Roman Arutyunyan4-15/+37
Additionally, receive larger packets than 512 bytes.
2020-03-23Fixed received ACK fields order in debug logging.Sergey Kandaurov1-3/+3
2020-03-23Connection states code cleanup.Vladimir Homutov2-16/+37
+ ngx_quic_init_ssl_methods() is no longer there, we setup methods on SSL connection directly. + the handshake_handler is actually a generic quic input handler + updated c->log->action and debug to reflect changes and be more informative + c->quic is always set in ngx_quic_input() + the quic connection state is set by the results of SSL_do_handshake();
2020-03-23Skip unknown transport parameters.Vladimir Homutov1-4/+19
2020-03-23Add unsupported version into log.Vladimir Homutov1-1/+2
This makes it easier to understand what client wants.
2020-03-21Added processing of client transport parameters.Vladimir Homutov3-1/+279
note: + parameters are available in SSL connection since they are obtained by ssl stack quote: During connection establishment, both endpoints make authenticated declarations of their transport parameters. These declarations are made unilaterally by each endpoint. and really, we send our parameters before we read client's. no handling of incoming parameters is made by this patch.
2020-03-22Fixed CRYPTO offset generation.Sergey Kandaurov1-0/+6
2020-03-22Closing connection on NGX_QUIC_FT_CONNECTION_CLOSE.Sergey Kandaurov1-1/+3
2020-03-21Implemented parsing of remaining frame types.Vladimir Homutov2-3/+158
2020-03-21Fixed parsing NGX_QUIC_FT_CONNECTION_CLOSE.Sergey Kandaurov1-3/+5
2020-03-21Fixed buffer overrun in create_transport_params() with -24.Sergey Kandaurov1-1/+1
It writes 16-bit prefix as designed, but length calculation assumed varint.
2020-03-21Fixed build with macOS's long long abomination.Sergey Kandaurov1-1/+3
2020-03-20Removed unused variable.Roman Arutyunyan1-3/+1
2020-03-20Removed unused variable.Vladimir Homutov1-2/+0
2020-03-20Added checks for permitted frame types.Vladimir Homutov4-68/+172
+ cleanup in macros for packet types + some style fixes in quic_transport.h (case, indentation)
2020-03-20Fixed parsing of CONNECTION CLOSE2 frames.Vladimir Homutov1-8/+19
The "frame_type" field is not passed in case of 0x1d frame.
2020-03-20Added parsing of CONNECTION_CLOSE2 frame (0x1D).Vladimir Homutov2-12/+22
The difference is that error code refers to application namespace, i.e. quic error names cannot be used to convert it to string.
2020-03-20Adedd the http "quic" variable.Vladimir Homutov1-1/+52
The value is literal "quic" for requests passed over HTTP/3, and empty string otherwise.
2020-03-20Configurable transport parameters.Vladimir Homutov7-23/+361
- integer parameters can be configured using the following directives: quic_max_idle_timeout quic_max_ack_delay quic_max_packet_size quic_initial_max_data quic_initial_max_stream_data_bidi_local quic_initial_max_stream_data_bidi_remote quic_initial_max_stream_data_uni quic_initial_max_streams_bidi quic_initial_max_streams_uni quic_ack_delay_exponent quic_active_migration quic_active_connection_id_limit - only following parameters are actually sent: active_connection_id_limit initial_max_streams_uni initial_max_streams_bidi initial_max_stream_data_bidi_local initial_max_stream_data_bidi_remote initial_max_stream_data_uni (other parameters are to be added into ngx_quic_create_transport_params() function as needed, should be easy now) - draft 24 and draft 27 are now supported (at compile-time using quic_version macro)
2020-03-19Reset QUIC timeout on every datagram.Roman Arutyunyan1-0/+2
2020-03-20Double MAX_STREAMS on STREAMS_BLOCKED.Roman Arutyunyan3-1/+74
2020-03-20Fixed ACKs to packet numbers greater than 63.Roman Arutyunyan1-2/+5
2020-03-19Fixed specifiers in "quic packet length" logging.Sergey Kandaurov1-2/+2
2020-03-19Fixed build.Sergey Kandaurov1-8/+13
2020-03-19The ngx_quic_frame_len() function is not really needed.Vladimir Homutov3-29/+1
2020-03-19Added boundaries checks into frame parser.Vladimir Homutov3-177/+448
The ngx_quic_parse_frame() functions now has new 'pkt' argument: the packet header of a currently processed frame. This allows to log errors/debug closer to reasons and perform additional checks regarding possible frame types. The handler only performs processing of good frames. A number of functions like read_uint32(), parse_int[_multi] probably should be implemented as a macro, but currently it is better to have them as functions for simpler debugging.
2020-03-19Send a FIN frame when QUIC stream is closed.Roman Arutyunyan1-0/+64
2020-03-19Fixed header creation for header_only responses in HTTP/3.Roman Arutyunyan2-24/+31
2020-03-18MAX_DATA frame parser/handler.Sergey Kandaurov3-0/+21
2020-03-19Added parsing of STREAMS BLOCKED frames.Vladimir Homutov3-1/+27
While there, added hex prefix for debug to avoid frame type confusion.
2020-03-18Implemented send_alert callback, CONNECTION_CLOSE writer.Sergey Kandaurov2-0/+50
The callback produces a CONNECTION_CLOSE frame, as per quic-tls-24#section-4.9.
2020-03-18Added copying addr_text to QUIC stream connections.Roman Arutyunyan1-0/+1
Now $remote_addr holds client address.
2020-03-18HTTP/3 $request_line variable.Roman Arutyunyan2-540/+37
2020-03-18Moved setting QUIC methods to runtime.Roman Arutyunyan5-45/+6
This allows listening to both https and http3 in the same server. Also, the change eliminates the ssl_quic directive.
2020-03-18Added parsing of RESET_STREAM and STOP_SENDING framesVladimir Homutov3-0/+43
2020-03-18Fixed pointer increment while parsing HTTP/3 header.Roman Arutyunyan1-3/+2
2020-03-18Implemented creation of server unidirectional streams.Vladimir Homutov1-59/+108
The ngx_quic_create_stream() function is a generic function extracted from the ngx_quic_handle_stream_frame() function.
2020-03-18Fixed HTTP/3 server stream creation.Roman Arutyunyan1-5/+5