naive: Fix receive window options not published

This commit is contained in:
世界
2026-08-30 17:41:46 +08:00
parent 080f1c56aa
commit 37da1712e0
3 changed files with 58 additions and 16 deletions
+20
View File
@@ -17,9 +17,11 @@ icon: material/new-box
"password": "password",
"insecure_concurrency": 0,
"extra_headers": {},
"stream_receive_window": "",
"udp_over_tcp": false | {},
"quic": false,
"quic_congestion_control": "",
"quic_session_receive_window": "",
"tls": {},
... // Dial Fields
@@ -78,6 +80,14 @@ Number of concurrent tunnel connections. Multiple connections make the tunneling
Extra headers to send in HTTP requests.
#### stream_receive_window
The flow control window.
When `quic` is enabled, it sets the initial QUIC stream receive window, and `6 MB` is used by default.
Otherwise, it sets the HTTP/2 session receive window, the stream receive window is set to half of it, and `4 MB` is used by default on iOS, `128 MB` on other platforms.
#### udp_over_tcp
UDP over TCP protocol settings.
@@ -101,6 +111,16 @@ QUIC congestion control algorithm.
`bbr` is used by default (the default of QUICHE, used by Chromium which NaiveProxy is based on).
#### quic_session_receive_window
!!! note ""
Only used when `quic` is enabled.
The initial QUIC session receive window.
`15 MB` is used by default.
#### tls
==Required==
+20
View File
@@ -17,9 +17,11 @@ icon: material/new-box
"password": "password",
"insecure_concurrency": 0,
"extra_headers": {},
"stream_receive_window": "",
"udp_over_tcp": false | {},
"quic": false,
"quic_congestion_control": "",
"quic_session_receive_window": "",
"tls": {},
... // 拨号字段
@@ -78,6 +80,14 @@ icon: material/new-box
HTTP 请求中发送的额外头部。
#### stream_receive_window
流量控制窗口。
`quic` 启用时,它设置 QUIC 初始流接收窗口,默认使用 `6 MB`
否则,它设置 HTTP/2 会话接收窗口,流接收窗口被设置为它的一半,在 iOS 上默认使用 `4 MB`,在其他平台上默认使用 `128 MB`
#### udp_over_tcp
UDP over TCP 配置。
@@ -101,6 +111,16 @@ QUIC 拥塞控制算法。
默认使用 `bbr`NaiveProxy 基于的 Chromium 使用的 QUICHE 的默认值)。
#### quic_session_receive_window
!!! note ""
仅在 `quic` 启用时使用。
QUIC 初始会话接收窗口。
默认使用 `15 MB`
#### tls
==必填==
+18 -16
View File
@@ -176,22 +176,24 @@ func NewOutbound(ctx context.Context, router adapter.Router, logger log.ContextL
return nil, E.New("unknown quic congestion control: ", options.QUICCongestionControl)
}
client, err := cronet.NewNaiveClient(cronet.NaiveClientOptions{
Context: ctx,
Logger: logger,
ServerAddress: serverAddress,
ServerName: serverName,
Username: options.Username,
Password: options.Password,
InsecureConcurrency: options.InsecureConcurrency,
ExtraHeaders: extraHeaders,
TrustedRootCertificates: trustedRootCertificates,
Dialer: outboundDialer,
DNSResolver: dnsResolver,
ECHEnabled: echEnabled,
ECHConfigList: echConfigList,
ECHQueryServerName: echQueryServerName,
QUIC: options.QUIC,
QUICCongestionControl: quicCongestionControl,
Context: ctx,
Logger: logger,
ServerAddress: serverAddress,
ServerName: serverName,
Username: options.Username,
Password: options.Password,
InsecureConcurrency: options.InsecureConcurrency,
ExtraHeaders: extraHeaders,
ReceiveWindow: options.ReceiveWindow.Value(),
TrustedRootCertificates: trustedRootCertificates,
Dialer: outboundDialer,
DNSResolver: dnsResolver,
ECHEnabled: echEnabled,
ECHConfigList: echConfigList,
ECHQueryServerName: echQueryServerName,
QUIC: options.QUIC,
QUICCongestionControl: quicCongestionControl,
QUICSessionReceiveWindow: options.QUICSessionReceiveWindow.Value(),
})
if err != nil {
return nil, err