Documentation ¶
Index ¶
- Constants
- type Dialer
- type Listener
- type Net
- type NetLookup
- type NetOp
- type Network
- type Pointc
- func (*Pointc) CaddyModule() caddy.ModuleInfo
- func (pc *Pointc) Cleanup() error
- func (pc *Pointc) Lookup(name string) (Net, bool)
- func (pc *Pointc) Provision(ctx caddy.Context) error
- func (pc *Pointc) Start() error
- func (pc *Pointc) Stop() error
- func (pc *Pointc) UnmarshalCaddyfile(d *caddyfile.Dispenser) error
- type RegisterFunc
Constants ¶
View Source
const ( CaddyfilePointCName = "point-c" CaddyfileNetOpName = "netop" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Listener ¶
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 ¶
func (*Listener) CaddyModule() caddy.ModuleInfo
func (*Listener) UnmarshalCaddyfile ¶
UnmarshalCaddyfile unmarshals the caddyfile.
{ servers :443 { listener_wrappers { merge { # this is the actual listener definition point-c <network name> <port to expose> } # make sure tls goes after otherwise encryption will be dropped tls } } }
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 NetOp ¶
type NetOp = lifecycler.LifeCyclable[NetLookup]
type Network ¶
type Network = lifecycler.LifeCyclable[RegisterFunc]
type Pointc ¶
type Pointc struct { NetworksRaw []json.RawMessage `json:"networks,omitempty" caddy:"namespace=point-c.net inline_key=type"` NetOps []json.RawMessage `json:"net-ops,omitempty" caddy:"namespace=point-c.op inline_key=op"` // contains filtered or unexported fields }
Pointc allows usage of networks through a net-ish interface.
func (*Pointc) CaddyModule ¶
func (*Pointc) CaddyModule() caddy.ModuleInfo
type RegisterFunc ¶
RegisterFunc registers 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.
Click to show internal directories.
Click to hide internal directories.