mirror of
https://gitee.com/IrisVega/frp.git
synced 2024-11-01 22:31:29 +08:00
format代码
This commit is contained in:
parent
04c26d1c31
commit
60c9804776
1
.gitignore
vendored
1
.gitignore
vendored
@ -28,3 +28,4 @@ bin/
|
|||||||
|
|
||||||
# Cache
|
# Cache
|
||||||
*.swp
|
*.swp
|
||||||
|
*.swo
|
||||||
|
@ -3,8 +3,8 @@ package main
|
|||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"frp/pkg/utils/log"
|
|
||||||
"frp/pkg/utils/conn"
|
"frp/pkg/utils/conn"
|
||||||
|
"frp/pkg/utils/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
@ -24,7 +24,7 @@ func (p *ProxyClient) GetLocalConn() (c *conn.Conn, err error) {
|
|||||||
|
|
||||||
func (p *ProxyClient) GetRemoteConn(addr string, port int64) (c *conn.Conn, err error) {
|
func (p *ProxyClient) GetRemoteConn(addr string, port int64) (c *conn.Conn, err error) {
|
||||||
c = &conn.Conn{}
|
c = &conn.Conn{}
|
||||||
defer func(){
|
defer func() {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
c.Close()
|
c.Close()
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,6 @@ type ClientCtlRes struct {
|
|||||||
GeneralRes
|
GeneralRes
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
type ServerCtlReq struct {
|
type ServerCtlReq struct {
|
||||||
Type int64 `json:"type"`
|
Type int64 `json:"type"`
|
||||||
}
|
}
|
||||||
|
@ -89,6 +89,7 @@ func (p *ProxyServer) Start() (err error) {
|
|||||||
p.UserConnList.Remove(element)
|
p.UserConnList.Remove(element)
|
||||||
} else {
|
} else {
|
||||||
cliConn.Close()
|
cliConn.Close()
|
||||||
|
p.Unlock()
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
p.Unlock()
|
p.Unlock()
|
||||||
|
@ -22,7 +22,7 @@ func SetLogFile(logWay string, logFile string) {
|
|||||||
if logWay == "console" {
|
if logWay == "console" {
|
||||||
Log.SetLogger("console", "")
|
Log.SetLogger("console", "")
|
||||||
} else {
|
} else {
|
||||||
Log.SetLogger("file", `{"filename": "` + logFile + `"}`)
|
Log.SetLogger("file", `{"filename": "`+logFile+`"}`)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user