Skip to content

Commit

Permalink
Merge pull request #183 from Tencent/release/v0.8.0
Browse files Browse the repository at this point in the history
Release/v0.8.0
  • Loading branch information
iyangsj committed Mar 15, 2024
2 parents 0505207 + 0b6a91f commit c3120ce
Show file tree
Hide file tree
Showing 19 changed files with 476 additions and 93 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/tquic-goodput.yml
Expand Up @@ -19,6 +19,9 @@ jobs:
case: [goodput100k,goodput1m,goodput10m]
cc: [cubic, bbr]

# The scheduled workflow only runs for the main repository.
# You can manually trigger it if necessary.
if: ${{ ( github.event_name == 'schedule' && github.repository == 'tencent/tquic' ) || github.event_name == 'workflow_dispatch' }}
steps:
- name: Install quic-interop-runner
run: |
Expand Down
15 changes: 12 additions & 3 deletions .github/workflows/tquic-interop-all.yml
Expand Up @@ -78,6 +78,9 @@ jobs:
- server: haproxy
client: tquic

# The scheduled workflow only runs for the main repository.
# You can manually trigger it if necessary.
if: ${{ ( github.event_name == 'schedule' && github.repository == 'tencent/tquic' ) || github.event_name == 'workflow_dispatch' }}
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -101,13 +104,19 @@ jobs:
- name: Run the interop tests
run: |
cd quic-interop-runner
python3 run.py -s ${{ matrix.server }} -c ${{ matrix.client }} -t handshake,handshakeloss,handshakecorruption,retry,resumption,zerortt,http3,ipv6,transfer,multiplexing,longrtt,blackhole,transferloss,transfercorruption,goodput,crosstraffic -d -r tquic=tquic_interop:v1 -l ${{ matrix.client }}-${{ matrix.server }}-logs
python3 run.py -s ${{ matrix.server }} -c ${{ matrix.client }} -t handshake,handshakeloss,handshakecorruption,retry,resumption,zerortt,amplificationlimit,http3,ipv6,transfer,multiplexing,longrtt,blackhole,transferloss,transfercorruption,goodput,crosstraffic -d -r tquic=tquic_interop:v1 -l ${{ matrix.server }}-${{ matrix.client }}-logs -j ${{ matrix.server }}-${{ matrix.client }}-logs/interop.json
- name: Store run logs
- name: Dump the interop result
if: ${{ always() }}
run: |
cd quic-interop-runner
python3 -m json.tool ${{ matrix.server }}-${{ matrix.client }}-logs/interop.json
- name: Store interop logs
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.client }}-${{ matrix.server }}
name: ${{ matrix.server }}-${{ matrix.client }}
path: |
quic-interop-runner/*logs/*
!quic-interop-runner/*logs/**/crosstraffic/
Expand Down
Expand Up @@ -18,13 +18,17 @@ jobs:
strategy:
fail-fast: false
matrix:
server: [tquic]
client: [tquic]
include:
- server: tquic
client: tquic
- server: tquic
client: lsquic
- server: lsquic
client: tquic
- server: tquic
client: ngtcp2
- server: ngtcp2
client: tquic

steps:
- uses: actions/checkout@v4
Expand All @@ -49,13 +53,19 @@ jobs:
- name: Run the interop tests
run: |
cd quic-interop-runner
python3 run.py -s ${{ matrix.server }} -c ${{ matrix.client }} -t handshake,handshakeloss,handshakecorruption,retry,resumption,zerortt,http3,ipv6,transfer,multiplexing,longrtt,blackhole,transferloss,transfercorruption,goodput,crosstraffic -d -r tquic=tquic_interop:v1 -l ${{ matrix.client }}-${{ matrix.server }}-logs
python3 run.py -s ${{ matrix.server }} -c ${{ matrix.client }} -t handshake,handshakeloss,handshakecorruption,retry,resumption,zerortt,amplificationlimit,http3,ipv6,transfer,multiplexing,longrtt,blackhole,transferloss,transfercorruption,goodput,crosstraffic -d -r tquic=tquic_interop:v1 -l ${{ matrix.server }}-${{ matrix.client }}-logs -j ${{ matrix.server }}-${{ matrix.client }}-logs/interop.json
- name: Dump the interop result
if: ${{ always() }}
run: |
cd quic-interop-runner
python3 -m json.tool ${{ matrix.server }}-${{ matrix.client }}-logs/interop.json
- name: Store run logs
- name: Store interop logs
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.client }}-${{ matrix.server }}
name: ${{ matrix.server }}-${{ matrix.client }}
path: |
quic-interop-runner/*logs/*
!quic-interop-runner/*logs/**/crosstraffic/
Expand Down
15 changes: 15 additions & 0 deletions CHANGELOG.md
Expand Up @@ -11,6 +11,21 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).


## [v0.8.0] - 2024-03-15

### Added

- Support anti-amplification limit for server
- Support customized config when initiating a connection
- Add callback based FFI for writing the keylog and qlog
- Support compiling dynamic library for C language
- Update the processing of LossDetection timeout in multipath mode
- Update crate docs about PathStats/TlsConfig/TlsConfigSelector

### Security
- Discard old Path Challenges received if needed


## [v0.7.0] - 2024-02-02

### Added
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "tquic"
version = "0.7.0"
version = "0.8.0"
edition = "2021"
rust-version = "1.70.0"
license = "Apache-2.0"
Expand Down Expand Up @@ -65,7 +65,7 @@ timer_heap = "0.3.0"
cmake = "0.1"

[lib]
crate-type = ["lib", "staticlib"]
crate-type = ["lib", "staticlib", "cdylib"]

[workspace]
members = ["tools"]
Expand Down
50 changes: 41 additions & 9 deletions include/tquic.h
Expand Up @@ -443,41 +443,48 @@ void quic_config_set_max_concurrent_conns(struct quic_config_t *config, uint32_t
/**
* Set the key for reset token generation. The token_key_len should be not less
* than 64.
* Applicable to Server only.
*/
int quic_config_set_reset_token_key(struct quic_config_t *config,
const uint8_t *token_key,
size_t token_key_len);

/**
* Set whether stateless reset is allowed.
*/
void quic_config_enable_stateless_reset(struct quic_config_t *config, bool enabled);

/**
* Set the lifetime of address token.
* Applicable to Server only.
*/
void quic_config_set_address_token_lifetime(struct quic_config_t *config, uint64_t seconds);

/**
* Set the key for address token generation.
* Set the key for address token generation. It also enables retry.
* The token_key_len should be a multiple of 16.
* Applicable to Server only.
*/
int quic_config_set_address_token_key(struct quic_config_t *config,
const uint8_t *token_keys,
size_t token_keys_len);

/**
* Set whether stateless retry is allowed. Default is not allowed.
* Applicable to Server only.
*/
void quic_config_enable_retry(struct quic_config_t *config, bool enabled);

/**
* Set whether stateless reset is allowed.
* Applicable to Endpoint only.
*/
void quic_config_enable_stateless_reset(struct quic_config_t *config, bool enabled);

/**
* Set the length of source cid. The length should not be greater than 20.
* Applicable to Endpoint only.
*/
void quic_config_set_cid_len(struct quic_config_t *config, uint8_t v);

/**
* Set the batch size for sending packets.
* Applicable to Endpoint only.
*/
void quic_config_set_send_batch_size(struct quic_config_t *config, uint16_t v);

Expand Down Expand Up @@ -519,6 +526,7 @@ void quic_endpoint_free(struct quic_endpoint_t *endpoint);
/**
* Create a client connection.
* If success, the output parameter `index` carrys the index of the connection.
* Note: The `config` specific to the endpoint or server is irrelevant and will be disregarded.
*/
int quic_endpoint_connect(struct quic_endpoint_t *endpoint,
const struct sockaddr *local,
Expand All @@ -530,6 +538,7 @@ int quic_endpoint_connect(struct quic_endpoint_t *endpoint,
size_t session_len,
const uint8_t *token,
size_t token_len,
const struct quic_config_t *config,
uint64_t *index);

/**
Expand Down Expand Up @@ -724,12 +733,33 @@ void quic_conn_set_context(struct quic_conn_t *conn, void *data);
void *quic_conn_context(struct quic_conn_t *conn);

/**
* Set keylog file
* Set the callback of keylog output.
* `cb` is a callback function that will be called for each keylog.
* `data` is a keylog message and `argp` is user-defined data that will be passed to the callback.
*/
void quic_conn_set_keylog(struct quic_conn_t *conn, void (*cb)(const uint8_t *data,
size_t data_len,
void *argp), void *argp);

/**
* Set keylog file.
*/
void quic_conn_set_keylog_fd(struct quic_conn_t *conn, int fd);

/**
* Set qlog file
* Set the callback of qlog output.
* `cb` is a callback function that will be called for each qlog.
* `data` is a qlog message and `argp` is user-defined data that will be passed to the callback.
* `title` and `desc` respectively refer to the "title" and "description" sections of qlog.
*/
void quic_conn_set_qlog(struct quic_conn_t *conn,
void (*cb)(const uint8_t *data, size_t data_len, void *argp),
void *argp,
const char *title,
const char *desc);

/**
* Set qlog file.
*/
void quic_conn_set_qlog_fd(struct quic_conn_t *conn, int fd, const char *title, const char *desc);

Expand Down Expand Up @@ -1013,7 +1043,9 @@ typedef enum quic_log_level {
* the callback.
* `level` represents the log level.
*/
void quic_set_logger(void (*cb)(const uint8_t *line, void *argp), void *argp, quic_log_level level);
void quic_set_logger(void (*cb)(const uint8_t *data, size_t data_len, void *argp),
void *argp,
quic_log_level level);

typedef enum http3_error {
HTTP3_NO_ERROR = 0,
Expand Down
2 changes: 1 addition & 1 deletion src/congestion_control/congestion_control.rs
Expand Up @@ -40,7 +40,7 @@ pub use hystart_plus_plus::HystartPlusPlus;
pub enum CongestionControlAlgorithm {
/// CUBIC uses a cubic function instead of a linear window increase function
/// of the current TCP standards to improve scalability and stability under
/// fast and long-distance networks..
/// fast and long-distance networks.
Cubic,

/// BBR uses recent measurements of a transport connection's delivery rate,
Expand Down

0 comments on commit c3120ce

Please sign in to comment.