This commit is contained in:
cdle
2023-07-06 10:03:32 +08:00
parent 2f38b8393e
commit 22c47b5d8a
6 changed files with 9 additions and 6 deletions
+1 -1
View File
@@ -8,6 +8,6 @@
</head>
<body>
<div id="root"></div>
<script src="/admin/umi.37bf7c95.js"></script>
<script src="/admin/umi.6114f405.js"></script>
</body></html>
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+5 -2
View File
@@ -168,13 +168,16 @@ func init() {
// }
// var nkey = ProxyKey{}
var ncfg = ProxyConfig{}
var params = map[string]interface{}{}
if new == "" { //删除逻辑
Proxies.Delete(key)
return nil
}
if strings.HasPrefix(new, "o:") {
err := json.Unmarshal([]byte(strings.Replace(new, "o:", "", 1)), &ncfg)
var data = []byte(strings.Replace(new, "o:", "", 1))
err := json.Unmarshal(data, &ncfg)
json.Unmarshal(data, &params)
if err != nil {
return &storage.Final{
Error: err,
@@ -200,7 +203,7 @@ func init() {
Error: errors.New("不支持的代理匹配规则:" + err.Error()),
}
}
p, err := adapter.ParseProxy(structToMap(ncfg))
p, err := adapter.ParseProxy(params)
if err != nil {
return &storage.Final{
Error: err,