Documentation
¶
Index ¶
- Variables
- func ForwardHTTP(rr *HTTPRequestReader, server io.ReadWriteCloser, reqMW HTTPRequestMiddleware, ...) error
- func GenerateToken(now time.Time, key []byte, keyID string) (string, 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, header bool, full bool)
- func LogResponse(prefix string, r *http.Response, header bool, full bool)
- func MakeRWC(conn *websocket.Conn) io.ReadWriteCloser
- func Passthrough(a, b io.ReadWriter) error
- func ReadAllAndClose(rc io.ReadCloser) []byte
- type BuildFunc
- type HTTPRequestMiddleware
- type HTTPRequestModifyFunc
- type HTTPRequestReader
- type HTTPResponseMiddleware
- type HasKeyID
- type IPSet
- type KishServer
- type ProxyParameters
- type TokenSet
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotContainRequiredClaims = errors.New("not contain required claims") ErrLifetimeTooLong = errors.New("lifetime is too long") ErrKeyNotFound = errors.New("key not found") ErrInvalidToken = errors.New("invalid token") )
View Source
var ( LogHttpRequestDetail = false LogHttpResponseDetail = false )
Functions ¶
func ForwardHTTP ¶
func ForwardHTTP(rr *HTTPRequestReader, server io.ReadWriteCloser, reqMW HTTPRequestMiddleware, respMW HTTPResponseMiddleware) error
func GenerateToken ¶ added in v0.0.12
func IsWebsocket ¶
func Passthrough ¶
func Passthrough(a, b io.ReadWriter) error
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
// 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 ProxyParameters ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.