newhttp support BasicAuth

This commit is contained in:
fatedier
2017-12-13 23:44:27 +08:00
parent 46358d466d
commit 4cc5ddc012
3 changed files with 36 additions and 23 deletions

View File

@@ -50,12 +50,16 @@ func NewVhostMuxer(listener frpNet.Listener, vhostFunc muxFunc, authFunc httpAut
return mux, nil
}
type CreateConnFunc func() (frpNet.Conn, error)
type VhostRouteConfig struct {
Domain string
Location string
RewriteHost string
Username string
Password string
CreateConnFn CreateConnFunc
}
// listen for a new domain name, if rewriteHost is not empty and rewriteFunc is not nil