单个节点支持多个DNS线路

This commit is contained in:
刘祥超
2020-11-16 13:03:20 +08:00
parent 5ef3e4acaf
commit b331cb71b0
6 changed files with 131 additions and 78 deletions

View File

@@ -629,12 +629,12 @@ func (this *NodeDAO) FindEnabledNodeDNS(nodeId int64) (*Node, error) {
}
// 修改节点的DNS信息
func (this *NodeDAO) UpdateNodeDNS(nodeId int64, routes map[int64]string) error {
func (this *NodeDAO) UpdateNodeDNS(nodeId int64, routes map[int64][]string) error {
if nodeId <= 0 {
return errors.New("invalid nodeId")
}
if routes == nil {
routes = map[int64]string{}
routes = map[int64][]string{}
}
routesJSON, err := json.Marshal(routes)
if err != nil {