3
0
Fork 0
a fork of mobile_nebula adding additional features and bringing Trifid to mobile devices
Go to file
John Maguire 47865d568b
Fix DNS over mobile networks on Android (#40)
I think this closes the loop on DNS issues I was experiencing.
Previously, after starting Nebula, DNS would work until you switched
networks (e.g. from mobile to WiFi or vice-versa). This was fixed by
removing some explicit DNS server sets in commit
a283bf8010. This casued DNS to work in
`adb shell` even after toggling networks.

However, it did not actually fix the problem for Android applications.
The new behavior is that they would work while on WiFi, but fail on a
mobile network.

To quote Android docs:

> Allows traffic from the specified address family. By default, if no
> address, route or DNS server of a specific family (IPv4 or IPv6) is
> added to this VPN, then all outgoing traffic of that family is blocked.
> If any address, route or DNS server is added, that family is allowed.
> This method allows an address family to be unblocked even without adding
> an address, route or DNS server of that family. Traffic of that family
> will then typically fall-through to the underlying network if it's
> supported. family must be either AF_INET (for IPv4) or AF_INET6 (for
> IPv6). IllegalArgumentException is thrown if it's neither.

In my case, my home network supports only IPv4 while my mobile network
uses DNS over IPv6. Since my Nebula routes are IPv4-only, IPv6 traffic
stopped working, and DNS requests failed.
2021-05-10 16:16:21 -04:00
.github/workflows Setup some github actions (#37) 2021-05-03 16:55:51 -05:00
android Fix DNS over mobile networks on Android (#40) 2021-05-10 16:16:21 -04:00
fonts Initial commit 2020-07-27 15:43:58 -05:00
ios Rework ios ipc (#28) 2021-04-27 10:29:28 -05:00
lib Ran flutter format -l 120 --suppress-analytics lib (#38) 2021-05-03 16:58:04 -05:00
nebula Kotlin active site race on boot fix (#29) 2021-04-29 10:17:43 -05:00
.git-blame-ignore-revs git blame ignore that the format merge (#39) 2021-05-03 17:00:29 -05:00
.gitignore Let Android install debug & release APKs side-by-side (#31) 2021-04-29 16:13:13 -04:00
.metadata Initial commit 2020-07-27 15:43:58 -05:00
README.md Update README.md (#36) 2021-05-03 16:25:59 -04:00
env.sh.example Initial commit 2020-07-27 15:43:58 -05:00
gen-artifacts.sh Minor tweaks for a clean build 2021-04-22 18:46:16 -04:00
pubspec.lock Upgrade to flutter 2 (#26) 2021-04-23 12:33:28 -05:00
pubspec.yaml IPV6 support (#24) 2021-04-23 16:23:06 -05:00

README.md

Dependencies

Currently using flutter 2.0.5

Copy env.sh.example to env.sh and update your PATH variable to expose both flutter and go bin directories

export PATH="$PATH:/path/to/go/bin:/path/to/flutter/bin"

Formatting

flutter format can be used to format the code in lib and test but it's default is 80 char line limit, it's 2020

Use:

flutter format lib/ test/ -l 120

Release

Update version in pubspec.yaml to reflect this release, then

Android

flutter build appbundle --no-shrink

This will create an android app bundle at build/app/outputs/bundle/release/

Upload the android bundle to the google play store https://play.google.com/apps/publish

iOS

In xcode, Release -> Archive then follow the directions to upload to the app store. If you have issues, https://flutter.dev/docs/deployment/ios#create-a-build-archive