From 70f3e46ef7a7a54d8105de3288bd05378fd8973d Mon Sep 17 00:00:00 2001 From: bjdgyc Date: Tue, 23 Jan 2024 14:28:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=85=8D=E7=BD=AE=E5=8F=82?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/base/config.go | 12 ++++++------ server/conf/server-sample.toml | 13 +++++++------ server/conf/server.toml | 2 +- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/server/base/config.go b/server/base/config.go index 13c02c1c..61a5a556 100644 --- a/server/base/config.go +++ b/server/base/config.go @@ -22,9 +22,9 @@ type config struct { var configs = []config{ {Typ: cfgStr, Name: "conf", Usage: "config file", ValStr: "./conf/server.toml", Short: "c"}, {Typ: cfgStr, Name: "profile", Usage: "profile.xml file", ValStr: "./conf/profile.xml"}, - {Typ: cfgStr, Name: "server_addr", Usage: "服务监听地址", ValStr: ":443"}, + {Typ: cfgStr, Name: "server_addr", Usage: "TCP服务监听地址(任意端口)", ValStr: ":443"}, {Typ: cfgBool, Name: "server_dtls", Usage: "开启DTLS", ValBool: false}, - {Typ: cfgStr, Name: "server_dtls_addr", Usage: "DTLS监听地址", ValStr: ":443"}, + {Typ: cfgStr, Name: "server_dtls_addr", Usage: "DTLS监听地址(任意端口)", ValStr: ":443"}, {Typ: cfgStr, Name: "admin_addr", Usage: "后台服务监听地址", ValStr: ":8800"}, {Typ: cfgBool, Name: "proxy_protocol", Usage: "TCP代理协议", ValBool: false}, {Typ: cfgStr, Name: "db_type", Usage: "数据库类型 [sqlite3 mysql postgres]", ValStr: "sqlite3"}, @@ -53,10 +53,10 @@ var configs = []config{ {Typ: cfgInt, Name: "ip_lease", Usage: "IP租期(秒)", ValInt: 86400}, {Typ: cfgInt, Name: "max_client", Usage: "最大用户连接", ValInt: 200}, {Typ: cfgInt, Name: "max_user_client", Usage: "最大单用户连接", ValInt: 3}, - {Typ: cfgInt, Name: "cstp_keepalive", Usage: "keepalive时间(秒)", ValInt: 4}, - {Typ: cfgInt, Name: "cstp_dpd", Usage: "死链接检测时间(秒)", ValInt: 9}, - {Typ: cfgInt, Name: "mobile_keepalive", Usage: "移动端keepalive接检测时间(秒)", ValInt: 7}, - {Typ: cfgInt, Name: "mobile_dpd", Usage: "移动端死链接检测时间(秒)", ValInt: 15}, + {Typ: cfgInt, Name: "cstp_keepalive", Usage: "keepalive时间(秒)", ValInt: 5}, + {Typ: cfgInt, Name: "cstp_dpd", Usage: "死链接检测时间(秒)", ValInt: 12}, + {Typ: cfgInt, Name: "mobile_keepalive", Usage: "移动端keepalive接检测时间(秒)", ValInt: 10}, + {Typ: cfgInt, Name: "mobile_dpd", Usage: "移动端死链接检测时间(秒)", ValInt: 22}, {Typ: cfgInt, Name: "mtu", Usage: "最大传输单元MTU", ValInt: 1460}, {Typ: cfgInt, Name: "idle_timeout", Usage: "空闲链接超时时间(秒)-超时后断开链接,0关闭此功能", ValInt: 7200}, {Typ: cfgInt, Name: "session_timeout", Usage: "session过期时间(秒)-用于断线重连,0永不过期", ValInt: 3600}, diff --git a/server/conf/server-sample.toml b/server/conf/server-sample.toml index ac97a40a..76686f8a 100644 --- a/server/conf/server-sample.toml +++ b/server/conf/server-sample.toml @@ -29,10 +29,11 @@ admin_otp = "" jwt_secret = "abcdef.0123456789.abcdef" -#服务监听地址 +#TCP服务监听地址(任意端口) server_addr = ":443" #开启 DTLS, 默认关闭 server_dtls = false +#UDP监听地址(任意端口) server_dtls_addr = ":443" #后台服务监听地址 admin_addr = ":8800" @@ -49,7 +50,7 @@ ipv4_start = "192.168.90.100" ipv4_end = "192.168.90.200" #最大客户端数量 -max_client = 100 +max_client = 200 #单个用户同时在线数量 max_user_client = 3 #IP租期(秒) @@ -59,10 +60,10 @@ ip_lease = 86400 default_group = "one" #客户端失效检测时间(秒) dpd > keepalive -cstp_keepalive = 6 -cstp_dpd = 10 -mobile_keepalive = 15 -mobile_dpd = 20 +cstp_keepalive = 5 +cstp_dpd = 12 +mobile_keepalive = 10 +mobile_dpd = 22 #设置最大传输单元 mtu = 1460 diff --git a/server/conf/server.toml b/server/conf/server.toml index 40f22132..b56410c5 100644 --- a/server/conf/server.toml +++ b/server/conf/server.toml @@ -23,7 +23,7 @@ admin_pass = "$2a$10$UQ7C.EoPifDeJh6d8.31TeSPQU7hM/NOM2nixmBucJpAuXDQNqNke" admin_otp = "" jwt_secret = "abcdef.0123456789.abcdef" -#服务监听地址 +#TCP服务监听地址(任意端口) server_addr = ":443" #后台服务监听地址 admin_addr = ":8800"