mirror of
https://github.com/bjdgyc/anylink.git
synced 2025-09-26 14:23:03 +08:00
修复邮件发送密码为密文密码的Bug
随机生成的密码打印到日志 邮件通知发送明文密码 清理代码
This commit is contained in:
@@ -2,11 +2,12 @@ package base
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/bjdgyc/anylink/pkg/utils"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"reflect"
|
||||
"strings"
|
||||
|
||||
"github.com/bjdgyc/anylink/pkg/utils"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -85,9 +86,10 @@ type ServerConfig struct {
|
||||
Compression bool `json:"compression"` // bool
|
||||
NoCompressLimit int `json:"no_compress_limit"` // int
|
||||
|
||||
DisplayError bool `json:"display_error"`
|
||||
ExcludeExportIp bool `json:"exclude_export_ip"`
|
||||
AuthAloneOtp bool `json:"auth_alone_otp"`
|
||||
DisplayError bool `json:"display_error"`
|
||||
ExcludeExportIp bool `json:"exclude_export_ip"`
|
||||
AuthAloneOtp bool `json:"auth_alone_otp"`
|
||||
EncryptionPassword bool `json:"encryption_password"`
|
||||
|
||||
AntiBruteForce bool `json:"anti_brute_force"`
|
||||
IPWhitelist string `json:"ip_whitelist"`
|
||||
|
@@ -73,6 +73,7 @@ var configs = []config{
|
||||
{Typ: cfgBool, Name: "display_error", Usage: "客户端显示详细错误信息(线上环境慎开启)", ValBool: false},
|
||||
{Typ: cfgBool, Name: "exclude_export_ip", Usage: "排除出口ip路由(出口ip不加密传输)", ValBool: true},
|
||||
{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: cfgStr, Name: "ip_whitelist", Usage: "全局IP白名单,多个用逗号分隔,支持单IP和CIDR范围", ValStr: "192.168.90.1,172.16.0.0/24"},
|
||||
|
Reference in New Issue
Block a user