Documentation ¶
Index ¶
- Variables
- func DefaultIndex() http.Handler
- func IsConnect(r *http.Request) bool
- func NewConnectHandler() http.Handler
- func ProxyBasicAuth(r *http.Request) (username, password string, ok bool)
- func ReverseProxy(rt http.RoundTripper) *httputil.ReverseProxy
- func RoundTripper(tssn tunnel.Session) http.RoundTripper
- type Dispatcher
- type ExpVarStruct
- type Record
- type Relayer
- type SessionStore
- func (s *SessionStore) Allocate(r *edge.Edge, root string) (string, string, error)
- func (s *SessionStore) Dispatch(r *http.Request) http.Handler
- func (s *SessionStore) GetRoundTripper(k string) (http.RoundTripper, bool)
- func (s *SessionStore) GetSession(k string) (tunnel.Session, bool)
- func (s *SessionStore) Negotiate(r *edge.Edge, root string) (string, error)
- func (s *SessionStore) Ping(r *edge.Edge)
- func (s *SessionStore) Records() (all []*Record)
- func (s *SessionStore) RecordsHandler(w http.ResponseWriter, r *http.Request)
- func (s *SessionStore) RemoveSession(tssn tunnel.Session)
- func (s *SessionStore) Scan(r *edge.Edge)
- func (s *SessionStore) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (s *SessionStore) Subscribe(upgrader edge.Upgrader)
- func (s *SessionStore) Upsert(k string, r *edge.Edge)
- func (s *SessionStore) Visited(k string)
- func (s *SessionStore) WebLog(msg string)
- type Storage
- type WSServer
- func (s *WSServer) ConnectHandler(w http.ResponseWriter, r *http.Request)
- func (s *WSServer) Dispatch(r *http.Request) http.Handler
- func (s *WSServer) IndexHandler(w http.ResponseWriter, r *http.Request)
- func (s *WSServer) IsRoot(r *http.Request) bool
- func (s *WSServer) IsUpgrade(r *http.Request) (result bool)
- func (s *WSServer) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (s *WSServer) WithPostUpgrade(h http.Handler) *WSServer
- type WTServer
- func (s *WTServer) ConnectHandler(w http.ResponseWriter, r *http.Request)
- func (s *WTServer) Dispatch(r *http.Request) http.Handler
- func (s *WTServer) IsRoot(r *http.Request) bool
- func (s *WTServer) IsUpgrade(r *http.Request) bool
- func (s *WTServer) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (s *WTServer) WithAddr(a string) *WTServer
- func (s *WTServer) WithPostUpgrade(h http.Handler) *WTServer
- func (s *WTServer) WithTLSConfig(tlsConfig *tls.Config) *WTServer
Constants ¶
This section is empty.
Variables ¶
View Source
var ConnectHandler = NewConnectHandler()
Functions ¶
func DefaultIndex ¶ added in v0.3.4
func IsConnect ¶ added in v0.4.15
when env CONNECT is set, filter authenticated h1/h2/h3 connect requests
func NewConnectHandler ¶ added in v0.4.15
func ProxyBasicAuth ¶ added in v0.3.1
func ReverseProxy ¶ added in v0.4.5
func ReverseProxy(rt http.RoundTripper) *httputil.ReverseProxy
func RoundTripper ¶ added in v0.4.12
func RoundTripper(tssn tunnel.Session) http.RoundTripper
Types ¶
type Dispatcher ¶ added in v0.4.19
type Dispatcher interface { Dispatch(r *http.Request) http.Handler // shortcut to Dispatch(r).ServeHTTP(w, r) http.Handler }
dispatch to other http.Handler implementations
type ExpVarStruct ¶ added in v0.3.1
type ExpVarStruct struct { WebteleportRelayStreamsSpawned *expvar.Int WebteleportRelayStreamsClosed *expvar.Int WebteleportRelaySessionsAccepted *expvar.Int WebteleportRelaySessionsClosed *expvar.Int }
func NewExpVarStruct ¶ added in v0.3.1
func NewExpVarStruct() *ExpVarStruct
type Record ¶ added in v0.3.1
type Relayer ¶ added in v0.3.6
type Relayer interface { // dispatch to HTTPUpgrader and Storage Dispatcher // builtin HTTPUpgrader edge.HTTPUpgrader // edge.Edge multiplexer Storage }
edge.Edge multiplexer with builtin HTTPUpgrader
type SessionStore ¶ added in v0.3.4
type SessionStore struct { Lock *sync.RWMutex PingInterval time.Duration Verbose bool Webhook string Client *http.Client Record map[string]*Record }
func NewSessionStore ¶ added in v0.3.4
func NewSessionStore() *SessionStore
func (*SessionStore) Dispatch ¶ added in v0.4.19
func (s *SessionStore) Dispatch(r *http.Request) http.Handler
func (*SessionStore) GetRoundTripper ¶ added in v0.4.18
func (s *SessionStore) GetRoundTripper(k string) (http.RoundTripper, bool)
func (*SessionStore) GetSession ¶ added in v0.4.1
func (s *SessionStore) GetSession(k string) (tunnel.Session, bool)
func (*SessionStore) Ping ¶ added in v0.3.4
func (s *SessionStore) Ping(r *edge.Edge)
Ping proactively pings the client to keep the connection alive and to detect if the client has disconnected. If the client has disconnected, the session is removed from the session store.
This function has been found mostly unnecessary since the disconnect is automatically detected by the underlying transport layer and handled by the Scan function. However, it is kept here for completeness.
func (*SessionStore) Records ¶ added in v0.3.4
func (s *SessionStore) Records() (all []*Record)
func (*SessionStore) RecordsHandler ¶ added in v0.3.4
func (s *SessionStore) RecordsHandler(w http.ResponseWriter, r *http.Request)
func (*SessionStore) RemoveSession ¶ added in v0.4.1
func (s *SessionStore) RemoveSession(tssn tunnel.Session)
func (*SessionStore) Scan ¶ added in v0.3.4
func (s *SessionStore) Scan(r *edge.Edge)
func (*SessionStore) ServeHTTP ¶ added in v0.3.6
func (s *SessionStore) ServeHTTP(w http.ResponseWriter, r *http.Request)
func (*SessionStore) Subscribe ¶ added in v0.4.16
func (s *SessionStore) Subscribe(upgrader edge.Upgrader)
func (*SessionStore) Visited ¶ added in v0.3.4
func (s *SessionStore) Visited(k string)
func (*SessionStore) WebLog ¶ added in v0.4.13
func (s *SessionStore) WebLog(msg string)
type Storage ¶ added in v0.3.4
type Storage interface { // Dispatch to edge.Edge Dispatcher // get Session wrapped by http.Transport GetRoundTripper(k string) (http.RoundTripper, bool) // record Info RecordsHandler(w http.ResponseWriter, r *http.Request) // subscribe to incoming stream of edge.Edge edge.Subscriber }
edge.Edge multiplexer
type WSServer ¶ added in v0.3.4
type WSServer struct { Storage edge.HTTPUpgrader PostUpgrade http.Handler }
func NewWSServer ¶ added in v0.3.4
func (*WSServer) ConnectHandler ¶ added in v0.3.4
func (s *WSServer) ConnectHandler(w http.ResponseWriter, r *http.Request)
func (*WSServer) IndexHandler ¶ added in v0.3.4
func (s *WSServer) IndexHandler(w http.ResponseWriter, r *http.Request)
type WTServer ¶ added in v0.3.6
func NewWTServer ¶ added in v0.3.6
func (*WTServer) ConnectHandler ¶ added in v0.4.15
func (s *WTServer) ConnectHandler(w http.ResponseWriter, r *http.Request)
func (*WTServer) ServeHTTP ¶ added in v0.3.6
func (s *WTServer) ServeHTTP(w http.ResponseWriter, r *http.Request)
func (*WTServer) WithPostUpgrade ¶ added in v0.3.11
Click to show internal directories.
Click to hide internal directories.