diff --git a/README.md b/README.md index c1f361c25dc9938b287826b2e1224e85a078f3f0..174caebfa6c6ef43a639fc5cf9563fa38409a596 100644 --- a/README.md +++ b/README.md @@ -69,13 +69,18 @@ go mod tidy If go.mod and go.sum are missing from the cloned repository, then: ``` # go mod init [module-path] -go mod init main +go mod init 0xacab.org/leap/vpn-hole/alter ``` ## Build & Run <a name="Build & Run"></a> - +To build the library and use it as a standalone: ``` +# navigate to app/alter + +cd app/alter + # build the library + go build ``` An executable binary file would be generated for the library. @@ -107,10 +112,10 @@ sudo systemctl disable systemd-resolved To disable it permanently, uncomment and change `DNSStubListener` to *no* in `/etc/systemd/resolved.conf`; you can revert back everything to default if you stop using the vpn-hole library as a standalone. Also stop any other service which prevents from listening on port 53. Then, you can simply execute the binary file. -In **Windows**, an executable named- main.exe would be created. +In **Windows**, an executable named- alter.exe would be created. ``` # executing the binary -main.exe +alter.exe ``` This would start the network wide DNS-level blocker on port 53. @@ -134,12 +139,30 @@ Addresses: :: ## Integration <a name="Integration"></a> To integrate the VPN-Hole Library with existing cross-platform applications, we will be using gomobile to compile and bind it. ``` +# For binding with Android Platforms: + +cd vpn-hole/alter + +# use gomobile to generate .aar: + +gomobile bind -target='android' -o path/for/the/output/filename.aar -v path/for/vpnhole.go + +For example: +# Here pwd is path/vpn-hole/alter + +gomobile bind -target='android' -o vpn-hole.aar -v + +# Similarly, GoMobile can be used to compile for other platforms like iOS (XCode is required): + +gomobile bind -target='ios' -o path/for/the/output/filename.framework -v path/for/vpnhole.go ``` ### Adapting to Bitmask_core <a name="Adapting to Bitmask_core"></a> ``` + + ``` ## License <a name="License"></a>