Versions in this module Expand all Collapse all v0 v0.0.4 Apr 20, 2023 Changes in this version + var ConfigFile *string + func GetTransportLayer(protocol string) string + func InitFlag() + type App struct + Config *Config + ListenMap map[string]any + ProxyList []*ProxyConfig + ProxyMapLock *sync.Mutex + SSHTunnelMap map[string]any + func NewApp(ctx context.Context) *App + func (app *App) Do(resp http.ResponseWriter, r *http.Request, cfg *ProxyConfig, ...) (err error) + func (app *App) InitConfig(ctx context.Context) (res any, err error) + func (app *App) ListenHttpPort(scheme string, cfg ProxyConfig, urlp *url.URL) + func (app *App) ListenSSHTunnel(cfg ProxyConfig) + func (app *App) ProxyBackend(resp http.ResponseWriter, r *http.Request, cfg *ProxyConfig, ...) (err error) + func (app *App) ProxyStatic(resp http.ResponseWriter, r *http.Request, cfg *ProxyConfig, ...) bool + func (app *App) Reload(ctx context.Context) (res any, err error) + func (app *App) Run(ctx context.Context) (res any, err error) + func (app *App) ServeHTTP(resp http.ResponseWriter, r *http.Request) + func (app *App) Stop(ctx context.Context) (res any, err error) + type Config struct + Proxy map[string]ProxyConfig + type Interrupt interface + Do func(resp http.ResponseWriter, r *http.Request, cfg *ProxyConfig, ...) + Run func() error + SetHeader func(key string, val any) + type JavaScriptInterrupt struct + Script *otto.Script + Vm *otto.Otto + func NewJavascriptVm(cfg *ProxyConfig) (*JavaScriptInterrupt, error) + func (vm *JavaScriptInterrupt) Run(app *App, resp http.ResponseWriter, req *http.Request, cfg *ProxyConfig, ...) error + type ProxyConfig struct + Header map[string]string + Hook map[string]string + Interrupt string + Name string + Proxy string + Root string + Ssh struct{ ... } + Url string