mirror of
https://github.com/yhl452493373/frpc-panel.git
synced 2026-04-04 06:17:00 +08:00
sort by proxy type and name when reloading frpc config
This commit is contained in:
@@ -179,8 +179,6 @@ func (c *HandleController) MakeAddProxyFunc() func(context *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
delete(proxy, NameKey)
|
||||
delete(proxy, OldNameKey)
|
||||
clientProxies[name] = proxy
|
||||
|
||||
res := c.UpdateFrpcConfig()
|
||||
@@ -249,8 +247,6 @@ func (c *HandleController) MakeUpdateProxyFunc() func(context *gin.Context) {
|
||||
}
|
||||
}
|
||||
|
||||
delete(proxy, NameKey)
|
||||
delete(proxy, OldNameKey)
|
||||
delete(clientProxies, oldName)
|
||||
clientProxies[name] = proxy
|
||||
|
||||
@@ -369,8 +365,9 @@ func (c *HandleController) MakeProxyFunc() func(context *gin.Context) {
|
||||
|
||||
func (c *HandleController) UpdateFrpcConfig() ProxyResponse {
|
||||
res := ProxyResponse{}
|
||||
|
||||
requestUrl := c.buildRequestUrl("/api/config")
|
||||
request, _ := http.NewRequest("PUT", requestUrl, bytes.NewReader(serializeSectionsToString()))
|
||||
request, _ := http.NewRequest("PUT", requestUrl, bytes.NewReader(serializeSections()))
|
||||
response, err := c.getClientResponse(request, c.buildClient())
|
||||
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user