Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrRetry = errors.New("Error sending request, please retry")
ErrRetry Error when sending request
var VV string
VV Used for versioning build
Functions ¶
func SimpleFormat ¶
SimpleFormat used to determine whether or not timestamps are added
Types ¶
type WSConnection ¶
type WSConnection struct { Log log15.Logger // logger with "ws=0x1234" // contains filtered or unexported fields }
WSConnection represents a single websocket connection
type WSTunnelClient ¶
type WSTunnelClient struct { Token string // Rendez-vous token Tunnel *url.URL // websocket server to connect to (ws[s]://hostname:port) Server string // local HTTP(S) server to send received requests to (default server) InternalServer http.Handler // internal Server to dispatch HTTP requests to Regexp *regexp.Regexp // regexp for allowed local HTTP(S) servers Insecure bool // accept self-signed SSL certs from local HTTPS servers Cert string // accept provided certificate from local HTTPS servers Timeout time.Duration // timeout on websocket Proxy *url.URL // if non-nil, external proxy to use Log log15.Logger // logger with "pkg=WStuncli" StatusFd *os.File // output periodic tunnel status information Connected bool // true when we have an active connection to wstunsrv ClientPorts []int // array of ports for client to listen on. // contains filtered or unexported fields }
WSTunnelClient represents a persistent tunnel that can cycle through many websockets. The fields in this struct are relatively static/constant. The conn field points to the latest websocket, but it's important to realize that there may be goroutines handling older websockets that are not fully closed yet running at any point in time
func NewWSTunnelClient ¶
func NewWSTunnelClient(args []string) *WSTunnelClient
NewWSTunnelClient Creates a new WSTunnelClient from command line
func (*WSTunnelClient) Start ¶
func (t *WSTunnelClient) Start() error
Start creates the wstunnel connection.
type WSTunnelServer ¶
type WSTunnelServer struct { Port int // port to listen on Host string // host to listen on WSTimeout time.Duration // timeout on websockets HTTPTimeout time.Duration // timeout for HTTP requests Log log15.Logger // logger with "pkg=WStunsrv" // contains filtered or unexported fields }
WSTunnelServer a wstunnel server construct
func NewWSTunnelServer ¶
func NewWSTunnelServer(args []string) *WSTunnelServer
NewWSTunnelServer function to create wstunnel from cli
func (*WSTunnelServer) Start ¶
func (t *WSTunnelServer) Start(listener net.Listener)
Start wstunnel server start