mirror of
https://mirror.suhoan.cn/https://github.com/EasyTier/EasyTier.git
synced 2025-12-12 12:47:25 +08:00
fix rpc_portal_whitelist from config file not working (#1042)
This commit is contained in:
@@ -670,7 +670,13 @@ impl NetworkOptions {
|
||||
};
|
||||
cfg.set_rpc_portal(rpc_portal);
|
||||
|
||||
cfg.set_rpc_portal_whitelist(self.rpc_portal_whitelist.clone());
|
||||
if let Some(rpc_portal_whitelist) = &self.rpc_portal_whitelist {
|
||||
let mut whitelist = cfg.get_rpc_portal_whitelist().unwrap_or_else(|| Vec::new());
|
||||
for cidr in rpc_portal_whitelist {
|
||||
whitelist.push((*cidr).clone());
|
||||
}
|
||||
cfg.set_rpc_portal_whitelist(Some(whitelist));
|
||||
}
|
||||
|
||||
if let Some(external_nodes) = self.external_node.as_ref() {
|
||||
let mut old_peers = cfg.get_peers();
|
||||
|
||||
Reference in New Issue
Block a user