Support multiple external ips
This commit is contained in:
parent
0a03c30e8a
commit
37979b4f9c
4 changed files with 12 additions and 9 deletions
|
@ -173,8 +173,9 @@ 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:
|
||||
my_tracker_address = "zero://%s:%s" % (config.ip_external, config.fileserver_port)
|
||||
tracker_storage.onTrackerFound(my_tracker_address, my=True)
|
||||
for ip in config.ip_external:
|
||||
my_tracker_address = "zero://%s:%s" % (ip, config.fileserver_port)
|
||||
tracker_storage.onTrackerFound(my_tracker_address, my=True)
|
||||
return res
|
||||
|
||||
|
||||
|
|
|
@ -667,10 +667,11 @@ class UiWebsocketPlugin(object):
|
|||
peer_locations.append(peer_location)
|
||||
|
||||
# Append myself
|
||||
my_loc = self.getLoc(geodb, config.ip_external)
|
||||
if my_loc:
|
||||
my_loc["ping"] = 0
|
||||
peer_locations.append(my_loc)
|
||||
for ip in config.ip_external:
|
||||
my_loc = self.getLoc(geodb, ip)
|
||||
if my_loc:
|
||||
my_loc["ping"] = 0
|
||||
peer_locations.append(my_loc)
|
||||
|
||||
return peer_locations
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue