Skip to content

Commit 751eaaa

Browse files
committed
Merge remote-tracking branch 'origin/master' into fix-start-dir
2 parents 1eb094b + 9670001 commit 751eaaa

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

src/Config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ def createArguments(self):
256256
self.parser.add_argument('--ip_local', help='My local ips', default=ip_local, type=int, metavar='ip', nargs='*')
257257
self.parser.add_argument('--ip_external', help='Set reported external ip (tested on start if None)', metavar='ip', nargs='*')
258258
self.parser.add_argument('--offline', help='Disable network communication', action='store_true')
259+
self.parser.add_argument('--disable_port_check', help='Disable checking port', action='store_true')
259260

260261
self.parser.add_argument('--disable_udp', help='Disable UDP connections', action='store_true')
261262
self.parser.add_argument('--proxy', help='Socks proxy address', metavar='ip:port')

src/File/FileServer.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,13 @@ def reload(self):
152152
FileRequest = imp.load_source("FileRequest", "src/File/FileRequest.py").FileRequest
153153

154154
def portCheck(self):
155-
if config.offline or config.tor == 'always':
156-
msg = "Offline mode" if config.offline else "Tor-only"
157-
self.log.info(f'{msg}: port check disabled')
155+
if config.offline or config.tor == 'always' or config.disable_port_check:
156+
if config.offline:
157+
self.log.info(f'Offline mode: port check disabled')
158+
elif config.tor == 'always':
159+
self.log.info('Tor-only mode: port check disabled')
160+
else:
161+
self.log.info('Port check disabled')
158162
res = {"ipv4": None, "ipv6": None}
159163
self.port_opened = res
160164
return res

0 commit comments

Comments
 (0)