mirror of
https://github.com/fatedier/frp.git
synced 2024-12-13 10:11:04 +01:00
fix xtcp cmd
This commit is contained in:
parent
3cf83f57a8
commit
ba45d29b7c
@ -280,6 +280,8 @@ func (sv *XtcpVisitor) handleConn(userConn frpNet.Conn) {
|
|||||||
sv.Error("listen on visitorConn's local adress error: %v", err)
|
sv.Error("listen on visitorConn's local adress error: %v", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
defer lConn.Close()
|
||||||
|
|
||||||
lConn.SetReadDeadline(time.Now().Add(5 * time.Second))
|
lConn.SetReadDeadline(time.Now().Add(5 * time.Second))
|
||||||
sidBuf := pool.GetBuf(1024)
|
sidBuf := pool.GetBuf(1024)
|
||||||
n, _, err = lConn.ReadFromUDP(sidBuf)
|
n, _, err = lConn.ReadFromUDP(sidBuf)
|
||||||
|
@ -68,7 +68,7 @@ var xtcpCmd = &cobra.Command{
|
|||||||
if role == "server" {
|
if role == "server" {
|
||||||
cfg := &config.XtcpProxyConf{}
|
cfg := &config.XtcpProxyConf{}
|
||||||
cfg.ProxyName = prefix + proxyName
|
cfg.ProxyName = prefix + proxyName
|
||||||
cfg.ProxyType = consts.StcpProxy
|
cfg.ProxyType = consts.XtcpProxy
|
||||||
cfg.UseEncryption = useEncryption
|
cfg.UseEncryption = useEncryption
|
||||||
cfg.UseCompression = useCompression
|
cfg.UseCompression = useCompression
|
||||||
cfg.Role = role
|
cfg.Role = role
|
||||||
@ -84,7 +84,7 @@ var xtcpCmd = &cobra.Command{
|
|||||||
} else if role == "visitor" {
|
} else if role == "visitor" {
|
||||||
cfg := &config.XtcpVisitorConf{}
|
cfg := &config.XtcpVisitorConf{}
|
||||||
cfg.ProxyName = prefix + proxyName
|
cfg.ProxyName = prefix + proxyName
|
||||||
cfg.ProxyType = consts.StcpProxy
|
cfg.ProxyType = consts.XtcpProxy
|
||||||
cfg.UseEncryption = useEncryption
|
cfg.UseEncryption = useEncryption
|
||||||
cfg.UseCompression = useCompression
|
cfg.UseCompression = useCompression
|
||||||
cfg.Role = role
|
cfg.Role = role
|
||||||
|
Loading…
Reference in New Issue
Block a user