feat: Update Web UI so it's accessible on both ipv4 and ipv6 #1136
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Tweak default config file so it bootstraps the Web UI server to both ipv6 and ipv4 by default. I also left a comment in there explaining how to revert to only loading the server on an ipv4 address by replacing the address with
0.0.0.0
. I also updated theserver.py
file so it formats the ipv6 url in a more user friendly mannerMotivation and Context
I didn't raise the issue but an enhancement request was put in so this addresses and closes #915
FIXES #915
How Has This Been Tested?
I tested it for several hours locally tethering my pwnagotchi to my laptop and desktop via usb, bluetooth, and a USB Wi-Fi dongle that I had laying around. Everything worked as expected.
Types of changes
Checklist:
git commit -s
For the documentation I left comments in the default
config.toml
file that explains the fix. It's really pretty basic. Instead of loading the web UI on0.0.0.0
we instead load it on the ipv6 equivalent::
and in turn ipv6 routes traffic back to ipv4