mirror of https://github.com/bjdgyc/anylink.git
增加加密保存用户密码开关
This commit is contained in:
parent
38781eab8c
commit
33b2c4890b
|
@ -2,11 +2,12 @@ package base
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/bjdgyc/anylink/pkg/utils"
|
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"reflect"
|
"reflect"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"github.com/bjdgyc/anylink/pkg/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -85,9 +86,10 @@ type ServerConfig struct {
|
||||||
Compression bool `json:"compression"` // bool
|
Compression bool `json:"compression"` // bool
|
||||||
NoCompressLimit int `json:"no_compress_limit"` // int
|
NoCompressLimit int `json:"no_compress_limit"` // int
|
||||||
|
|
||||||
DisplayError bool `json:"display_error"`
|
DisplayError bool `json:"display_error"`
|
||||||
ExcludeExportIp bool `json:"exclude_export_ip"`
|
ExcludeExportIp bool `json:"exclude_export_ip"`
|
||||||
AuthAloneOtp bool `json:"auth_alone_otp"`
|
AuthAloneOtp bool `json:"auth_alone_otp"`
|
||||||
|
EncryptionPassword bool `json:"encryption_password"`
|
||||||
|
|
||||||
AntiBruteForce bool `json:"anti_brute_force"`
|
AntiBruteForce bool `json:"anti_brute_force"`
|
||||||
IPWhitelist string `json:"ip_whitelist"`
|
IPWhitelist string `json:"ip_whitelist"`
|
||||||
|
|
|
@ -73,6 +73,7 @@ var configs = []config{
|
||||||
{Typ: cfgBool, Name: "display_error", Usage: "客户端显示详细错误信息(线上环境慎开启)", ValBool: false},
|
{Typ: cfgBool, Name: "display_error", Usage: "客户端显示详细错误信息(线上环境慎开启)", ValBool: false},
|
||||||
{Typ: cfgBool, Name: "exclude_export_ip", Usage: "排除出口ip路由(出口ip不加密传输)", ValBool: true},
|
{Typ: cfgBool, Name: "exclude_export_ip", Usage: "排除出口ip路由(出口ip不加密传输)", ValBool: true},
|
||||||
{Typ: cfgBool, Name: "auth_alone_otp", Usage: "登录单独验证OTP窗口", ValBool: false},
|
{Typ: cfgBool, Name: "auth_alone_otp", Usage: "登录单独验证OTP窗口", ValBool: false},
|
||||||
|
{Typ: cfgBool, Name: "encryption_password", Usage: "用户密码是否加密保存", ValBool: false},
|
||||||
|
|
||||||
{Typ: cfgBool, Name: "anti_brute_force", Usage: "是否开启防爆功能", ValBool: true},
|
{Typ: cfgBool, Name: "anti_brute_force", Usage: "是否开启防爆功能", ValBool: true},
|
||||||
{Typ: cfgStr, Name: "ip_whitelist", Usage: "全局IP白名单,多个用逗号分隔,支持单IP和CIDR范围", ValStr: "192.168.90.1,172.16.0.0/24"},
|
{Typ: cfgStr, Name: "ip_whitelist", Usage: "全局IP白名单,多个用逗号分隔,支持单IP和CIDR范围", ValStr: "192.168.90.1,172.16.0.0/24"},
|
||||||
|
|
|
@ -117,6 +117,8 @@ exclude_export_ip = true
|
||||||
#登录单独验证OTP窗口
|
#登录单独验证OTP窗口
|
||||||
auth_alone_otp = false
|
auth_alone_otp = false
|
||||||
|
|
||||||
|
#加密保存用户密码
|
||||||
|
encryption_password = false
|
||||||
|
|
||||||
#防爆破全局开关
|
#防爆破全局开关
|
||||||
anti_brute_force = true
|
anti_brute_force = true
|
||||||
|
@ -147,6 +149,3 @@ global_ip_lock_time = 300
|
||||||
|
|
||||||
#全局锁定状态的保存生命周期(秒),超过则删除记录
|
#全局锁定状态的保存生命周期(秒),超过则删除记录
|
||||||
global_lock_state_expiration_time = 3600
|
global_lock_state_expiration_time = 3600
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue