change the Host value in http request header

This commit is contained in:
Maodanping
2016-07-24 15:00:18 +08:00
parent 4067591a4d
commit e0f2993b70
7 changed files with 165 additions and 9 deletions

View File

@@ -144,6 +144,8 @@ func loginToServer(cli *client.ProxyClient) (c *conn.Conn, err error) {
UseGzip: cli.UseGzip,
PrivilegeMode: cli.PrivilegeMode,
ProxyType: cli.Type,
LocalIp: cli.LocalIp,
LocalPort: cli.LocalPort,
Timestamp: nowTime,
}
if cli.PrivilegeMode {

View File

@@ -276,6 +276,8 @@ func doLogin(req *msg.ControlReq, c *conn.Conn) (ret int64, info string) {
// set infomations from frpc
s.UseEncryption = req.UseEncryption
s.UseGzip = req.UseGzip
s.ClientIp = req.LocalIp
s.ClientPort = req.LocalPort
// start proxy and listen for user connections, no block
err := s.Start(c)