diff --git a/plugins/Trayicon/TrayiconPlugin.py b/plugins/Trayicon/TrayiconPlugin.py index e962281db..19e43abe0 100644 --- a/plugins/Trayicon/TrayiconPlugin.py +++ b/plugins/Trayicon/TrayiconPlugin.py @@ -37,6 +37,8 @@ def main(self): def hideIcon(): icon.die() + ui_ip = config.ui_ip if config.ui_ip != "*" else "127.0.0.1" + icon.items = ( (self.titleIp, False), (self.titleConnections, False), @@ -49,13 +51,13 @@ def hideIcon(): ("ZeroNet Github", lambda: self.opensite("https://github.com/HelloZeroNet/ZeroNet")), ("Report bug/request feature", lambda: self.opensite("https://github.com/HelloZeroNet/ZeroNet/issues")), "--", - ("!Open ZeroNet", lambda: self.opensite("http://%s:%s" % (config.ui_ip, config.ui_port))), + ("!Open ZeroNet", lambda: self.opensite("http://%s:%s" % (ui_ip, config.ui_port))), "--", ("Quit", self.quit), ) - icon.clicked = lambda: self.opensite("http://%s:%s" % (config.ui_ip, config.ui_port)) + icon.clicked = lambda: self.opensite("http://%s:%s" % (ui_ip, config.ui_port)) gevent.threadpool.start_new_thread(icon._run, ()) # Start in real thread (not gevent compatible) super(ActionsPlugin, self).main() icon._die = True diff --git a/src/Ui/UiServer.py b/src/Ui/UiServer.py index 10ecad01a..eed2870e9 100644 --- a/src/Ui/UiServer.py +++ b/src/Ui/UiServer.py @@ -115,7 +115,7 @@ def start(self): browser = webbrowser.get() else: browser = webbrowser.get(config.open_browser) - browser.open("http://%s:%s" % (config.ui_ip, config.ui_port), new=2) + browser.open("http://%s:%s" % (config.ui_ip if config.ui_ip != "*" else "127.0.0.1", config.ui_port), new=2) self.server = WSGIServer((self.ip.replace("*", ""), self.port), handler, handler_class=UiWSGIHandler, log=self.log) self.server.sockets = {}