Documentation ¶
Index ¶
- Variables
- func CheckProxyAuth(user, pass string) bool
- func ConnectVerbose(next http.Handler) http.Handler
- func DefaultIndex() http.Handler
- func IsProxy(r *http.Request) bool
- func NewProxyHandler() http.Handler
- func ProxyAuthenticate(next http.Handler) http.Handler
- func ProxyBasicAuth(r *http.Request) (username, password string, ok bool)
- func ProxyDispatcher(r *http.Request) http.Handler
- func ReverseProxy(rt http.RoundTripper) *httputil.ReverseProxy
- func RoundTripper(tssn tunnel.Session) http.RoundTripper
- type Dispatcher
- type DispatcherFunc
- 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) 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 VerboseConn
- type WSServer
- 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)
- type WTServer
- 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) WithTLSConfig(tlsConfig *tls.Config) *WTServer
Constants ¶
This section is empty.
Variables ¶
View Source
var AuthenticatedProxyHandler = ConnectVerbose(ProxyAuthenticate(NewProxyHandler()))
Functions ¶
func CheckProxyAuth ¶ added in v0.4.26
func DefaultIndex ¶ added in v0.3.4
func NewProxyHandler ¶ added in v0.3.1
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
dispatch to other http.Handler implementations
type DispatcherFunc ¶ added in v0.4.25
wrapping Dispatcher into http.Handler
func (DispatcherFunc) ServeHTTP ¶ added in v0.4.25
func (d DispatcherFunc) ServeHTTP(w http.ResponseWriter, r *http.Request)
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 { *muxr.Router 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) 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 // apply middleware to dispatcher Use(middlewares ...muxr.Middleware) // shortcut to dispatcher http.Handler }
edge.Edge multiplexer
type VerboseConn ¶ added in v0.4.32
type WSServer ¶ added in v0.3.4
type WSServer struct { Storage edge.HTTPUpgrader }
func NewWSServer ¶ added in v0.3.4
func (*WSServer) IndexHandler ¶ added in v0.3.4
func (s *WSServer) IndexHandler(w http.ResponseWriter, r *http.Request)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.