Ln节点可以指定访问IP

This commit is contained in:
刘祥超
2022-08-25 20:37:10 +08:00
parent df9dce76cb
commit 6bb2977d59
5 changed files with 76 additions and 47 deletions

View File

@@ -168,3 +168,16 @@ func (this *Node) DecodeDNSResolver() *nodeconfigs.DNSResolverConfig {
}
return resolverConfig
}
func (this *Node) DecodeLnAddrs() []string {
if IsNull(this.LnAddrs) {
return nil
}
var result = []string{}
err := json.Unmarshal(this.LnAddrs, &result)
if err != nil {
// ignore error
}
return result
}