Documentation ¶
Overview ¶
Package wg is a point-c network for a WireGuard tunnel.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Name configvalues.Hostname `json:"name"` Endpoint configvalues.UDPAddr `json:"endpoint"` IP configvalues.IP `json:"ip"` Private configvalues.PrivateKey `json:"private"` Public configvalues.PublicKey `json:"public"` // contains filtered or unexported fields }
Client is a basic wireguard client.
func (*Client) CaddyModule ¶
func (*Client) CaddyModule() caddy.ModuleInfo
func (*Client) UnmarshalCaddyfile ¶
UnmarshalCaddyfile unmarshals a config in caddyfile form.
{ point-c { wgclient <name> { ip <tunnel ip> endpoint <server address/ip> private <client private key> public <server public key> shared <shared key> } }
type Server ¶
type Server struct { Name configvalues.Hostname `json:"hostname"` IP configvalues.IP `json:"ip"` ListenPort configvalues.Port `json:"listen-port"` Private configvalues.PrivateKey `json:"private"` Peers []*ServerPeer `json:"peers"` // contains filtered or unexported fields }
Server is a basic wireguard server.
func (*Server) CaddyModule ¶
func (*Server) CaddyModule() caddy.ModuleInfo
func (*Server) UnmarshalCaddyfile ¶
UnmarshalCaddyfile unmarshals a config in caddyfile form.
{ point-c { wgserver <name> { ip <server ip> port <server port to listen on> private <server private key> peer <name> { ip <client ip> public <client public key> shared <shared key> } } }
type ServerPeer ¶
type ServerPeer struct { Name configvalues.Hostname `json:"hostname"` Public configvalues.PublicKey `json:"public"` IP configvalues.IP `json:"ip"` }
Server is a basic wireguard server.
Click to show internal directories.
Click to hide internal directories.