some wg & cli & README improve (#47)

1. fix vpn client cannot access local node
2. fix wg client config no allowedip field
3. some cli & README improve
This commit is contained in:
Sijie.Sun
2024-04-03 22:22:44 +08:00
committed by GitHub
parent e4be86cf92
commit 892b06dfd3
5 changed files with 32 additions and 11 deletions
+5 -1
View File
@@ -232,7 +232,11 @@ impl VpnPortal for WireGuard {
.map(|x| x.proxy_cidrs.iter().map(String::to_string))
.flatten()
.collect::<Vec<_>>();
for ipv4 in routes.iter().map(|x| &x.ipv4_addr) {
for ipv4 in routes
.iter()
.map(|x| x.ipv4_addr.clone())
.chain(global_ctx.get_ipv4().iter().map(|x| x.to_string()))
{
let Ok(ipv4) = ipv4.parse() else {
continue;
};