Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct {
// BufSize is the size in bytes of the send/receive buffers of a relay.
BufSize int
// MaxTime is the maximum time for a single connection.
MaxTime time.Duration
// HandleST is a generic function which is called on incoming sharetokens.
HandleST func(*sharetoken.T) error
// ErrorOrigin is an optional string to use when signaling the origin of
// errors downstream.
ErrorOrigin string
// AllowLoopback sets whether to allow dialing loopback addresses. While
// useful for testing, it presents a security risk in production.
AllowLoopback bool
}
type T ¶
func (*T) ListenAndServeHTTP ¶
ListenAndServeHTTP listens on the specified address and passes the connections to ServeHTTP.
func (*T) ServeHTTP ¶
func (t *T) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP is the handler function for H2. It being named ServeHTTP allows T to expose the http.Handler interface. It handles the initial init payload and brokers the subsequent tunnel connections or an exit connection if needed.
Click to show internal directories.
Click to hide internal directories.