Documentation
¶
Index ¶
- type ClientAuthenticateRequest
- type ClientAuthentication
- type ClientAuthenticator
- type ClientConnKey
- type ClientConnValue
- type ClientPeerKey
- type ClientPeerValue
- type ClientRelays
- type Config
- type ConfigKey
- type ConfigValue
- type RelayAuthenticateRequest
- type RelayAuthentication
- type RelayAuthenticator
- type RelayClientKey
- type RelayClientValue
- type RelayConnKey
- type RelayConnValue
- type RelayForwardKey
- type RelayForwardValue
- type RelayServerKey
- type RelayServerValue
- type Server
- type Status
- type StatusClient
- type StatusPeer
- type StatusRelay
- type Stores
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientAuthenticateRequest ¶ added in v0.7.0
type ClientAuthentication ¶
type ClientAuthentication []byte
type ClientAuthenticator ¶
type ClientAuthenticator interface { Authenticate(req ClientAuthenticateRequest) (ClientAuthentication, error) Validate(auth ClientAuthentication, fwd model.Forward, role model.Role) (model.Forward, error) }
type ClientConnKey ¶
type ClientConnValue ¶
type ClientConnValue struct { Authentication ClientAuthentication `json:"authentication"` Addr string `json:"addr"` }
type ClientPeerKey ¶
type ClientPeerValue ¶
type ClientPeerValue struct {
Peer *pbs.ClientPeer `json:"peer"`
}
type ClientRelays ¶
type Config ¶
type Config struct { Cert tls.Certificate ClientsAddr *net.UDPAddr ClientsAuth ClientAuthenticator ClientsRestr restr.IP RelaysAddr *net.UDPAddr RelaysAuth RelayAuthenticator RelaysRestr restr.IP Stores Stores Logger *slog.Logger }
type ConfigValue ¶
type RelayAuthenticateRequest ¶ added in v0.7.0
type RelayAuthentication ¶
type RelayAuthentication []byte
type RelayAuthenticator ¶
type RelayAuthenticator interface { Authenticate(req RelayAuthenticateRequest) (RelayAuthentication, error) Allow(reAuth RelayAuthentication, clAuth ClientAuthentication, fwd model.Forward) (bool, error) }
type RelayClientKey ¶
type RelayClientValue ¶
type RelayClientValue struct { Cert *x509.Certificate `json:"cert"` Authentication ClientAuthentication `json:"authentication"` }
func (RelayClientValue) MarshalJSON ¶
func (v RelayClientValue) MarshalJSON() ([]byte, error)
func (*RelayClientValue) UnmarshalJSON ¶
func (v *RelayClientValue) UnmarshalJSON(b []byte) error
type RelayConnKey ¶
type RelayConnValue ¶
type RelayConnValue struct { Authentication RelayAuthentication `json:"authentication"` Hostport model.HostPort `json:"hostport"` }
type RelayForwardKey ¶
type RelayForwardValue ¶
type RelayForwardValue struct {
Cert *x509.Certificate `json:"cert"`
}
func (RelayForwardValue) MarshalJSON ¶
func (v RelayForwardValue) MarshalJSON() ([]byte, error)
func (*RelayForwardValue) UnmarshalJSON ¶
func (v *RelayForwardValue) UnmarshalJSON(b []byte) error
type RelayServerKey ¶
type RelayServerValue ¶
type RelayServerValue struct { Hostport model.HostPort `json:"hostport"` Cert *x509.Certificate `json:"cert"` }
func (RelayServerValue) MarshalJSON ¶
func (v RelayServerValue) MarshalJSON() ([]byte, error)
func (*RelayServerValue) UnmarshalJSON ¶
func (v *RelayServerValue) UnmarshalJSON(b []byte) error
type Status ¶ added in v0.4.0
type Status struct { ServerID string `json:"server_id"` Clients []StatusClient `json:"clients"` Peers []StatusPeer `json:"peers"` Relays []StatusRelay `json:"relays"` }
type StatusClient ¶ added in v0.4.0
type StatusPeer ¶ added in v0.4.0
type StatusRelay ¶ added in v0.4.0
type Stores ¶
type Stores interface { Config() (logc.KV[ConfigKey, ConfigValue], error) ClientConns() (logc.KV[ClientConnKey, ClientConnValue], error) ClientPeers() (logc.KV[ClientPeerKey, ClientPeerValue], error) RelayConns() (logc.KV[RelayConnKey, RelayConnValue], error) RelayClients() (logc.KV[RelayClientKey, RelayClientValue], error) RelayForwards(id ksuid.KSUID) (logc.KV[RelayForwardKey, RelayForwardValue], error) RelayServers() (logc.KV[RelayServerKey, RelayServerValue], error) RelayServerOffsets() (logc.KV[RelayConnKey, int64], error) }
func NewFileStores ¶
Click to show internal directories.
Click to hide internal directories.