Documentation ¶
Index ¶
- Variables
- func BuildNewTunnel(addr string)
- func CompressByGzip(in []byte) ([]byte, error)
- func DecompressByGzip(in []byte) ([]byte, error)
- func Decrypt(key, input []byte) ([]byte, error)
- func DirectRequest(req *http.Request, target *url.URL)
- func Encrypt(key, input []byte) ([]byte, error)
- func Forward(target string, rw http.ResponseWriter, req *http.Request)
- func NewDefaultHub() *hub
- func ServeWS(w http.ResponseWriter, r *http.Request)
- type Client
- type Messager
- type Responser
Constants ¶
This section is empty.
Variables ¶
View Source
var Hub *hub
Functions ¶
func BuildNewTunnel ¶
func BuildNewTunnel(addr string)
func CompressByGzip ¶
func DecompressByGzip ¶
func DirectRequest ¶
DirectRequest routes URLs to the scheme, host, and base path provided in target. If the target's path is "/base" and the incoming request was for "/dir", the target request will be for /base/dir. Learn NewSingleHostReverseProxy from https://golang.org/src/net/http/httputil/reverseproxy.go
func NewDefaultHub ¶
func NewDefaultHub() *hub
Types ¶
type Client ¶
type Client struct { sync.RWMutex // client ID ID uint64 // contains filtered or unexported fields }
Client is a middleman between the websocket connection and the hub.
Click to show internal directories.
Click to hide internal directories.