Store detected external ips to separate variable
This commit is contained in:
parent
6662b4f047
commit
f706f7508e
5 changed files with 10 additions and 8 deletions
|
@ -173,7 +173,7 @@ class FileServerPlugin(object):
|
|||
def portCheck(self, *args, **kwargs):
|
||||
res = super(FileServerPlugin, self).portCheck(*args, **kwargs)
|
||||
if res and not config.tor == "always" and "Bootstrapper" in PluginManager.plugin_manager.plugin_names:
|
||||
for ip in config.ip_external:
|
||||
for ip in self.ip_external_list:
|
||||
my_tracker_address = "zero://%s:%s" % (ip, config.fileserver_port)
|
||||
tracker_storage.onTrackerFound(my_tracker_address, my=True)
|
||||
return res
|
||||
|
|
|
@ -667,7 +667,7 @@ class UiWebsocketPlugin(object):
|
|||
peer_locations.append(peer_location)
|
||||
|
||||
# Append myself
|
||||
for ip in config.ip_external:
|
||||
for ip in self.site.connection_server.ip_external_list:
|
||||
my_loc = self.getLoc(geodb, ip)
|
||||
if my_loc:
|
||||
my_loc["ping"] = 0
|
||||
|
|
|
@ -67,7 +67,7 @@ class UiRequestPlugin(object):
|
|||
|
||||
# Memory
|
||||
yield "rev%s | " % config.rev
|
||||
yield "%s | " % config.ip_external
|
||||
yield "%s | " % main.file_server.ip_external_list
|
||||
yield "Port: %s | " % main.file_server.port
|
||||
yield "IP Network: %s | " % main.file_server.supported_ip_types
|
||||
yield "Opened: %s | " % main.file_server.port_opened
|
||||
|
|
|
@ -83,8 +83,8 @@ class ActionsPlugin(object):
|
|||
webbrowser.open(url, new=0)
|
||||
|
||||
def titleIp(self):
|
||||
title = "!IP: %s " % config.ip_external
|
||||
if self.main.file_server.port_opened:
|
||||
title = "!IP: %s " % ", ".join(self.main.file_server.ip_external_list)
|
||||
if any(self.main.file_server.port_opened):
|
||||
title += _["(active)"]
|
||||
else:
|
||||
title += _["(passive)"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue