gateway

package
v0.0.0-...-6f42e1d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 4, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Gateway

type Gateway struct {
	// contains filtered or unexported fields
}

func NewGateway

func NewGateway(userStore svc.UserStore, bandwidthStore svc.BandwidthStore, sessionStore svc.SessionStore) *Gateway

func (*Gateway) AuthHandle

func (g *Gateway) AuthHandle(name, password string) (*svc.User, error)

func (*Gateway) CloseHandle

func (g *Gateway) CloseHandle(id uint64)

func (*Gateway) RegionsHandle

func (g *Gateway) RegionsHandle(id uint64, regions map[string]string) error

func (*Gateway) RegisterHandle

func (g *Gateway) RegisterHandle(conn quic.Connection) (uint64, <-chan error, error)

func (*Gateway) SessionHandle

func (g *Gateway) SessionHandle(user *svc.User, destination svc.Destination, region svc.Region, userConn svc.Conn) error

type Proxy

type Proxy struct {
	// contains filtered or unexported fields
}

func NewProxyServer

func NewProxyServer(
	config ProxyConfig,
	authHandler svc.GatewayAuthHandleFunc,
	sessionHandler svc.GatewaySessionHandleFunc,
) (*Proxy, error)

func (*Proxy) ListenUser

func (s *Proxy) ListenUser() error

type ProxyConfig

type ProxyConfig struct {
	Addr   string     `mapstructure:"addr"`
	Region svc.Region `mapstructure:"region"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL