Fix: no_gviosr tags

This commit is contained in:
metacubex 2022-08-12 12:53:11 +08:00
parent 02933ae568
commit dfeb901417
2 changed files with 7 additions and 5 deletions

View File

@ -1,5 +1,3 @@
//go:build !no_gvisor
package option
import (
@ -11,6 +9,8 @@ import (
"gvisor.dev/gvisor/pkg/tcpip/network/ipv6"
"gvisor.dev/gvisor/pkg/tcpip/stack"
"gvisor.dev/gvisor/pkg/tcpip/transport/tcp"
"github.com/Dreamacro/clash/common/pool"
)
const (
@ -52,15 +52,15 @@ const (
tcpMinBufferSize = tcp.MinBufferSize
// tcpMaxBufferSize is the maximum permitted size of a send/recv buffer.
tcpMaxBufferSize = tcp.MaxBufferSize
tcpMaxBufferSize = pool.RelayBufferSize
// tcpDefaultBufferSize is the default size of the send buffer for
// a transport endpoint.
tcpDefaultSendBufferSize = tcp.DefaultSendBufferSize
tcpDefaultSendBufferSize = pool.RelayBufferSize
// tcpDefaultReceiveBufferSize is the default size of the receive buffer
// for a transport endpoint.
tcpDefaultReceiveBufferSize = tcp.DefaultReceiveBufferSize
tcpDefaultReceiveBufferSize = pool.RelayBufferSize
)
type Option func(*stack.Stack) error

View File

@ -1,3 +1,5 @@
//go:build !no_gvisor
package gvisor
import (