mirror of https://github.com/M66B/NetGuard.git
Compare commits
6 Commits
Author | SHA1 | Date |
---|---|---|
M66B | 9030325487 | |
M66B | 836c95e49d | |
M66B | 8fa72e48ee | |
Marcel Bokhorst | feef4c7b3b | |
M66B | f050f90e2c | |
M66B | 1f56b996f5 |
2
FAQ.md
2
FAQ.md
|
@ -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).
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -111,7 +111,6 @@ public class Util {
|
|||
"NO", // Norway
|
||||
"PL", // Poland
|
||||
"PT", // Portugal
|
||||
"RE", // La Réunion
|
||||
"RO", // Romania
|
||||
"SK", // Slovakia
|
||||
"SI", // Slovenia
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue