File tree Expand file tree Collapse file tree
core/src/main/java/net/ivpn/core/vpn/wireguard Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -260,7 +260,7 @@ class ConfigManager @Inject constructor(
260260 val peer = Peer ().also {
261261 // uses same AllowedIPs for both single-hop and multi-hop to disable wg's internal firewall
262262 // Android VPN service handles routing, so we need to disable WireGuard's firewall
263- it.setAllowedIPsString(" 128 .0.0.0/1, 0.0.0.0/1 " )
263+ it.setAllowedIPsString(" 0 .0.0.0/0, ::/0 " )
264264 it.setEndpointString(endpoint)
265265 it.publicKey = peerHost.publicKey
266266 }
@@ -297,8 +297,12 @@ class ConfigManager @Inject constructor(
297297
298298 val entryHost = hosts[0 ]
299299 val localIPv6AddressForEntry = entryHost.ipv6.local_ip
300- config.getInterface()
301- .setAddressString(" $ipAddress ,${localIPv6AddressForEntry} " )
300+ val ipv4OnlyAddress = ipAddress?.split(" /" )?.get(0 ) ? : ipAddress
301+ val ipv6Prefix = localIPv6AddressForEntry?.split(" /" )?.get(0 ) ? : " "
302+ val combinedAddresses = " $ipAddress /32,${ipv6Prefix}${ipv4OnlyAddress} /128"
303+
304+ LOGGER .info(" Setting IPv6 addresses: $combinedAddresses " )
305+ config.getInterface().setAddressString(combinedAddresses)
302306 }
303307
304308 private fun getDNS (host : Host ): String {
You can’t perform that action at this time.
0 commit comments