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 {
|
if ok {
|
||||||
proxyClient.HttpPassWord = tmpStr
|
proxyClient.HttpPassWord = tmpStr
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
if proxyClient.Type == "http" || proxyClient.Type == "https" {
|
||||||
// subdomain
|
// subdomain
|
||||||
tmpStr, ok = section["subdomain"]
|
tmpStr, ok = section["subdomain"]
|
||||||
if ok {
|
if ok {
|
||||||
|
@ -184,6 +184,13 @@ func (p *ProxyServer) Start(c *conn.Conn) (err error) {
|
|||||||
}
|
}
|
||||||
p.listeners = append(p.listeners, l)
|
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()
|
p.Lock()
|
||||||
|
Loading…
Reference in New Issue
Block a user