Skip to content
This repository has been archived by the owner on Mar 15, 2024. It is now read-only.

Commit

Permalink
qtun cli add conn_win , stream_win ops
Browse files Browse the repository at this point in the history
  • Loading branch information
yayanyang committed Feb 20, 2024
1 parent bf33b41 commit f01b675
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions crates/rproxy/qtun/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,14 @@ pub struct QuicTunnelConfig {
#[arg(long, default_value_t = 200)]
pub max_conns: usize,

/// Sets the maximum size of the connection window.
#[arg(long, default_value_t = 1024 * 1024 * 24)]
pub max_conn_win: u64,

/// Sets the maximum size of the stream window.
#[arg(long, default_value_t = 1024 * 1024 * 16)]
pub max_stream_win: u64,

/// The interval at which reverse proxy statistics are printed,
/// setting this value to `0s` stops the printing of statistics.
#[arg(long, value_parser = clap_parse_duration, default_value="1m")]
Expand Down Expand Up @@ -181,6 +189,8 @@ fn make_config(quic_tunn_config: &QuicTunnelConfig) -> Config {
config.set_initial_max_streams_uni(quic_tunn_config.mux);
config.set_disable_active_migration(false);
config.set_cc_algorithm(quic_tunn_config.cc.clone().into());
config.set_max_connection_window(quic_tunn_config.max_conn_win);
config.set_max_stream_window(quic_tunn_config.max_stream_win);

config
}
Expand Down

0 comments on commit f01b675

Please sign in to comment.