mirror of https://github.com/bjdgyc/anylink.git
默认关闭 idle_timeout
This commit is contained in:
parent
b059c555cf
commit
09160a6891
|
@ -59,7 +59,7 @@ var configs = []config{
|
||||||
{Typ: cfgInt, Name: "mobile_keepalive", Usage: "移动端keepalive接检测时间(秒)", ValInt: 40},
|
{Typ: cfgInt, Name: "mobile_keepalive", Usage: "移动端keepalive接检测时间(秒)", ValInt: 40},
|
||||||
{Typ: cfgInt, Name: "mobile_dpd", Usage: "移动端死链接检测时间(秒)", ValInt: 60},
|
{Typ: cfgInt, Name: "mobile_dpd", Usage: "移动端死链接检测时间(秒)", ValInt: 60},
|
||||||
{Typ: cfgInt, Name: "mtu", Usage: "最大传输单元MTU", ValInt: 1460},
|
{Typ: cfgInt, Name: "mtu", Usage: "最大传输单元MTU", ValInt: 1460},
|
||||||
{Typ: cfgInt, Name: "idle_timeout", Usage: "空闲链接超时时间(秒)-超时后断开链接,0关闭此功能", ValInt: 1800},
|
{Typ: cfgInt, Name: "idle_timeout", Usage: "空闲链接超时时间(秒)-超时后断开链接,0关闭此功能", ValInt: 0},
|
||||||
{Typ: cfgInt, Name: "session_timeout", Usage: "session过期时间(秒)-用于断线重连,0永不过期", ValInt: 3600},
|
{Typ: cfgInt, Name: "session_timeout", Usage: "session过期时间(秒)-用于断线重连,0永不过期", ValInt: 3600},
|
||||||
// {Typ: cfgInt, Name: "auth_timeout", Usage: "auth_timeout", ValInt: 0},
|
// {Typ: cfgInt, Name: "auth_timeout", Usage: "auth_timeout", ValInt: 0},
|
||||||
{Typ: cfgInt, Name: "audit_interval", Usage: "审计去重间隔(秒),-1关闭", ValInt: 600},
|
{Typ: cfgInt, Name: "audit_interval", Usage: "审计去重间隔(秒),-1关闭", ValInt: 600},
|
||||||
|
|
|
@ -82,10 +82,10 @@ default_domain = "example.com"
|
||||||
#default_domain = "example.com abc.example.com"
|
#default_domain = "example.com abc.example.com"
|
||||||
|
|
||||||
#空闲链接超时时间(秒)-超时后断开链接,0关闭此功能
|
#空闲链接超时时间(秒)-超时后断开链接,0关闭此功能
|
||||||
idle_timeout = 1800
|
idle_timeout = 0
|
||||||
#session过期时间,用于断线重连,0永不过期
|
#session过期时间,用于断线重连,0永不过期
|
||||||
session_timeout = 3600
|
session_timeout = 3600
|
||||||
auth_timeout = 0
|
#auth_timeout = 0
|
||||||
audit_interval = 600
|
audit_interval = 600
|
||||||
|
|
||||||
show_sql = false
|
show_sql = false
|
||||||
|
|
|
@ -62,7 +62,7 @@ func LinkDtls(conn net.Conn, cSess *sessdata.ConnSession) {
|
||||||
base.Debug("DISCONNECT DTLS", cSess.Username, cSess.IpAddr, conn.RemoteAddr())
|
base.Debug("DISCONNECT DTLS", cSess.Username, cSess.IpAddr, conn.RemoteAddr())
|
||||||
return
|
return
|
||||||
case 0x03: // DPD-REQ
|
case 0x03: // DPD-REQ
|
||||||
base.Trace("recv LinkDtls DPD-REQ", cSess.Username, cSess.IpAddr, conn.RemoteAddr(), n, pl.Data[:n])
|
base.Trace("recv LinkDtls DPD-REQ", cSess.Username, cSess.IpAddr, conn.RemoteAddr(), n, pl.Data[:n], string(pl.Data[1:n]))
|
||||||
pl.PType = 0x04
|
pl.PType = 0x04
|
||||||
// 从零开始 可以直接赋值
|
// 从零开始 可以直接赋值
|
||||||
pl.Data = pl.Data[:n]
|
pl.Data = pl.Data[:n]
|
||||||
|
|
Loading…
Reference in New Issue