2022-08-16 15:37:51 +00:00
|
|
|
package option
|
|
|
|
|
2023-10-21 04:00:00 +00:00
|
|
|
import "net/netip"
|
|
|
|
|
2022-08-16 15:37:51 +00:00
|
|
|
type WireGuardOutboundOptions struct {
|
2022-09-03 04:55:10 +00:00
|
|
|
DialerOptions
|
2022-09-05 16:15:09 +00:00
|
|
|
SystemInterface bool `json:"system_interface,omitempty"`
|
2023-12-20 12:00:00 +00:00
|
|
|
GSO bool `json:"gso,omitempty"`
|
2022-09-05 16:15:09 +00:00
|
|
|
InterfaceName string `json:"interface_name,omitempty"`
|
2023-10-21 04:00:00 +00:00
|
|
|
LocalAddress Listable[netip.Prefix] `json:"local_address"`
|
2022-09-05 16:15:09 +00:00
|
|
|
PrivateKey string `json:"private_key"`
|
2023-03-31 04:31:26 +00:00
|
|
|
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"`
|
2022-08-16 15:37:51 +00:00
|
|
|
}
|