github.com/inazumav/sing-box@v0.0.0-20230926072359-ab51429a14f1/option/wireguard.go (about)

     1  package option
     2  
     3  type WireGuardOutboundOptions struct {
     4  	DialerOptions
     5  	SystemInterface bool                   `json:"system_interface,omitempty"`
     6  	InterfaceName   string                 `json:"interface_name,omitempty"`
     7  	LocalAddress    Listable[ListenPrefix] `json:"local_address"`
     8  	PrivateKey      string                 `json:"private_key"`
     9  	Peers           []WireGuardPeer        `json:"peers,omitempty"`
    10  	ServerOptions
    11  	PeerPublicKey string      `json:"peer_public_key"`
    12  	PreSharedKey  string      `json:"pre_shared_key,omitempty"`
    13  	Reserved      []uint8     `json:"reserved,omitempty"`
    14  	Workers       int         `json:"workers,omitempty"`
    15  	MTU           uint32      `json:"mtu,omitempty"`
    16  	Network       NetworkList `json:"network,omitempty"`
    17  }
    18  
    19  type WireGuardPeer struct {
    20  	ServerOptions
    21  	PublicKey    string           `json:"public_key,omitempty"`
    22  	PreSharedKey string           `json:"pre_shared_key,omitempty"`
    23  	AllowedIPs   Listable[string] `json:"allowed_ips,omitempty"`
    24  	Reserved     []uint8          `json:"reserved,omitempty"`
    25  }