diff --git a/src/common/config.py b/src/common/config.py index 40208e477..e1fcf342e 100644 --- a/src/common/config.py +++ b/src/common/config.py @@ -128,8 +128,8 @@ class Config: 'confirm_close_muc': [opt_bool, True], # confirm closing MUC window 'notify_on_file_complete': [opt_bool, True], # notif. on file complete 'file_transfers_port': [opt_int, 28011], # port, used for file transfers - # custom host in case user did address translation/port forward - 'ft_custom_host': [opt_str, ''], + # override the host we send for FT in case of address translation/port forward + 'ft_override_host_to_send': [opt_str, ''], 'conversation_font': [opt_str, ''], # IEC standard says KiB = 1024 bytes KB = 1000 bytes 'use_kib_mib': [opt_bool, False], diff --git a/src/common/connection.py b/src/common/connection.py index 680da69b6..ecfc0a9e1 100644 --- a/src/common/connection.py +++ b/src/common/connection.py @@ -716,7 +716,7 @@ class Connection: if type(self.peerhost) != tuple: return port = gajim.config.get('file_transfers_port') - custom_host = gajim.config.get('ft_custom_host') + ft_override_host_to_send = gajim.config.get('ft_override_host_to_send') cfg_proxies = gajim.config.get_per('accounts', self.name, 'file_transfer_proxies') if receiver is None: receiver = file_props['receiver'] @@ -743,8 +743,8 @@ class Connection: sha_str = self._get_sha(file_props['sid'], sender, receiver) file_props['sha_str'] = sha_str - if not custom_host: - custom_host = self.peerhost[0] + if not ft_override_host_to_send: + ft_override_host_to_send = self.peerhost[0] listener = gajim.socks5queue.start_listener(self.peerhost[0], port, sha_str, self.result_socks5_sid, file_props['sid']) if listener == None: @@ -761,7 +761,7 @@ class Connection: query.setAttr('sid', file_props['sid']) streamhost = query.setTag('streamhost') streamhost.setAttr('port', str(port)) - streamhost.setAttr('host', custom_host) + streamhost.setAttr('host', ft_override_host_to_send) streamhost.setAttr('jid', sender) if fast and proxyhosts != []: file_props['proxy_receiver'] = str(receiver)