Documentation ¶
Index ¶
- type ClientAuthentication
- type ClientAuthenticator
- type ClientConnKey
- type ClientConnValue
- type ClientPeerKey
- type ClientPeerValue
- type ClientRelays
- type Config
- type ConfigKey
- type ConfigValue
- type RelayAuthentication
- type RelayAuthenticator
- type RelayClientKey
- type RelayClientValue
- type RelayConnKey
- type RelayConnValue
- type RelayForwardKey
- type RelayForwardValue
- type RelayServerKey
- type RelayServerValue
- type Server
- type Stores
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientAuthentication ¶
type ClientAuthenticator ¶
type ClientAuthenticator interface {
Authenticate(token string) (ClientAuthentication, error)
}
type ClientConnKey ¶
type ClientConnValue ¶
type ClientPeerKey ¶
type ClientPeerValue ¶
type ClientPeerValue struct {
Peer *pbs.ClientPeer `json:"peer"`
}
type ClientRelays ¶
type Config ¶
type Config struct { Addr *net.UDPAddr Cert tls.Certificate ClientAuth ClientAuthenticator RelayAuth RelayAuthenticator Stores Stores Logger *slog.Logger }
type ConfigValue ¶
type RelayAuthentication ¶
type RelayAuthentication interface { Allow(fwd model.Forward) bool encoding.BinaryMarshaler }
type RelayAuthenticator ¶
type RelayAuthenticator interface {
Authenticate(token string) (RelayAuthentication, error)
}
type RelayClientKey ¶
type RelayClientValue ¶
type RelayClientValue struct {
Cert *x509.Certificate `json:"cert"`
}
func (RelayClientValue) MarshalJSON ¶
func (v RelayClientValue) MarshalJSON() ([]byte, error)
func (*RelayClientValue) UnmarshalJSON ¶
func (v *RelayClientValue) UnmarshalJSON(b []byte) error
type RelayConnKey ¶
type RelayConnValue ¶
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 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 ¶
func NewTmpFileStores ¶
Click to show internal directories.
Click to hide internal directories.