impl trim

This commit is contained in:
Bel LaPointe
2022-01-11 15:58:27 -05:00
parent ef3abbbf07
commit f28211e722
5 changed files with 7 additions and 0 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -41,6 +41,10 @@ func GetAuth() (string, string, bool) {
return user, pass, user != "" && pass != ""
}
func GetTrim() string {
return conf.Get("trim").GetString()
}
func GetPort() string {
port := conf.Get("p").GetInt()
return ":" + fmt.Sprint(port)

View File

@@ -47,6 +47,7 @@ func parseArgs() (*args.ArgSet, error) {
as.Append(args.BOOL, "compress", "enable compression", true)
as.Append(args.STRING, "crt", "path to crt for ssl", "")
as.Append(args.STRING, "key", "path to key for ssl", "")
as.Append(args.STRING, "trim", "path prefix to trim, like '/abc' to change '/abc/def' to '/def'", "")
as.Append(args.STRING, "tcp", "address for tcp only tunnel", "")
as.Append(args.DURATION, "timeout", "timeout for tunnel", time.Minute)
as.Append(args.STRING, "proxy", "double-comma separated (+ if auth)from,scheme://to.tld:port,,", "")