diff --git a/server/base/config.go b/server/base/config.go index 50f9e28..926729a 100644 --- a/server/base/config.go +++ b/server/base/config.go @@ -33,7 +33,7 @@ var configs = []config{ {Typ: cfgStr, Name: "cert_key", Usage: "证书密钥", ValStr: "./conf/vpn_cert.key"}, {Typ: cfgStr, Name: "files_path", Usage: "外部下载文件路径", ValStr: "./conf/files"}, {Typ: cfgStr, Name: "log_path", Usage: "日志文件路径,默认标准输出", ValStr: ""}, - {Typ: cfgStr, Name: "log_level", Usage: "日志等级 [debug info warn error]", ValStr: "info"}, + {Typ: cfgStr, Name: "log_level", Usage: "日志等级 [debug info warn error]", ValStr: "debug"}, {Typ: cfgBool, Name: "pprof", Usage: "开启pprof", ValBool: false}, {Typ: cfgStr, Name: "issuer", Usage: "系统名称", ValStr: "XX公司VPN"}, {Typ: cfgStr, Name: "admin_user", Usage: "管理用户名", ValStr: "admin"}, diff --git a/server/conf/server.toml b/server/conf/server.toml index e246b10..45e6d10 100644 --- a/server/conf/server.toml +++ b/server/conf/server.toml @@ -26,5 +26,11 @@ server_addr = ":443" admin_addr = ":8800" +#客户端分配的ip地址池 +ipv4_master = "eth0" +ipv4_cidr = "192.168.10.0/24" +ipv4_gateway = "192.168.10.1" +ipv4_start = "192.168.10.100" +ipv4_end = "192.168.10.200" diff --git a/server/handler/link_base.go b/server/handler/link_base.go index 17efbb3..1afcc92 100644 --- a/server/handler/link_base.go +++ b/server/handler/link_base.go @@ -44,6 +44,7 @@ type macAddressList struct { func setCommonHeader(w http.ResponseWriter) { // Content-Length Date 默认已经存在 + w.Header().Set("Server", "AnyLink") w.Header().Set("Content-Type", "text/html; charset=utf-8") w.Header().Set("Cache-Control", "no-store,no-cache") w.Header().Set("Pragma", "no-cache") diff --git a/server/handler/link_home.go b/server/handler/link_home.go index 8359f93..5bab6f6 100644 --- a/server/handler/link_home.go +++ b/server/handler/link_home.go @@ -13,6 +13,7 @@ func LinkHome(w http.ResponseWriter, r *http.Request) { // fmt.Println(r.RemoteAddr) // hu, _ := httputil.DumpRequest(r, true) // fmt.Println("DumpHome: ", string(hu)) + w.Header().Set("Server", "AnyLink") connection := strings.ToLower(r.Header.Get("Connection")) userAgent := strings.ToLower(r.UserAgent()) if connection == "close" && (strings.Contains(userAgent, "anyconnect") || strings.Contains(userAgent, "openconnect")) {