Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Update Web UI so it's accessible on both ipv4 and ipv6 #1136

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pwnagotchi/defaults.toml
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ ui.faces.upload1 = "(1__1)"
ui.faces.upload2 = "(0__1)"

ui.web.enabled = true
ui.web.address = "0.0.0.0"
ui.web.address = "::" # listening on both ipv4 and ipv6 - switch to 0.0.0.0 to listen on just ipv4
ui.web.username = "changeme"
ui.web.password = "changeme"
ui.web.origin = ""
Expand Down
3 changes: 2 additions & 1 deletion pwnagotchi/ui/web/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ def _http_serve(self):
CSRFProtect(app)
Handler(self._config, self._agent, app)

logging.info("web ui available at http://%s:%d/" % (self._address, self._port))
formatServerIpAddress = '[::]' if self._address == '::' else self._address;
logging.info("web ui available at http://%s:%d/" % (formatServerIpAddress, self._port))

app.run(host=self._address, port=self._port, debug=False)
else:
Expand Down