fixed bug
This commit is contained in:
parent
b8a28e945c
commit
e1275c06fa
3
.gitignore
vendored
3
.gitignore
vendored
@ -27,6 +27,7 @@ _testmain.go
|
|||||||
bin/
|
bin/
|
||||||
packages/
|
packages/
|
||||||
test/bin/
|
test/bin/
|
||||||
|
src/cmd/.DS_Store
|
||||||
|
src/cmd/frps/frps
|
||||||
# Cache
|
# Cache
|
||||||
*.swp
|
*.swp
|
||||||
|
@ -78,7 +78,7 @@ func controlWorker(c *conn.Conn) {
|
|||||||
Msg: info,
|
Msg: info,
|
||||||
}
|
}
|
||||||
byteBuf, _ := json.Marshal(cliRes)
|
byteBuf, _ := json.Marshal(cliRes)
|
||||||
err = c.Write(string(byteBuf) + "\n")
|
err = c.WriteString(string(byteBuf) + "\n")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Warn("ProxyName [%s], write to client error, proxy exit", cliReq.ProxyName)
|
log.Warn("ProxyName [%s], write to client error, proxy exit", cliReq.ProxyName)
|
||||||
return
|
return
|
||||||
@ -183,7 +183,7 @@ func msgSender(s *server.ProxyServer, c *conn.Conn, msgSendChan chan interface{}
|
|||||||
}
|
}
|
||||||
|
|
||||||
buf, _ := json.Marshal(msg)
|
buf, _ := json.Marshal(msg)
|
||||||
err := c.Write(string(buf) + "\n")
|
err := c.WriteString(string(buf) + "\n")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Warn("ProxyName [%s], write to client error, proxy exit", s.Name)
|
log.Warn("ProxyName [%s], write to client error, proxy exit", s.Name)
|
||||||
s.Close()
|
s.Close()
|
||||||
@ -302,7 +302,7 @@ func doLogin(req *msg.ControlReq, c *conn.Conn) (ret int64, info string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// update metric's proxy status
|
// update metric's proxy status
|
||||||
metric.SetProxyInfo(s.Name, s.Type, s.BindAddr, s.UseEncryption, s.UseGzip, s.PrivilegeMode, s.CustomDomains, s.ListenPort)
|
metric.SetProxyInfo(s.Name, s.Type, s.BindAddr, s.UseEncryption, s.UseGzip, s.PrivilegeMode, s.CustomDomains, s.Locations, s.ListenPort)
|
||||||
|
|
||||||
// start proxy and listen for user connections, no block
|
// start proxy and listen for user connections, no block
|
||||||
err := s.Start(c)
|
err := s.Start(c)
|
||||||
|
Loading…
Reference in New Issue
Block a user