mirror of
https://github.com/bjdgyc/anylink.git
synced 2025-09-13 06:17:19 +08:00
优化证书认证逻辑,增加回退用户认证功能,可选仅证书认证
This commit is contained in:
@@ -47,7 +47,8 @@ type ServerConfig struct {
|
||||
DbSource string `json:"db_source"`
|
||||
CertFile string `json:"cert_file"`
|
||||
CertKey string `json:"cert_key"`
|
||||
AuthAloneCert bool `json:"auth_alone_cert"`
|
||||
AuthCert bool `json:"auth_cert"`
|
||||
AuthOnlyCert bool `json:"auth_only_cert"`
|
||||
ClientCertCAFile string `json:"client_ca_file"`
|
||||
ClientCertCAKeyFile string `json:"client_ca_key_file"`
|
||||
FilesPath string `json:"files_path"`
|
||||
|
@@ -33,7 +33,8 @@ var configs = []config{
|
||||
{Typ: cfgStr, Name: "db_source", Usage: "数据库source", ValStr: "./conf/anylink.db"},
|
||||
{Typ: cfgStr, Name: "cert_file", Usage: "证书文件", ValStr: "./conf/vpn_cert.pem"},
|
||||
{Typ: cfgStr, Name: "cert_key", Usage: "证书密钥", ValStr: "./conf/vpn_cert.key"},
|
||||
{Typ: cfgBool, Name: "auth_alone_cert", Usage: "启用独立证书验证", ValBool: false},
|
||||
{Typ: cfgBool, Name: "auth_cert", Usage: "启用证书验证", ValBool: false},
|
||||
{Typ: cfgBool, Name: "auth_only_cert", Usage: "仅证书验证", ValBool: false},
|
||||
{Typ: cfgStr, Name: "client_ca_file", Usage: "客户端证书CA证书", ValStr: "./conf/client_ca.pem"},
|
||||
{Typ: cfgStr, Name: "client_ca_key_file", Usage: "客户端证书CA密钥", ValStr: "./conf/client_ca.key"},
|
||||
{Typ: cfgStr, Name: "files_path", Usage: "外部下载文件路径", ValStr: "./conf/files"},
|
||||
|
Reference in New Issue
Block a user