Documentation
¶
Index ¶
- func DefaultIndex() http.Handler
- func NewProxyHandler() http.Handler
- func ProxyBasicAuth(r *http.Request) (username, password string, ok bool)
- func RealIP(r *http.Request) (realIP string)
- func Transport(tssn transport.Session) *http.Transport
- type ExpVarStruct
- type Record
- type Relayer
- type SessionStore
- func (s *SessionStore) Add(k string, tssn transport.Session, tstm transport.Stream, r *http.Request)
- func (s *SessionStore) Allocate(r *http.Request, root string) (string, string, error)
- func (s *SessionStore) Get(k string) (transport.Session, bool)
- func (s *SessionStore) Negotiate(r *http.Request, root string, tssn transport.Session, tstm transport.Stream) (string, error)
- func (s *SessionStore) Ping(k string, tstm transport.Stream)
- func (s *SessionStore) Records() (all []*Record)
- func (s *SessionStore) RecordsHandler(w http.ResponseWriter, r *http.Request)
- func (s *SessionStore) Remove(k string)
- func (s *SessionStore) Scan(k string, tstm transport.Stream)
- func (s *SessionStore) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (s *SessionStore) Visited(k string)
- type Storage
- type Upgrader
- type WSServer
- type WTServer
- type WebsocketUpgrader
- func (s *WebsocketUpgrader) IsRoot(r *http.Request) (result bool)
- func (s *WebsocketUpgrader) IsUpgrade(r *http.Request) (result bool)
- func (s *WebsocketUpgrader) Root() string
- func (*WebsocketUpgrader) Upgrade(w http.ResponseWriter, r *http.Request) (tssn transport.Session, tstm transport.Stream, err error)
- type WebtransportUpgrader
- func (s *WebtransportUpgrader) IsRoot(r *http.Request) (result bool)
- func (s *WebtransportUpgrader) IsUpgrade(r *http.Request) (result bool)
- func (s *WebtransportUpgrader) Root() string
- func (s *WebtransportUpgrader) Upgrade(w http.ResponseWriter, r *http.Request) (transport.Session, transport.Stream, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultIndex ¶ added in v0.3.4
func NewProxyHandler ¶ added in v0.3.1
func ProxyBasicAuth ¶ added in v0.3.1
Types ¶
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 SessionStore ¶ added in v0.3.4
type SessionStore struct { Lock *sync.RWMutex PingInterval time.Duration Record map[string]*Record }
func NewSessionStore ¶ added in v0.3.4
func NewSessionStore() *SessionStore
func (*SessionStore) Get ¶ added in v0.3.4
func (s *SessionStore) Get(k string) (transport.Session, bool)
func (*SessionStore) Ping ¶ added in v0.3.4
func (s *SessionStore) Ping(k string, tstm transport.Stream)
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) Remove ¶ added in v0.3.4
func (s *SessionStore) Remove(k string)
func (*SessionStore) Scan ¶ added in v0.3.4
func (s *SessionStore) Scan(k string, tstm transport.Stream)
func (*SessionStore) ServeHTTP ¶ added in v0.3.6
func (s *SessionStore) ServeHTTP(w http.ResponseWriter, r *http.Request)
func (*SessionStore) Visited ¶ added in v0.3.4
func (s *SessionStore) Visited(k string)
type Storage ¶ added in v0.3.4
type Storage interface { // Create Add(k string, tssn transport.Session, tstm transport.Stream, r *http.Request) // Read Get(k string) (transport.Session, bool) Records() []*Record RecordsHandler(w http.ResponseWriter, r *http.Request) // Update Visited(k string) // Remove Remove(k string) // Rand Allocate(r *http.Request, root string) (key string, hostnamePath string, err error) Negotiate(r *http.Request, root string, tssn transport.Session, tstm transport.Stream) (key string, err error) // Serve http.Handler }
/ transport agnostic CRUD
type WSServer ¶ added in v0.3.4
func NewWSServer ¶ added in v0.3.4
func (*WSServer) ConnectHandler ¶ added in v0.3.4
func (sm *WSServer) ConnectHandler(w http.ResponseWriter, r *http.Request)
func (*WSServer) IndexHandler ¶ added in v0.3.4
func (sm *WSServer) IndexHandler(w http.ResponseWriter, r *http.Request)
type WTServer ¶ added in v0.3.6
type WTServer struct { HOST string Storage *WebtransportUpgrader PostUpgrade http.Handler }
func NewWTServer ¶ added in v0.3.6
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
type WebsocketUpgrader ¶ added in v0.3.4
type WebsocketUpgrader struct {
// contains filtered or unexported fields
}
func (*WebsocketUpgrader) IsRoot ¶ added in v0.3.6
func (s *WebsocketUpgrader) IsRoot(r *http.Request) (result bool)
func (*WebsocketUpgrader) IsUpgrade ¶ added in v0.3.6
func (s *WebsocketUpgrader) IsUpgrade(r *http.Request) (result bool)
func (*WebsocketUpgrader) Root ¶ added in v0.3.6
func (s *WebsocketUpgrader) Root() string
type WebtransportUpgrader ¶ added in v0.3.6
func (*WebtransportUpgrader) IsRoot ¶ added in v0.3.6
func (s *WebtransportUpgrader) IsRoot(r *http.Request) (result bool)
func (*WebtransportUpgrader) IsUpgrade ¶ added in v0.3.6
func (s *WebtransportUpgrader) IsUpgrade(r *http.Request) (result bool)
func (*WebtransportUpgrader) Root ¶ added in v0.3.6
func (s *WebtransportUpgrader) Root() string
Source Files
¶
Click to show internal directories.
Click to hide internal directories.