Commit Graph

269 Commits

Author SHA1 Message Date
emanuele-f
3fc333647b Fix whitelisted connections being blocked
The whitelist logic is now moved to the native side
2021-12-20 17:14:32 +01:00
emanuele-f
49361d05a2 Rework blocklist loading
The new ListDescriptor class now encapsulates the lists
2021-12-20 12:37:32 +01:00
emanuele-f
6846630406 Use memory-wise Android collections
These collections perform generally worse than the Java counterparts but
occupy less memory. The extra computational overhead is mainly visible
for large collections.

- SparseArray/SparseIntArray replaces HashMap
- ArraySet replaces HashSet
2021-12-15 12:26:27 +01:00
emanuele-f
43d9279467 Improve seen interfaces logic 2021-12-14 22:40:23 +01:00
emanuele-f
9140e0b236 Add ability to filter by interface in root mode
When the capture interface is set to "All Interfaces", it is now
possible to filter connections by interface. The interface is also shown
into the connection details.

Closes #163
2021-12-14 22:33:24 +01:00
emanuele-f
63a5826e80 Improve navigation on Android TV 2021-12-14 16:36:51 +01:00
emanuele-f
ef53b36f7a Make wifi hardware not mandatory
Fixes #152
2021-12-14 15:30:50 +01:00
emanuele-f
a9b90d5ff2 Fix deprecation/warning messages
Closes #151
2021-12-14 15:13:16 +01:00
emanuele-f
0d377f757e Remove the DNS server from the Stats if private
If the private DNS is used, remove the it from the Stats activity to
avoid reporting wrong information.

Closes #160
2021-12-14 12:26:57 +01:00
emanuele-f
a924ee5073 Remove symlinks and update dbip to 2021_12 2021-12-14 11:42:55 +01:00
emanuele-f
e270ee8670 Use memory-mapped file for geolocation lookups
This saves ~14 MB of RAM usage due to the loading of mmdb files
2021-12-13 19:41:17 +01:00
emanuele-f
29612b389c Small memory usage improvements
For the foreground, the Loader for the target apps dialog doesn't load
the bitmaps anymore and is destroyed once finished. Bitmaps take lots of
memory, so they should only be loaded when necessary.

For the backgroud, the AppsResolver now loads the virtual/unknown app
icons only if necessary, saving ~0.5 MB when the app is in background.
2021-12-13 18:57:03 +01:00
emanuele-f
e3ecd253ea Fix crash after 28ff23e 2021-12-08 18:33:17 +01:00
emanuele-f
41460fe9cf Add checks in startActivity/ActivityResultLauncher
This prevents crashes when no activity is found to handle the specified
Intent
2021-12-08 11:07:30 +01:00
emanuele-f
c079474917 Rename vpnproxy to pcapdroid 2021-12-06 16:29:37 +01:00
emanuele-f
f78cec5c9f Fix blocking by host not working 2021-12-03 11:58:57 +01:00
emanuele-f
62bb11b251 Improve ID comments 2021-12-02 23:20:13 +01:00
emanuele-f
cc11790f0e Implement features unlock via unlock code 2021-12-02 23:07:53 +01:00
emanuele-f
62c84f9663 Initial firewall implementation (no-root mode)
- Block connections by IP, domain or app
- Add filter to show blocked connections
- Migrate IP matching to ndpi_ptree_t API
- IPv6 addresses now supported in blacklists
- Duplicate IP address rules now only counted once
2021-11-29 22:40:35 +01:00
emanuele-f
8cf67378f5 Fix crash in Android 7
The getParameterCount is only available since API level 26. Using a
patched MaxMind-DB-Reader-java to avoid crashing.

https://developer.android.com/reference/java/lang/reflect/Method#getParameterCount()

java.lang.NoSuchMethodError: No virtual method getParameterCount()I in class Ljava/lang/reflect/Constructor; or its super classes (declaration of 'java.lang.reflect.Constructor' appears in /system/framework/core-oj.jar)
 at com.maxmind.db.Decoder.decodeMapIntoObject(Decoder.java:397)
 at com.maxmind.db.Decoder.decodeMap(Decoder.java:342)
 at com.maxmind.db.Decoder.decodeByType(Decoder.java:162)
 at com.maxmind.db.Decoder.decode(Decoder.java:151)
 at com.maxmind.db.Decoder.decode(Decoder.java:76)
 at com.maxmind.db.Reader.<init>(Reader.java:133)
 at com.maxmind.db.Reader.<init>(Reader.java:90)
 at com.emanuelef.remote_capture.Geolocation.openDb(Geolocation.java:67)
2021-11-23 22:42:08 +01:00
emanuele-f
fafd42f07f Fix bad debug version hyperlink 2021-11-23 11:20:53 +01:00
emanuele-f
2c86fc312d Restart catpure on consecutive start requests
This prevents crashes
2021-11-23 10:22:15 +01:00
emanuele-f
51474d8e12 Sort control permissions by package name
Control permissions is now only shown in the settings if any permission
is set
2021-11-22 19:56:57 +01:00
emanuele-f
b1cd5c77ae Change action name 2021-11-22 19:28:38 +01:00
emanuele-f
6c084e6d81 Add ability to receive Intent on capture stopped 2021-11-22 19:04:07 +01:00
emanuele-f
67c3c7bb99 Add CaptureCtrl status request 2021-11-22 18:19:16 +01:00
emanuele-f
00bfb81dbf Add warning in SOCKS5 mode with no app filter
Closes #143
2021-11-22 16:47:05 +01:00
emanuele-f
a61d8af4c1 Add malware detection warning with private DNS on 2021-11-22 16:15:23 +01:00
emanuele-f
3e522a1786 Properly handle private DNS
PCAPdroid now tracks the private DNS state. Secure DNS queries are now
only blocked when set in opportunistic mode. A notice is now shown when
PCAPdroid has no visibility on the DNS query.

Fixes #130
2021-11-22 15:38:56 +01:00
emanuele-f
6700463155 Remove getBilling from app class 2021-11-22 11:44:55 +01:00
emanuele-f
71a8adda30 Add country flag in the connection details 2021-11-19 22:34:46 +01:00
emanuele-f
b10096bfbe Add malware detection docs link to the app
Closes #140
2021-11-19 18:21:44 +01:00
emanuele-f
ebfcea7217 Ability to manually update the blacklists
The update status is now also shown
2021-11-19 18:21:44 +01:00
emanuele-f
0edba60206 Remove unneded check 2021-11-19 18:21:44 +01:00
MZM
b330f5915d fix some deprecations (#156)
Co-authored-by: mazm <marcel.zipaj-misko@student.tuke.sk>
2021-11-19 18:21:44 +01:00
emanuele-f
3d5ce803a0 Improve layout 2021-11-19 18:21:44 +01:00
emanuele-f
3366a778c6 Improve malware detection overview
- Refresh malware status and blacklists views
- Serialize blacklists info
- Improve layout
2021-11-19 18:21:44 +01:00
emanuele-f
e7b8811f23 Initial malware detection overview (wip)
- Overall status of malware detection
- Show the blacklists used, check their status
- Whitelist moved to this activity
2021-11-19 18:21:44 +01:00
emanuele-f
8399e30fab Add ability to start at boot
Closes #100
2021-11-19 18:21:44 +01:00
emanuele-f
d27334d640 Add button to send crash report via email
Closes #154
2021-11-19 18:21:44 +01:00
emanuele-f
df71db9c89 Use different app id for the debug build 2021-11-19 18:21:44 +01:00
emanuele-f
61a3d24993 Offload connection updates processing
Connection updates are now processed into a separate thread, reducing
the packet processing delay.
2021-11-19 18:21:44 +01:00
emanuele-f
095b301897 Add ability to hide connections matching country 2021-11-19 18:21:44 +01:00
emanuele-f
51a18f3d43 Report full country name and improve conn. layout 2021-11-19 18:21:44 +01:00
emanuele-f
586b26b0b6 Initial geolocation support
Needed for #106
2021-11-19 18:21:36 +01:00
emanuele-f
74056dd36e Add licenses links in about 2021-11-05 22:22:16 +01:00
emanuele-f
eb295f1c04 Improve CaptureCtrl
- The app theme is now honored
- The caller app name and icon is now shown in the request dialog
- It's now possible to grant/deny control requests via permissions
- Control permissions rules can be deleted from the settings activity

Needed for #138
2021-11-04 19:09:25 +01:00
emanuele-f
d7d905b269 Merge branch 'master' into dev 2021-11-04 16:30:52 +01:00
emanuele-f
aff7b0d420 Fix ads webview crash 2021-11-04 14:26:46 +01:00
emanuele-f
184a5c3dd3 Fix past day hours shown as today
Fixes #145
2021-11-03 18:03:58 +01:00