NetGuard/README.md

252 lines
10 KiB
Markdown
Raw Normal View History

2015-10-24 17:59:20 +00:00
# NetGuard
2015-10-24 18:01:55 +00:00
*NetGuard* provides a simple way to block access to the internet - no root required.
2015-11-01 08:40:27 +00:00
Applications can individually be allowed or denied access to your WiFi and/or mobile connection.
2015-10-29 10:03:14 +00:00
Blocking access to the internet can help:
2015-11-01 08:40:27 +00:00
* reduce your data usage
2015-10-29 10:03:14 +00:00
* save your battery
* increase your privacy
2015-10-25 12:02:25 +00:00
2015-11-07 18:11:43 +00:00
NetGuard is possibly the first free and open source no-root firewall for Android.
2015-10-31 10:46:50 +00:00
Downloads:
* [GitHub](https://github.com/M66B/NetGuard/releases)
2015-11-06 05:58:00 +00:00
* [Play store](https://play.google.com/store/apps/details?id=eu.faircode.netguard) (stable)
2015-10-31 10:46:50 +00:00
* [Play store](https://play.google.com/apps/testing/eu.faircode.netguard) (beta)
2015-11-01 07:33:03 +00:00
* [F-Droid](https://f-droid.org/repository/browse/?fdfilter=netguard&fdid=eu.faircode.netguard) (unsupported, often outdated)
2015-11-10 17:16:35 +00:00
* [XDA Labs](http://forum.xda-developers.com/android/apps-games/labs-t3241866) ([web page](https://labs.xda-developers.com/store/app/eu.faircode.netguard))
2015-10-31 10:46:50 +00:00
2015-11-06 21:00:26 +00:00
<img src="screenshot1.png" width="320" height="569" />
<img src="screenshot2.png" width="320" height="569" />
2015-10-25 12:48:35 +00:00
2015-10-25 13:21:14 +00:00
Features
--------
* No root required
* Simple to use
* Free of charge
* Open source
* No extra battery usage
2015-11-05 12:14:34 +00:00
* No bandwidth reduction
2015-10-25 13:21:14 +00:00
* No calling home
* No tracking or analytics
2015-10-25 13:21:14 +00:00
* No ads
2015-11-08 09:14:56 +00:00
* No internet permission required
2015-10-26 12:43:37 +00:00
* IPv4/IPv6 TCP/UDP supported
2015-11-09 11:23:06 +00:00
* Optionally allow when screen on
* Optionally block when roaming
2015-11-09 11:23:06 +00:00
* Optionally block system applications
2015-11-08 13:34:00 +00:00
* Material design
2015-10-25 13:21:14 +00:00
2015-10-29 06:46:05 +00:00
Most of these features are the result of sending selected traffic to a sinkhole, instead of filtering all internet traffic.
2015-11-01 08:40:27 +00:00
This means that advanced features, like address based filtering (needed for ad blocking), traffic logging, and on-demand configuration, are not possible.
2015-10-29 06:46:05 +00:00
Routing selected traffic into a sinkhole relies on an API introduced in Android 5.0 (Lollipop),
therefore older Android versions unfortunately cannot be supported.
2015-10-29 06:46:05 +00:00
2015-10-25 13:06:16 +00:00
Usage
-----
* Enable the firewall using the switch in the action bar
* Allow/deny WiFi/mobile internet access using the icons along the right side of the application list
2015-10-25 12:02:25 +00:00
2015-10-25 13:21:14 +00:00
Permissions
-----------
* ACCESS_NETWORK_STATE: to check if the device is connected to the internet through WiFi
2015-11-01 08:40:27 +00:00
* RECEIVE_BOOT_COMPLETED: to start the firewall when booting the device
2015-11-10 17:21:11 +00:00
* WAKE_LOCK: to reliably reload rules in the background on connectivity changes
* com.android.vending.BILLING: to accept donations via in-app billing
2015-10-25 13:21:14 +00:00
Compatibility
-------------
Devices / ROMs with a broken VPN implementation:
* [Samsung Galaxy A5 / Android 5.02](https://github.com/M66B/NetGuard/issues/20) (all traffic blocked)
2015-11-02 18:40:07 +00:00
* Asus ZenFone 2 / Android 5.0.2/5.1.1, reported on XDA (all traffic blocked)
2015-11-02 18:40:07 +00:00
NetGuard will crash when the package *com.android.vpndialogs* has been removed or otherwise is unavailable.
2015-11-03 09:44:34 +00:00
Tethering will not work when NetGuard is enabled due to a bug in Android ([issue](https://github.com/M66B/NetGuard/issues/42)).
2015-11-02 19:20:06 +00:00
[Greenifying](https://play.google.com/store/apps/details?id=com.oasisfeng.greenify) NetGuard will result in rules not being applied
when connectivity changes from WiFi/mobile, passive/active, and roaming/not roaming.
2015-11-02 19:20:06 +00:00
Frequently Asked Questions (FAQ)
--------------------------------
2015-10-25 12:13:52 +00:00
<a name="FAQ1"></a>
2015-10-26 09:38:53 +00:00
**(1) Can NetGuard completely protect my privacy?**
2015-10-25 12:13:52 +00:00
2015-10-26 09:38:53 +00:00
No - nothing can completely protect your privacy.
NetGuard will do its best, but it is limited by the fact it must use the VPN service.
This is the trade-off required to make a firewall which does not require root access.
2015-10-26 13:32:14 +00:00
The firewall can only start when Android "allows" it to start,
so it will not offer protection during early boot-up (although your network may not be loaded at that time).
It will, however, be much better than nothing, especially if you are not rebooting often.
2015-10-26 09:38:53 +00:00
If you want to protect yourself more, you can (at least in theory) disable WiFi and mobile data before rebooting,
2015-10-26 09:38:53 +00:00
and only enable them on reboot, after the firewall service has started (and the small key icon is visible in the status bar).
Thanks @[pulser](https://github.com/pulser/)
2015-10-25 12:13:52 +00:00
2015-10-25 13:25:42 +00:00
<a name="FAQ2"></a>
**(2) Can I use VPN applications while using NetGuard?**
2015-10-25 13:49:56 +00:00
If the VPN application is using the [VPN service](http://developer.android.com/reference/android/net/VpnService.html),
then no, because NetGuard needs to use this service. Android allows only one application at a time to use this service.
2015-10-25 12:13:52 +00:00
2015-10-25 13:49:56 +00:00
<a name="FAQ3"></a>
**(3) Can I use NetGuard on any Android version?**
No, the minimum required Android version is 5.0 (Lollipop) because NetGuard uses the [addDisallowedApplication](http://developer.android.com/reference/android/net/VpnService.Builder.html#addDisallowedApplication(java.lang.String))
method.
2015-10-25 13:49:56 +00:00
2015-10-25 15:36:14 +00:00
<a name="FAQ4"></a>
**(4) Will NetGuard use extra battery power?**
No, unlike most of the similar closed source alternatives.
2015-10-26 16:47:31 +00:00
<a name="FAQ5"></a>
2015-10-28 21:07:49 +00:00
**(5) Can you add selective allowing/blocking applications/IP addresses?**
2015-10-26 16:45:52 +00:00
Unfortunately, this is not possible without using significant battery power
2015-11-01 08:40:27 +00:00
and adding complex code to do network translation from OSI layer 3 to layer 4
2015-10-26 16:45:52 +00:00
(and thus implementing a TCP/IP stack), which will inevitably introduce bugs as well.
This is how most (perhaps all) other no-root firewalls work.
NetGuard is unique, because it doesn't implement a TCP/IP stack, and is therefore both highly efficient and simple.
2015-10-26 17:08:27 +00:00
2015-11-01 08:40:27 +00:00
For more advanced use cases, rooting your device and using an iptables based firewall,
like [AFWall+](https://github.com/ukanth/afwall), might be a better option and will not sacrifice any battery power.
2015-10-25 15:36:14 +00:00
2015-10-30 12:32:59 +00:00
<a name="FAQ6"></a>
**(6) Will NetGuard send my internet traffic to an external (VPN) server?**
No. It cannot do this because NetGuard does not even have the *internet* permission.
2015-10-30 12:32:59 +00:00
2015-11-01 06:13:18 +00:00
<a name="FAQ7"></a>
2015-11-01 08:40:27 +00:00
**(7) Why are applications without internet permission shown?**
2015-11-01 06:13:18 +00:00
Internet permission can be granted with each application update without user consent.
By showing all applications, NetGuard allows you to block internet access *before* such an update occurs.
2015-11-01 06:13:18 +00:00
<a name="FAQ8"></a>
**(8) What do I need to enable for the Google Play Store to work?**
2015-11-07 07:13:52 +00:00
You need 3 packages (applications) enabled (use search in NetGuard to find them quickly):
* com.android.vending
* com.google.android.gms
* com.android.providers.downloads
2015-11-07 07:13:52 +00:00
Since the Google Play Store has a tendency to check for updates or even download them all by itself (even if no account is associated),
one can keep it in check by enabling "*Allow when device in use*" for all 3 of these packages.
Click on the down arrow on the left side of an application name and check that option,
but leave the network icons set to red (hence blocked).The little human icon will appear for those packages.
By doing this, you can still open the Google Play Store and update/install/uninstall applications since it will have internet access,
but once you close it, it will not use any bandwidth.
2015-11-08 06:28:43 +00:00
<a name="FAQ9"></a>
**(9) Why is the VPN service being restart?**
The VPN service will be restarted when you turn the screen on or off and when connectivity changes (WiFi, mobile)
to apply the rules with the conditions '*Allow when device is in use*' and '*Block when roaming*'.
2015-11-08 12:18:16 +00:00
<a name="FAQ10"></a>
**(10) Will you provide a Tasker plug-in?**
If disabling NetGuard is allowed to Tasker, any application can disabled NetGuard too.
Allowing to disable a security application from other applications is not a good idea.
2015-11-09 06:16:09 +00:00
<a name="FAQ12"></a>
**(12) Can you add on demand asking to block/allow access?**
Besides that this requires questionable Android permissions,
it is not possible to implement this, given the way NetGuard works.
2015-11-09 08:36:54 +00:00
For more details, see [question 5](#FAQ5).
2015-11-08 21:08:10 +00:00
<a name="FAQ13"></a>
**(13) How can I remove the ongoing NetGuard entry in the notification screen?**
* Long click the NetGuard notification
* Tap the 'i' icon
* Depending on your Android version and/or ROMs manufacturer software customisation, you can be directed to either:
* the **App Info** screen and you can uncheck '*Show notifications*' and agree to the next dialog
* the **App Notifications** screen and you can toggle the '*Block*' slider to on
Note that, whether or not you get a dialog warning to agree upon, this operation will disable any warning notifications from NetGuard as well.
2015-10-25 13:36:49 +00:00
Support
-------
* Questions: please [use this XDA-Developers forum thread](http://forum.xda-developers.com/showthread.php?t=3233012)
* Feature requests and bugs: please [create an issue on GitHub](https://github.com/M66B/NetGuard/issues/new)
2015-10-25 13:36:49 +00:00
Please do not use GitHub for questions.
2015-10-25 12:02:25 +00:00
Contributing
------------
2015-10-26 08:06:39 +00:00
Translations:
* Translations to other languages are welcomed
* Check if the language [is supported by Android](http://stackoverflow.com/questions/7973023/what-is-the-list-of-supported-languages-locales-on-android) and find its locale
2015-11-04 20:32:07 +00:00
* Copy [this file](https://github.com/M66B/NetGuard/blob/master/app/src/main/res/values/strings.xml) to the [correct locale folder](https://github.com/M66B/NetGuard/blob/master/app/src/main/res/)
2015-10-26 08:06:39 +00:00
* Translate the strings in the copied file and omit all lines with **translatable="false"**
* Create a [pull request on GitHub](https://help.github.com/articles/using-pull-requests) for the new/updated translation
2015-10-26 08:06:39 +00:00
2015-11-04 20:32:07 +00:00
Current translations:
1. Arabic (ar)
1. Dutch (nl)
1. Simplified Chinese (zh-rCN)
1. English
1. French (fr)
1. German (de)
1. Italian (it)
2015-11-07 12:12:46 +00:00
1. Japanese (ja)
2015-11-04 20:32:07 +00:00
1. Korean (ko)
2015-11-07 16:23:20 +00:00
1. Polish (pl)
2015-11-04 20:59:45 +00:00
1. Romanian (ro)
2015-11-08 06:41:12 +00:00
1. Russian (ru)
2015-11-04 20:32:07 +00:00
1. Slovak (sk)
1. Spanish (es)
2015-10-25 12:02:25 +00:00
Please note that you agree to the license below by contributing, including the copyright.
Attribution
-----------
NetGuard uses:
* [Picasso](http://square.github.io/picasso/)
* [Android Support Library](https://developer.android.com/tools/support-library/index.html)
2015-10-25 12:02:25 +00:00
License
-------
[GNU General Public License version 3](http://www.gnu.org/licenses/gpl.txt)
Copyright (c) 2015 Marcel Bokhorst ([M66B](http://forum.xda-developers.com/member.php?u=2799345))
All rights reserved
This file is part of NetGuard.
NetGuard is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your discretion) any later version.
NetGuard is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with NetGuard. If not, see [http://www.gnu.org/licenses/](http://www.gnu.org/licenses/).