mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 10:18:54 +00:00
fix(android): on full route dont allow bypass vpn (#6133)
If blocking non-vpn connections `allowBypass` breaks the VPN. To fix this, we disable `allowBypass` when full-route is enable. Fixes #4834 (hopefully)
This commit is contained in:
@@ -314,8 +314,10 @@ class TunnelService : VpnService() {
|
||||
|
||||
private fun buildVpnService(): Int {
|
||||
Builder().apply {
|
||||
// Allow traffic to bypass the VPN interface when Always-on VPN is enabled.
|
||||
allowBypass()
|
||||
if (tunnelRoutes.all { it.prefix != 0 }) {
|
||||
// Allow traffic to bypass the VPN interface when Always-on VPN is enabled.
|
||||
allowBypass()
|
||||
}
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
|
||||
setMetered(false) // Inherit the metered status from the underlying networks.
|
||||
|
||||
Reference in New Issue
Block a user