-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove unused ICMP replies & Improve tcpbuf options
- Loading branch information
1 parent
d8ab193
commit cd34925
Showing
6 changed files
with
117 additions
and
284 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Copyright (c) Tailscale Inc & AUTHORS | ||
// SPDX-License-Identifier: BSD-3-Clause | ||
|
||
//go:build with_gvisor && !ios | ||
|
||
package tun | ||
|
||
import "github.com/sagernet/gvisor/pkg/tcpip/transport/tcp" | ||
|
||
const ( | ||
tcpRXBufMinSize = tcp.MinBufferSize | ||
tcpRXBufDefSize = tcp.DefaultSendBufferSize | ||
tcpRXBufMaxSize = 8 << 20 // 8MiB | ||
|
||
tcpTXBufMinSize = tcp.MinBufferSize | ||
tcpTXBufDefSize = tcp.DefaultReceiveBufferSize | ||
tcpTXBufMaxSize = 6 << 20 // 6MiB | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Copyright (c) Tailscale Inc & AUTHORS | ||
// SPDX-License-Identifier: BSD-3-Clause | ||
|
||
//go:build with_gvisor | ||
|
||
package tun | ||
|
||
import "github.com/sagernet/gvisor/pkg/tcpip/transport/tcp" | ||
|
||
const ( | ||
// tcp{RX,TX}Buf{Min,Def,Max}Size mirror gVisor defaults. We leave these | ||
// unchanged on iOS for now as to not increase pressure towards the | ||
// NetworkExtension memory limit. | ||
tcpRXBufMinSize = tcp.MinBufferSize | ||
tcpRXBufDefSize = tcp.DefaultSendBufferSize | ||
tcpRXBufMaxSize = tcp.MaxBufferSize | ||
|
||
tcpTXBufMinSize = tcp.MinBufferSize | ||
tcpTXBufDefSize = tcp.DefaultReceiveBufferSize | ||
tcpTXBufMaxSize = tcp.MaxBufferSize | ||
) |
Oops, something went wrong.