fix: auth plugin diff

This commit is contained in:
VaalaCat
2025-12-10 14:16:30 +00:00
parent 192f7c1e32
commit 10f190b440
2 changed files with 4 additions and 4 deletions

View File

@@ -45,6 +45,8 @@ func PullConfig(appInstance app.Application, serverID, serverSecret string) erro
ctrl := appInstance.GetServerController()
InjectAuthPlugin(ctx, s)
if t := ctrl.Get(serverID); t != nil {
if !reflect.DeepEqual(t.GetCommonCfg(), s) {
t.Stop()
@@ -56,8 +58,6 @@ func PullConfig(appInstance app.Application, serverID, serverSecret string) erro
}
}
InjectAuthPlugin(ctx, s)
ctrl.Add(serverID, server.NewServerHandler(s))
ctrl.Run(serverID)

View File

@@ -24,6 +24,8 @@ func UpdateFrpsHander(ctx *app.Context, req *pb.UpdateFRPSRequest) (*pb.UpdateFR
}, err
}
InjectAuthPlugin(ctx, s)
serverID := req.GetServerId()
if cli := ctx.GetApp().GetServerController().Get(serverID); cli != nil {
if !reflect.DeepEqual(cli.GetCommonCfg(), s) {
@@ -38,8 +40,6 @@ func UpdateFrpsHander(ctx *app.Context, req *pb.UpdateFRPSRequest) (*pb.UpdateFR
}
}
InjectAuthPlugin(ctx, s)
ctx.GetApp().GetServerController().Add(serverID, server.NewServerHandler(s))
ctx.GetApp().GetServerController().Run(serverID)