refactor: move const to constant pkg (#1205)
This commit is contained in:
@@ -55,4 +55,7 @@ const (
|
||||
|
||||
// ServerTypePseudo is used for ServerInfo.Type, r.Family
|
||||
ServerTypePseudo = "pseudo"
|
||||
|
||||
// DeepSecurity
|
||||
DeepSecurity = "deepsecurity"
|
||||
)
|
||||
|
||||
@@ -357,15 +357,13 @@ func (l *base) detectDeepSecurity() (string, error) {
|
||||
return "", xerrors.Errorf("Failed to detect deepsecurity %s", l.ServerInfo.ServerName)
|
||||
}
|
||||
|
||||
const deepSecurity string = "deepsecurity"
|
||||
|
||||
func (l *base) detectIPS() {
|
||||
ips := map[string]string{}
|
||||
fingerprint, err := l.detectDeepSecurity()
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
ips[deepSecurity] = fingerprint
|
||||
ips[constant.DeepSecurity] = fingerprint
|
||||
l.ServerInfo.IPSIdentifiers = ips
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user