Compare commits

...

6 Commits

Author SHA1 Message Date
M66B 9030325487 Fixed default roaming option 2024-06-08 17:00:40 +02:00
M66B 836c95e49d Merge branch 'master' of github.com:M66B/NetGuard 2024-06-04 12:34:02 +02:00
M66B 8fa72e48ee Reload on network changed 2024-06-04 12:33:45 +02:00
Marcel Bokhorst feef4c7b3b
Updated FAQ 2024-05-04 08:47:40 +02:00
M66B f050f90e2c RLAH: not La Réunion
https://en.wikipedia.org/wiki/European_Union_roaming_regulations#Areas_not_covered
2024-04-24 08:17:36 +02:00
M66B 1f56b996f5 Improved logging 2024-02-22 18:34:39 +01:00
5 changed files with 10 additions and 4 deletions

2
FAQ.md
View File

@ -37,6 +37,8 @@ However, this does not work properly on all Android versions/variants causing Ne
On Android N and later NetGuard can be configured as [Always-On VPN](https://developer.android.com/guide/topics/connectivity/vpn#always-on).
On Android O **do not** enable the sub option '*Block connections without VPN*', see [question 51](#user-content-faq51)) for more information on this.
The app obviously can't protect you from bugs in Android, such a documented [here](https://mullvad.net/en/blog/dns-traffic-can-leak-outside-the-vpn-tunnel-on-android).
To protect yourself more, remember to disable Wi-Fi and mobile data before rebooting,
and only enable them on reboot, after the firewall service has started (and the key icon is visible in the status bar).

View File

@ -1243,7 +1243,7 @@ public class ServiceSinkhole extends VpnService implements SharedPreferences.OnS
ConnectivityManager cm = (ConnectivityManager) getSystemService(CONNECTIVITY_SERVICE);
Network active = (cm == null ? null : cm.getActiveNetwork());
if (active != null) {
Log.i(TAG, "Setting underlying network=" + cm.getNetworkInfo(active));
Log.i(TAG, "Setting underlying network=" + active + " " + cm.getNetworkInfo(active));
setUnderlyingNetworks(new Network[]{active});
}
}
@ -2619,6 +2619,7 @@ public class ServiceSinkhole extends VpnService implements SharedPreferences.OnS
builder.addCapability(NetworkCapabilities.NET_CAPABILITY_VALIDATED);
ConnectivityManager.NetworkCallback nc = new ConnectivityManager.NetworkCallback() {
private Network last_network = null;
private Boolean last_connected = null;
private Boolean last_metered = null;
private String last_generation = null;
@ -2663,6 +2664,9 @@ public class ServiceSinkhole extends VpnService implements SharedPreferences.OnS
String reason = null;
if (reason == null && !Objects.equals(network, last_network))
reason = "Network changed";
if (reason == null && last_connected != null && !last_connected.equals(connected))
reason = "Connected state changed";
@ -2680,6 +2684,7 @@ public class ServiceSinkhole extends VpnService implements SharedPreferences.OnS
if (reason != null)
reload(reason, ServiceSinkhole.this, false);
last_network = network;
last_connected = connected;
last_metered = metered;
last_generation = generation;

View File

@ -111,7 +111,6 @@ public class Util {
"NO", // Norway
"PL", // Poland
"PT", // Portugal
"RE", // La Réunion
"RO", // Romania
"SK", // Slovakia
"SI", // Slovenia

View File

@ -29,7 +29,7 @@
android:key="screen_other"
android:title="@string/setting_screen_other" />
<CheckBoxPreference
android:defaultValue="false"
android:defaultValue="true"
android:key="whitelist_roaming"
android:title="@string/setting_whitelist_roaming" />
</PreferenceCategory>

View File

@ -29,7 +29,7 @@
android:key="screen_other"
android:title="@string/setting_screen_other" />
<eu.faircode.netguard.SwitchPreference
android:defaultValue="false"
android:defaultValue="true"
android:key="whitelist_roaming"
android:title="@string/setting_whitelist_roaming" />
</PreferenceCategory>