add subdomain configuration; add conn auth timeout

This commit is contained in:
Maodanping
2016-11-05 14:15:16 +08:00
parent 4c69a4810e
commit 396e148f80
9 changed files with 45 additions and 4 deletions

View File

@@ -130,6 +130,12 @@ func (p *ProxyServer) Start(c *conn.Conn) (err error) {
}
p.listeners = append(p.listeners, l)
}
l, err := VhostHttpMuxer.Listen(p.SubDomain, p.HostHeaderRewrite, p.HttpUserName, p.HttpPassWord)
if err != nil {
return err
}
p.listeners = append(p.listeners, l)
} else if p.Type == "https" {
for _, domain := range p.CustomDomains {
l, err := VhostHttpsMuxer.Listen(domain, p.HostHeaderRewrite, p.HttpUserName, p.HttpPassWord)