Documentation
¶
Index ¶
- func ForwardHTTP(rr *HTTPRequestReader, server io.ReadWriteCloser, reqMW HTTPRequestMiddleware, ...) error
- func GetRemoteIP(req *http.Request, trustXFF bool) string
- func GetWsURL(req *http.Request) *url.URL
- func IsWebsocket(req *http.Request) bool
- func LogRequest(prefix string, r *http.Request, full bool)
- func LogResponse(prefix string, r *http.Response, full bool)
- func MakeProxyJWT(params *ProxyParameters, key []byte, keyID string) (string, error)
- func MakeRWC(conn *websocket.Conn) io.ReadWriteCloser
- func Passthrough(a, b io.ReadWriter) error
- func PassthroughWebsocket(dialer *websocket.Dialer, w http.ResponseWriter, req *http.Request) (*http.Response, error)
- func ReadAllAndClose(rc io.ReadCloser) []byte
- type BuildFunc
- type HTTPRequestMiddleware
- type HTTPRequestModifyFunc
- type HTTPRequestReader
- type HTTPResponseMiddleware
- type HasKeyID
- type IPSet
- type KishServer
- type ProxyClaims
- type ProxyParameters
- type TokenSet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ForwardHTTP ¶
func ForwardHTTP(rr *HTTPRequestReader, server io.ReadWriteCloser, reqMW HTTPRequestMiddleware, respMW HTTPResponseMiddleware) error
func IsWebsocket ¶
func MakeProxyJWT ¶
func MakeProxyJWT(params *ProxyParameters, key []byte, keyID string) (string, error)
func Passthrough ¶
func Passthrough(a, b io.ReadWriter) error
func PassthroughWebsocket ¶
func ReadAllAndClose ¶
func ReadAllAndClose(rc io.ReadCloser) []byte
Types ¶
type HTTPRequestModifyFunc ¶
type HTTPRequestReader ¶
type HTTPResponseMiddleware ¶
type IPSet ¶
func (*IPSet) ContainsIPString ¶
type KishServer ¶
type KishServer struct {
Host string
ProxyDomainSuffix string
TokenSet *TokenSet
TrustXFF bool
EnableTCPForwarding bool
WebsocketHandler string
// contains filtered or unexported fields
}
func (*KishServer) AddHostRouter ¶
func (rs *KishServer) AddHostRouter(host string, buildFunc BuildFunc) error
func (*KishServer) DeleteHostRouter ¶
func (rs *KishServer) DeleteHostRouter(host string)
func (*KishServer) Init ¶
func (rs *KishServer) Init()
func (*KishServer) ServeHTTP ¶
func (rs *KishServer) ServeHTTP(w http.ResponseWriter, r *http.Request)
type ProxyClaims ¶
type ProxyClaims struct {
KeyID string `json:"keyID"`
ProxyParameters
jwt.RegisteredClaims
}
func (*ProxyClaims) GetKeyID ¶
func (c *ProxyClaims) GetKeyID() string
type ProxyParameters ¶
Click to show internal directories.
Click to hide internal directories.