Documentation
¶
Index ¶
- Constants
- type TunnelClient
- type TunnelClientOption
- func WithAuthToken(token string) TunnelClientOption
- func WithInsecureSkipVerify(skip bool) TunnelClientOption
- func WithPcapPath(path string) TunnelClientOption
- func WithRootCAs(caCerts *x509.CertPool) TunnelClientOption
- func WithServerAddr(addr string) TunnelClientOption
- func WithSocksListenAddr(addr string) TunnelClientOption
- func WithUUID(uuid uuid.UUID) TunnelClientOption
- type TunnelServer
- type TunnelServerOption
Constants ¶
const ApplicationCodeOK quic.ApplicationErrorCode = 0x0
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TunnelClient ¶ added in v0.8.4
type TunnelClient struct {
// contains filtered or unexported fields
}
func NewTunnelClient ¶ added in v0.8.4
func NewTunnelClient(opts ...TunnelClientOption) (*TunnelClient, error)
NewTunnelClient creates a new SOCKS5 proxy and loopback reverse proxy, that forwards and receives traffic via QUIC tunnels.
func (*TunnelClient) Close ¶ added in v0.9.0
func (c *TunnelClient) Close() error
Stop closes the tunnel client and stops forwarding traffic.
func (*TunnelClient) LocalAddresses ¶ added in v0.8.4
func (c *TunnelClient) LocalAddresses() ([]netip.Prefix, error)
type TunnelClientOption ¶ added in v0.8.4
type TunnelClientOption func(*tunnelClientOptions)
func WithAuthToken ¶ added in v0.8.4
func WithAuthToken(token string) TunnelClientOption
WithAuthToken sets the authentication token for the tunnel client.
func WithInsecureSkipVerify ¶ added in v0.8.5
func WithInsecureSkipVerify(skip bool) TunnelClientOption
WithInsecureSkipVerify skips TLS certificate verification of the server.
func WithPcapPath ¶ added in v0.8.4
func WithPcapPath(path string) TunnelClientOption
WithPcapPath sets the optional path to a packet capture file for the tunnel client.
func WithRootCAs ¶ added in v0.8.4
func WithRootCAs(caCerts *x509.CertPool) TunnelClientOption
WithRootCAs sets the optional root CA certificates for TLS verification.
func WithServerAddr ¶ added in v0.8.4
func WithServerAddr(addr string) TunnelClientOption
WithServerAddr sets the server address that the tunnel client will connect to. The address should be in the format "host:port".
func WithSocksListenAddr ¶ added in v0.8.4
func WithSocksListenAddr(addr string) TunnelClientOption
WithSocksListenAddr sets the listen address for the local SOCKS5 proxy server.
func WithUUID ¶ added in v0.8.4
func WithUUID(uuid uuid.UUID) TunnelClientOption
WithUUID sets the UUID for the tunnel client.
type TunnelServer ¶ added in v0.8.3
func NewTunnelServer ¶ added in v0.8.3
func NewTunnelServer( client client.Client, v token.JWTValidator, r router.Router, opts ...TunnelServerOption, ) *TunnelServer
NewTunnelServer creates a new server proxy that routes traffic via QUIC tunnels.
func (*TunnelServer) AddTunnelNode ¶ added in v0.8.4
func (t *TunnelServer) AddTunnelNode(node *corev1alpha.TunnelNode)
AddTunnelNode adds a TunnelNode to the server. This is visible for testing purposes, it is usually called as part of the reconcile loop.
func (*TunnelServer) RemoveTunnelNode ¶ added in v0.8.4
func (t *TunnelServer) RemoveTunnelNode(node *corev1alpha.TunnelNode)
RemoveTunnelNode removes a TunnelNode from the server. This is visible for testing purposes, it is usually called as part of the reconcile loop.
func (*TunnelServer) SetupWithManager ¶ added in v0.8.4
func (t *TunnelServer) SetupWithManager(mgr ctrl.Manager) error
func (*TunnelServer) Start ¶ added in v0.8.3
func (t *TunnelServer) Start(ctx context.Context) error
func (*TunnelServer) Stop ¶ added in v0.8.3
func (t *TunnelServer) Stop() error
type TunnelServerOption ¶ added in v0.8.4
type TunnelServerOption func(*tunnelServerOptions)
func WithCertPath ¶ added in v0.8.3
func WithCertPath(path string) TunnelServerOption
WithCertPath sets the path to the TLS certificate.
func WithIPAM ¶ added in v0.8.3
func WithIPAM(ipam tunnet.IPAM) TunnelServerOption
WithIPAM sets the IPAM to use.
func WithKeyPath ¶ added in v0.8.3
func WithKeyPath(path string) TunnelServerOption
WithKeyPath sets the path to the TLS key.
func WithProxyAddr ¶ added in v0.8.3
func WithProxyAddr(addr string) TunnelServerOption
WithProxyAddr sets the address to bind the proxy to.
func WithULAPrefix ¶ added in v0.8.3
func WithULAPrefix(prefix netip.Prefix) TunnelServerOption
WithULAPrefix sets the Unique Local Address prefix.