mirror of
https://github.com/SagerNet/sing-box.git
synced 2024-11-23 17:11:29 +00:00
89c723e3e4
Refactor Authenticator interface to struct & Update smux & Update gVisor to 20231204.0 & Update quic-go to v0.40.1 & Update wireguard-go & Add GSO support for TUN/WireGuard & Fix router pre-start & Fix bind forwarder to interface for systems stack
29 lines
1.1 KiB
Go
29 lines
1.1 KiB
Go
package option
|
|
|
|
import "net/netip"
|
|
|
|
type WireGuardOutboundOptions struct {
|
|
DialerOptions
|
|
SystemInterface bool `json:"system_interface,omitempty"`
|
|
GSO bool `json:"gso,omitempty"`
|
|
InterfaceName string `json:"interface_name,omitempty"`
|
|
LocalAddress Listable[netip.Prefix] `json:"local_address"`
|
|
PrivateKey string `json:"private_key"`
|
|
Peers []WireGuardPeer `json:"peers,omitempty"`
|
|
ServerOptions
|
|
PeerPublicKey string `json:"peer_public_key"`
|
|
PreSharedKey string `json:"pre_shared_key,omitempty"`
|
|
Reserved []uint8 `json:"reserved,omitempty"`
|
|
Workers int `json:"workers,omitempty"`
|
|
MTU uint32 `json:"mtu,omitempty"`
|
|
Network NetworkList `json:"network,omitempty"`
|
|
}
|
|
|
|
type WireGuardPeer struct {
|
|
ServerOptions
|
|
PublicKey string `json:"public_key,omitempty"`
|
|
PreSharedKey string `json:"pre_shared_key,omitempty"`
|
|
AllowedIPs Listable[string] `json:"allowed_ips,omitempty"`
|
|
Reserved []uint8 `json:"reserved,omitempty"`
|
|
}
|