Fix: no_gviosr tags
This commit is contained in:
parent
65d543329e
commit
42c3611715
2 changed files with 7 additions and 5 deletions
|
@ -1,5 +1,3 @@
|
||||||
//go:build !no_gvisor
|
|
||||||
|
|
||||||
package option
|
package option
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
@ -11,6 +9,8 @@ import (
|
||||||
"gvisor.dev/gvisor/pkg/tcpip/network/ipv6"
|
"gvisor.dev/gvisor/pkg/tcpip/network/ipv6"
|
||||||
"gvisor.dev/gvisor/pkg/tcpip/stack"
|
"gvisor.dev/gvisor/pkg/tcpip/stack"
|
||||||
"gvisor.dev/gvisor/pkg/tcpip/transport/tcp"
|
"gvisor.dev/gvisor/pkg/tcpip/transport/tcp"
|
||||||
|
|
||||||
|
"github.com/Dreamacro/clash/common/pool"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -52,15 +52,15 @@ const (
|
||||||
tcpMinBufferSize = tcp.MinBufferSize
|
tcpMinBufferSize = tcp.MinBufferSize
|
||||||
|
|
||||||
// tcpMaxBufferSize is the maximum permitted size of a send/recv buffer.
|
// 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
|
// tcpDefaultBufferSize is the default size of the send buffer for
|
||||||
// a transport endpoint.
|
// a transport endpoint.
|
||||||
tcpDefaultSendBufferSize = tcp.DefaultSendBufferSize
|
tcpDefaultSendBufferSize = pool.RelayBufferSize
|
||||||
|
|
||||||
// tcpDefaultReceiveBufferSize is the default size of the receive buffer
|
// tcpDefaultReceiveBufferSize is the default size of the receive buffer
|
||||||
// for a transport endpoint.
|
// for a transport endpoint.
|
||||||
tcpDefaultReceiveBufferSize = tcp.DefaultReceiveBufferSize
|
tcpDefaultReceiveBufferSize = pool.RelayBufferSize
|
||||||
)
|
)
|
||||||
|
|
||||||
type Option func(*stack.Stack) error
|
type Option func(*stack.Stack) error
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
//go:build !no_gvisor
|
||||||
|
|
||||||
package gvisor
|
package gvisor
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
Loading…
Reference in a new issue