Skip to content
Snippets Groups Projects
Commit 2415ffd5 authored by Pratik Lagaskar's avatar Pratik Lagaskar
Browse files

add integration info

parent 73f3246b
No related branches found
No related tags found
1 merge request!3Fixed entry point for the library
......@@ -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>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment