Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
107 changes: 62 additions & 45 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,4 @@ needless_collect = "deny"
[patch.crates-io]
rustls = { git = "https://github.com/Watfaq/rustls.git", branch = "watfaq/0.23.40" }
tokio-rustls = { git = "https://github.com/Watfaq/tokio-rustls.git", branch = "watfaq/0.26.4" }

2 changes: 1 addition & 1 deletion clash-lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ tor-rtcompat = { version = "0.42", optional = true, default-features = false, fe


# tuic
tuic-core= { branch = "build/tuic", optional = true, git = "https://github.com/Itsusinn/tuic.git", features = ["async_marshal", "marshal", "model"] }
tuic-core= { tag = "v1.8.4", optional = true, git = "https://github.com/Itsusinn/tuic.git", features = ["async_marshal", "marshal", "model"] }
register-count = { version = "0.1", optional = true }

quinn = { version = "0.11", default-features = false, features = ["futures-io", "runtime-tokio"] }
Expand Down
3 changes: 3 additions & 0 deletions clash-lib/src/proxy/tuic/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ use tracing::debug;
use tuic_core::quinn::{
ClientConfig as QuinnConfig, Endpoint as QuinnEndpoint, EndpointConfig,
TokioRuntime, TransportConfig as QuinnTransportConfig, VarInt,
bbr::BbrConfig,
congestion::{Bbr3Config, CubicConfig, NewRenoConfig},
crypto::rustls::QuicClientConfig,
Comment thread
coderabbitai[bot] marked this conversation as resolved.
};
Expand Down Expand Up @@ -235,6 +236,8 @@ impl Handler {
CongestionControl::NewReno => transport_config
.congestion_controller_factory(Arc::new(NewRenoConfig::default())),
CongestionControl::Bbr => transport_config
.congestion_controller_factory(Arc::new(BbrConfig::default())),
CongestionControl::Bbr3 => transport_config
.congestion_controller_factory(Arc::new(Bbr3Config::default())),
};

Expand Down
3 changes: 3 additions & 0 deletions clash-lib/src/proxy/tuic/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ pub enum CongestionControl {
NewReno,
#[default]
Bbr,
Bbr3,
}
impl From<&str> for CongestionControl {
#[inline]
Expand All @@ -275,6 +276,8 @@ impl From<&str> for CongestionControl {
Self::NewReno
} else if s.eq_ignore_ascii_case("bbr") {
Self::Bbr
} else if s.eq_ignore_ascii_case("bbr3") {
Self::Bbr3
} else {
tracing::warn!(
"Unknown congestion controller {s}. Use default controller"
Expand Down
Loading