mirror of
https://gitee.com/IrisVega/frp.git
synced 2024-11-01 22:31:29 +08:00
subdomain: fix a bug that subdomain is not correct for https, close #194
This commit is contained in:
parent
6a6ccc5302
commit
a56f068f8c
@ -166,6 +166,9 @@ func LoadConf(confFile string) (err error) {
|
||||
if ok {
|
||||
proxyClient.HttpPassWord = tmpStr
|
||||
}
|
||||
|
||||
}
|
||||
if proxyClient.Type == "http" || proxyClient.Type == "https" {
|
||||
// subdomain
|
||||
tmpStr, ok = section["subdomain"]
|
||||
if ok {
|
||||
|
@ -184,6 +184,13 @@ func (p *ProxyServer) Start(c *conn.Conn) (err error) {
|
||||
}
|
||||
p.listeners = append(p.listeners, l)
|
||||
}
|
||||
if p.SubDomain != "" {
|
||||
l, err := VhostHttpsMuxer.Listen(p.SubDomain, "", p.HostHeaderRewrite, p.HttpUserName, p.HttpPassWord)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
p.listeners = append(p.listeners, l)
|
||||
}
|
||||
}
|
||||
|
||||
p.Lock()
|
||||
|
Loading…
Reference in New Issue
Block a user