mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2026-02-26 16:57:08 +00:00
fix: skip-auth-prefixes not apply on listeners when users is unset
This commit is contained in:
@@ -127,7 +127,7 @@ func initInnerTcp() {
|
||||
func GetGeneral() *config.General {
|
||||
ports := listener.GetPorts()
|
||||
var authenticator []string
|
||||
if auth := authStore.Authenticator(); auth != nil {
|
||||
if auth := authStore.Default.Authenticator(); auth != nil {
|
||||
authenticator = auth.Users()
|
||||
}
|
||||
|
||||
@@ -422,7 +422,7 @@ func updateGeneral(general *config.General) {
|
||||
|
||||
func updateUsers(users []auth.AuthUser) {
|
||||
authenticator := auth.NewAuthenticator(users)
|
||||
authStore.SetAuthenticator(authenticator)
|
||||
authStore.Default.SetAuthenticator(authenticator)
|
||||
if authenticator != nil {
|
||||
log.Infoln("Authentication of local server updated")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user