Documentation ¶
Overview ¶
Package proto defines tunnel client server communication protocol.
Index ¶
Constants ¶
View Source
const ( // DefaultControlPath is http.Handler url path for control connection. DefaultControlPath = "/_controlPath" // DefaultControlMethod is HTTP method used by default. DefaultControlMethod = "POST" // ClientIdentifierHeader is a header carrying information about tunnel identifier. ClientIdentifierHeader = "X-Tunnel-Identifier" // ClientIdentifierSignature is a header carrying salted SHA-1 hash of ClientIdentifierHeader ClientIdentifierSignature = "X-Tunnel-Signature" // Connected is message sent by server to client when control connection was established. Connected = "200 Connected to Tunnel" // HandshakeRequest is hello message sent by client to server. HandshakeRequest = "controlHandshake" // HandshakeResponse is response to HandshakeRequest sent by server to client. HandshakeResponse = "controlOk" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnectionConfig ¶
type ConnectionConfig struct {
Http HTTPConfig `json:"http"`
}
type ControlMessage ¶
type ControlMessage struct { Action Action `json:"action"` Protocol Type `json:"transportProtocol"` LocalPort int `json:"localPort"` }
ControlMessage is sent from server to client to establish tunneled connection.
type HTTPConfig ¶
type HTTPConfig struct { Domain string `json:"domain"` Target string `json:"target"` Rewrite []HTTPRewriteRule `json:"rewrite"` }
type HTTPRewriteRule ¶
Click to show internal directories.
Click to hide internal directories.