Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StubListener ¶ added in v0.0.10
StubListener creates a stub network listener. This listener does not accept actual network connections but instead blocks on Accept calls until Close is called. It can be used as a base listener when only tunnel listeners are required.
Types ¶
type Forward ¶ added in v0.0.10
type Forward struct { Name configvalues.Hostname Ports []*configvalues.CaddyTextUnmarshaler[*PortPair, PortPair, *PortPair] }
type Forwards ¶ added in v0.0.10
type Forwards struct { Forwards []*Forward `json:"forwards,omitempty"` // contains filtered or unexported fields }
func (*Forwards) CaddyModule ¶ added in v0.0.10
func (*Forwards) CaddyModule() caddy.ModuleInfo
type Listener ¶ added in v0.0.10
type Listener struct { Name configvalues.Hostname `json:"name"` Port configvalues.Port `json:"port"` // contains filtered or unexported fields }
Listener allows a caddy server to listen on a point-c network.
func (*Listener) CaddyModule ¶ added in v0.0.10
func (*Listener) CaddyModule() caddy.ModuleInfo
type MultiWrapper ¶ added in v0.0.10
type MultiWrapper struct { // ListenerRaw is a slice of JSON-encoded data representing listener configurations. // These configurations are used to create the actual net.Listener instances. // Listeners should implement [net.Listener] and be in the 'caddy.listeners.multi.listeners' namespace. ListenerRaw []json.RawMessage `json:"listeners" caddy:"namespace=caddy.listeners.multi.listeners inline_key=listener"` // contains filtered or unexported fields }
MultiWrapper loads multiple [net.Listener]s and aggregates their [net.Conn]s into a single net.Listener. It allows caddy to accept connections from multiple sources.
func (*MultiWrapper) CaddyModule ¶ added in v0.0.10
func (p *MultiWrapper) CaddyModule() caddy.ModuleInfo
CaddyModule implements caddy.Module.
func (*MultiWrapper) Cleanup ¶ added in v0.0.10
func (p *MultiWrapper) Cleanup() (err error)
Cleanup implements caddy.CleanerUpper. All wrapped listeners are closed and the struct is cleared.
func (*MultiWrapper) Provision ¶ added in v0.0.10
func (p *MultiWrapper) Provision(ctx caddy.Context) error
Provision implements caddy.Provisioner. It loads the listeners from their configs and asserts them to net.Listener. Any failed assertions will cause a panic.
func (*MultiWrapper) UnmarshalCaddyfile ¶ added in v0.0.10
func (p *MultiWrapper) UnmarshalCaddyfile(d *caddyfile.Dispenser) error
UnmarshalCaddyfile implements caddyfile.Unmarshaler. Must have at least one listener to aggregate with the wrapped listener. `tls` should come specifically after any `multi` directives.
http caddyfile: { servers :443 { listener_wrappers { multi { <submodule name> <submodule config> } tls } } }
func (*MultiWrapper) WrapListener ¶ added in v0.0.10
func (p *MultiWrapper) WrapListener(ls net.Listener) net.Listener
WrapListener implements caddy.ListenerWrapper. The listener passed in is closed by MultiWrapper during cleanup.
type Net ¶
type Net interface { // Listen listens on the given address with the TCP protocol. Listen(addr *net.TCPAddr) (net.Listener, error) // ListenPacket listens on the given address with the UDP protocol. ListenPacket(addr *net.UDPAddr) (net.PacketConn, error) // Dialer returns a [Dialer] with a given local address. If the network does not support arbitrary remote addresses this value can be ignored. Dialer(laddr net.IP, port uint16) Dialer // LocalAddr is the local address of the net interface. If it does not have one, return nil. LocalAddr() net.IP }
Net is a peer in the networking stack. If it has a local address [Net.LocalAddress] should return a non-nil value.
type Network ¶ added in v0.0.10
Network is a map of a unique name to a Net tunnel. Since ip addresses may be arbitrary depending on what the application is doing in the tunnel, names are used as lookup. This allows helps with configuration, so that users don't need to remember ip addresses.
type Pointc ¶ added in v0.0.10
type Pointc struct { NetworksRaw []json.RawMessage `json:"networks,omitempty" caddy:"namespace=point-c.net inline_key=type"` // contains filtered or unexported fields }
Pointc allows usage of networks through a net-ish interface.
func (*Pointc) CaddyModule ¶ added in v0.0.10
func (*Pointc) CaddyModule() caddy.ModuleInfo
type PortPair ¶ added in v0.0.10
type PortPair struct {
// contains filtered or unexported fields
}
PortPair is a [<host>:]<src>:<dst>[/<tcp|udp>] port pair.
func (*PortPair) UnmarshalText ¶ added in v0.0.10
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
internal
|
|
networks/wg
Module
|
|
pkg
|
|
wg
Module
|
|
wg/wglog/wgevents
Module
|
|
wglog
|
|
wgevents
Module
|