Documentation ¶
Overview ¶
Package wsproxy is a Layer-7 proxy implementation which uses WebSockets to communicate with clients. Incoming http and websocket requests are multiplexed as separate streams over a WS connection. It uses JWT for auth.
viewer ----> [ proxy ] <--- websocket --- client
proxy serves endpoints exposed by client to viewers.
This is a low-level part of websocktunnel; users should instead use the github.com/taskcluster/client class.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrUnexpectedSigningMethod is returned when the signing method used by the given JWT is not HMAC. ErrUnexpectedSigningMethod = errors.New("unexpected signing method on jwt") // ErrTokenNotValid is returned when the jwt is not valid. ErrTokenNotValid = errors.New("token not valid") // ErrAuthFailed is returned when jwt verification fails. ErrAuthFailed = errors.New("auth failed") // ErrMissingSecret is returned when the proxy does not load both required secrets. ErrMissingSecret = errors.New("both secrets must be loaded") )
Functions ¶
Types ¶
type Config ¶
type Config struct { // Upgrader is a websocket.Upgrader instance which is used to upgrade incoming // websocket connections from Clients. Upgrader websocket.Upgrader // Logger is used to log proxy events. Refer util.Logger. Logger *logrus.Logger // JWTSecretA and JWTSecretB are used by the proxy to verify JWTs from Clients. JWTSecretA []byte JWTSecretB []byte // the prefix for publicly accessible URLs (used to generate the URLs sent // to clients) URLPrefix string // Audience value for aud claim Audience string }
Config contains the run time parameters for the proxy
Click to show internal directories.
Click to hide internal directories.