wireguard-go-awg2-lx/conn/controlfns.go
2025-09-15 18:17:24 +08:00

21 lines
685 B
Go

/* SPDX-License-Identifier: MIT
*
* Copyright (C) 2017-2023 WireGuard LLC. All Rights Reserved.
*/
package conn
import (
"github.com/sagernet/sing/common/control"
)
// UDP socket read/write buffer size (7MB). The value of 7MB is chosen as it is
// the max supported by a default configuration of macOS. Some platforms will
// silently clamp the value to other maximums, such as linux clamping to
// net.core.{r,w}mem_max (see _linux.go for additional implementation that works
// around this limitation)
const socketBufferSize = 7 << 20
// controlFns is a list of functions that are called from the listen config
// that can apply socket options.
var controlFns []control.Func