mirror of https://github.com/oxen-io/lokinet
format
This commit is contained in:
parent
2ee43c2162
commit
344d0a2f2d
|
@ -61,14 +61,17 @@ llarp_apple_init(llarp_apple_config* appleconf)
|
|||
if (addr.size() > 15 || mask.size() > 15)
|
||||
throw std::runtime_error{"Unexpected non-IPv4 tunnel range configured"};
|
||||
std::strncpy(appleconf->tunnel_ipv4_ip, addr.c_str(), sizeof(appleconf->tunnel_ipv4_ip));
|
||||
std::strncpy(appleconf->tunnel_ipv4_netmask, mask.c_str(), sizeof(appleconf->tunnel_ipv4_netmask));
|
||||
std::strncpy(
|
||||
appleconf->tunnel_ipv4_netmask, mask.c_str(), sizeof(appleconf->tunnel_ipv4_netmask));
|
||||
|
||||
// TODO: in the future we want to do this properly with our pubkey (see issue #1705), but that's
|
||||
// going to take a bit more work because we currently can't *get* the (usually) ephemeral pubkey
|
||||
// at this stage of lokinet configuration. So for now we just stick our IPv4 address into it
|
||||
// until #1705 gets implemented.
|
||||
llarp::huint128_t ipv6{llarp::uint128_t{0xfd2e'6c6f'6b69'0000, llarp::net::TruncateV6(range.addr).h}};
|
||||
std::strncpy(appleconf->tunnel_ipv6_ip, ipv6.ToString().c_str(), sizeof(appleconf->tunnel_ipv6_ip));
|
||||
llarp::huint128_t ipv6{
|
||||
llarp::uint128_t{0xfd2e'6c6f'6b69'0000, llarp::net::TruncateV6(range.addr).h}};
|
||||
std::strncpy(
|
||||
appleconf->tunnel_ipv6_ip, ipv6.ToString().c_str(), sizeof(appleconf->tunnel_ipv6_ip));
|
||||
appleconf->tunnel_ipv6_prefix = 48;
|
||||
|
||||
appleconf->upstream_dns[0] = '\0';
|
||||
|
|
Loading…
Reference in New Issue