Draft-GSoC Project Description and Workflow
This is a documentation/ introduction draft which will be edited later-on. Keeping this here till then.
Implementing> Self-contained Go-Library to block ads using DNS filtering
Future Scope> Ad-Block Feature built in VPN; with toggling mode.
Target Platform> Currently, focused on Android.
The project that was decided/chosen for implementation in GSoC-2022 is based on the idea of creating a client-side blocker which is capable of blocking advertisements, trackers and malwares.
The project would be in the form of a self-contained Go-Library which can be easily integrated with cross-platform applications of the LEAP, i.e; Android apps, Desktop Apps.
Ad/trackers-block feature in-built in a VPN is helpful in avoid being tracked in the digital world.
Existing Works:- There are similar/slightly similar projects that have same objective as ours. Some noteworthy are:-
- https://www.zenz-solutions.de/openvpn-for-personaldnsfilter/
- https://github.com/julian-klode/dns66/
- https://github.com/dbrodie/AdBuster
Research Conducted:- Rough Idea about how ads are fetched> When an end user visits a website, the browser loads the requested content from that website. The fetched content is not always free from ads,trackers. What our browser does is; it fetches all the scripts from the requested website along with the embedded tracking site scripts and ad-scripts.
to be edited
Workflow:- to be edited
Functional/Non-Functional Requirements:-
to be edited
Tasklists:- Get Bitmask running
-
get a Linux machine -
compile Bitmask Android
How to use go on Android:
-
create a simple hello world go lib using gomobile -
integrate and invoke the lib in a sample Android app -
adapt the build_core.sh to bundle the hello world go lib into Bitmask Android
Getting started with Go implementation
-
get a seperate repository called: ?try to keep it simple trackingblocker-lib 'vpn-hole-lib' analogus to 'pi-hole'? -
check out https://github.com/davidepedranz/go-hole (how to use this as a lib on android) -
figure out how to pass filedescriptors from java to go: https://pkg.go.dev/os?utm_source=godoc#NewFile -
write a simple copy-loop that reads all packets from the filedescriptor and writes to it, add some logs, the loop should run in a background thread -
integrate the simple go lib into Bitmask, build a wrapper class for the golib JNI -> if everything works fine, you just can connect to any gateway and get a working internet connection and see some logs from the go lib -
verify that the go lib is closed correctly if the tun interface is destroyed -
check the possibilities how to parse raw bytes to IP packets in go -
parse and log UDP packets, write through all TCP packets, focus on IPv4 for now -
implement a way to pass a list of strings from java to go -
integrate a file with urls on android, open the file and pass it to golang -
check UDP packets against list entries, drop matches -
create Android UI to enable/disable local DNS filtering -
create Android UI to show show file list entries -
create Android UI to add and remove list entries
stretch goals:
-
investigate if we want to/can support DoH (DNS over HTTPS)