From bb80689ba4b480f70f6bc75fd99130e40f2f4b31 Mon Sep 17 00:00:00 2001 From: wwqgtxx Date: Sat, 8 Aug 2026 15:18:23 +0800 Subject: [PATCH] feat: support bbr3 for mipstack --- adapter/outbound/wireguard.go | 4 ++-- docs/config.yaml | 10 +++++----- go.mod | 2 +- go.sum | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/adapter/outbound/wireguard.go b/adapter/outbound/wireguard.go index aace86f1..90dff1c8 100644 --- a/adapter/outbound/wireguard.go +++ b/adapter/outbound/wireguard.go @@ -162,10 +162,10 @@ func (o IPStackOption) validate() error { return fmt.Errorf("invalid IP stack mode %q; expected auto, gvisor, or mips", o.Mode) } switch mipstack.CongestionControl(o.CongestionController) { - case "", mipstack.CongestionControlCUBIC, mipstack.CongestionControlReno, mipstack.CongestionControlBBR: + case "", mipstack.CongestionControlCUBIC, mipstack.CongestionControlReno, mipstack.CongestionControlBBR, mipstack.CongestionControlBBR3: return nil default: - return fmt.Errorf("invalid IP stack congestion controller %q; expected cubic, reno, or bbr", o.CongestionController) + return fmt.Errorf("invalid IP stack congestion controller %q; expected cubic, reno, bbr, or bbr3", o.CongestionController) } } diff --git a/docs/config.yaml b/docs/config.yaml index b23a35f2..58e94139 100644 --- a/docs/config.yaml +++ b/docs/config.yaml @@ -1294,7 +1294,7 @@ proxies: # socks5 # persistent-keepalive: 0 # ip-stack: # mode: auto # options: auto, gvisor, mips; auto uses gVisor when compiled in and mihomo IP stack (MIPS) otherwise - # congestion-controller: cubic # TCP congestion controller: cubic, reno, or bbr; ignored by gVisor + # congestion-controller: cubic # TCP congestion controller: cubic, reno, bbr, or bbr3; ignored by gVisor # 一个出站代理的标识。当值不为空时,将使用指定的 proxy 发出连接 # dialer-proxy: "ss1" # remote-dns-resolve: true # 强制 dns 远程解析,默认值为 false @@ -1370,7 +1370,7 @@ proxies: # socks5 # physical-mtu: 1432 # optional ZeroTier UDP payload MTU (510-10324; default 1432) # ip-stack: # mode: auto # options: auto, gvisor, mips; auto uses gVisor when compiled in and mihomo IP stack (MIPS) otherwise - # congestion-controller: cubic # TCP congestion controller: cubic, reno, or bbr; ignored by gVisor + # congestion-controller: cubic # TCP congestion controller: cubic, reno, bbr, or bbr3; ignored by gVisor # primary-port: 0 # primary UDP port; 0 selects an available port # secondary-port: 0 # second UDP port; 0 selects an available port, -1 disables it # tcp-fallback-mode: auto # auto uses relay after UDP failure; force uses relay only; disable turns relay off @@ -1448,7 +1448,7 @@ proxies: # socks5 udp: true # ip-stack: # mode: auto # options: auto, gvisor, mips; auto uses gVisor when compiled in and mihomo IP stack (MIPS) otherwise - # congestion-controller: cubic # TCP congestion controller: cubic, reno, or bbr; ignored by gVisor + # congestion-controller: cubic # TCP congestion controller: cubic, reno, bbr, or bbr3; ignored by gVisor # 一个出站代理的标识。当值不为空时,将使用指定的 proxy 发出连接 # dialer-proxy: "ss1" # remote-dns-resolve: true # 强制 dns 远程解析,默认值为 false @@ -1467,7 +1467,7 @@ proxies: # socks5 udp: true # ip-stack: # mode: auto # options: auto, gvisor, mips; auto uses gVisor when compiled in and mihomo IP stack (MIPS) otherwise - # congestion-controller: cubic # TCP congestion controller: cubic, reno, or bbr; ignored by gVisor + # congestion-controller: cubic # TCP congestion controller: cubic, reno, bbr, or bbr3; ignored by gVisor # 一个出站代理的标识。当值不为空时,将使用指定的 proxy 发出连接 # dialer-proxy: "ss1" # remote-dns-resolve: true # 强制 dns 远程解析,默认值为 false @@ -1505,7 +1505,7 @@ proxies: # socks5 network: h2 # ip-stack: # mode: auto # options: auto, gvisor, mips; auto uses gVisor when compiled in and mihomo IP stack (MIPS) otherwise - # congestion-controller: cubic # TCP congestion controller: cubic, reno, or bbr; ignored by gVisor + # congestion-controller: cubic # TCP congestion controller: cubic, reno, bbr, or bbr3; ignored by gVisor # 一个出站代理的标识。当值不为空时,将使用指定的 proxy 发出连接 # dialer-proxy: "ss1" # remote-dns-resolve: true # 强制 dns 远程解析,默认值为 false diff --git a/go.mod b/go.mod index 2add6939..e4037819 100644 --- a/go.mod +++ b/go.mod @@ -27,7 +27,7 @@ require ( github.com/metacubex/jls-tls v0.0.0-20260723084315-67adc0e2f796 github.com/metacubex/kcp-go v0.0.0-20260105040817-550693377604 github.com/metacubex/mhurl v0.1.0 - github.com/metacubex/mipstack v0.0.0-20260807061409-f72adac977ea + github.com/metacubex/mipstack v0.0.0-20260808050503-d7b2821f2a69 github.com/metacubex/mlkem v0.1.0 github.com/metacubex/quic-go v0.61.1-0.20260727080200-2548683b76f4 github.com/metacubex/randv2 v0.2.0 diff --git a/go.sum b/go.sum index 14edd4fc..57cafcd6 100644 --- a/go.sum +++ b/go.sum @@ -134,8 +134,8 @@ github.com/metacubex/kcp-go v0.0.0-20260105040817-550693377604 h1:hJwCVlE3ojViC3 github.com/metacubex/kcp-go v0.0.0-20260105040817-550693377604/go.mod h1:lpmN3m269b3V5jFCWtffqBLS4U3QQoIid9ugtO+OhVc= github.com/metacubex/mhurl v0.1.0 h1:ZdW4Zxe3j3uJ89gNytOazHu6kbHn5owutN/VfXOI8GE= github.com/metacubex/mhurl v0.1.0/go.mod h1:2qpQImCbXoUs6GwJrjuEXKelPyoimsIXr07eNKZdS00= -github.com/metacubex/mipstack v0.0.0-20260807061409-f72adac977ea h1:nvuF/ISUMkI63X08jvUrkccy58AyC9/MfVsDKIotVQw= -github.com/metacubex/mipstack v0.0.0-20260807061409-f72adac977ea/go.mod h1:+bbwALZI0pbi2auSG5A3ptdpV2DZ2eLObziXo+P7oj0= +github.com/metacubex/mipstack v0.0.0-20260808050503-d7b2821f2a69 h1:nTdw7ctE2E7EYgdJ3n6WpWLjGMzfIUnNwU6w5n2pMwk= +github.com/metacubex/mipstack v0.0.0-20260808050503-d7b2821f2a69/go.mod h1:+bbwALZI0pbi2auSG5A3ptdpV2DZ2eLObziXo+P7oj0= github.com/metacubex/mlkem v0.1.0 h1:wFClitonSFcmipzzQvax75beLQU+D7JuC+VK1RzSL8I= github.com/metacubex/mlkem v0.1.0/go.mod h1:amhaXZVeYNShuy9BILcR7P0gbeo/QLZsnqCdL8U2PDQ= github.com/metacubex/nftables v0.0.0-20260426003805-208c2c1ba2cb h1:wk6mHYPURSUvWcUv72gNP79oiylFsscBSDPJ6ieV6Iw=