Commit 65a6ce43 authored by Philipp Hörist's avatar Philipp Hörist

Allow websocket for custom host

parent 80a69393
......@@ -1748,12 +1748,17 @@ def convert_gio_to_openssl_cert(cert):
def get_custom_host(account):
if not app.config.get_per('accounts', account, 'use_custom_host'):
return
return None
host = app.config.get_per('accounts', account, 'custom_host')
port = app.config.get_per('accounts', account, 'custom_port')
type_ = app.config.get_per('accounts', account, 'custom_type')
protocol = ConnectionProtocol.TCP
if host.startswith('ws'):
protocol = ConnectionProtocol.WEBSOCKET
return ('%s:%s' % (host, port),
ConnectionProtocol.TCP,
protocol,
ConnectionType(type_))
......
......@@ -698,8 +698,12 @@ def get_custom_host(self):
con_type = self._ui.con_type_combo.get_active_text()
protocol = ConnectionProtocol.TCP
if host.startswith('ws'):
protocol = ConnectionProtocol.WEBSOCKET
return ('%s:%s' % (host, port),
ConnectionProtocol.TCP,
protocol,
ConnectionType(con_type))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment