adedde prefix ft_ for proxy65 options
This commit is contained in:
parent
8c26791c44
commit
4df50b17ee
|
@ -181,7 +181,7 @@ class Config:
|
||||||
'user': [ opt_str, '' ],
|
'user': [ opt_str, '' ],
|
||||||
'pass': [ opt_str, '' ],
|
'pass': [ opt_str, '' ],
|
||||||
}, {}),
|
}, {}),
|
||||||
'proxies65_cache': ({
|
'ft_proxies65_cache': ({
|
||||||
'host': [ opt_str, ''],
|
'host': [ opt_str, ''],
|
||||||
'port': [ opt_str, '7777'],
|
'port': [ opt_str, '7777'],
|
||||||
'jid': [ opt_str, ''],
|
'jid': [ opt_str, ''],
|
||||||
|
@ -295,9 +295,10 @@ class Config:
|
||||||
'#996442' ],
|
'#996442' ],
|
||||||
}
|
}
|
||||||
|
|
||||||
proxies65_default = {
|
ft_proxies65_default = {
|
||||||
'proxy.jabber.org': [ '208.245.212.98', '7777', 'proxy.jabber.org' ],
|
'proxy.jabber.org': [ '208.245.212.98', '7777', 'proxy.jabber.org' ],
|
||||||
'proxy65.jabber.autocom.pl': ['213.134.161.52', '7777', 'proxy65.jabber.autocom.pl'],
|
'proxy65.jabber.autocom.pl': ['213.134.161.52', '7777', 'proxy65.jabber.autocom.pl'],
|
||||||
|
'proxy.jabber.cd.chalmers.se': ['129.16.79.37', '7777', 'proxy.jabber.cd.chalmers.se'],
|
||||||
}
|
}
|
||||||
|
|
||||||
def foreach(self, cb, data = None):
|
def foreach(self, cb, data = None):
|
||||||
|
@ -431,10 +432,10 @@ class Config:
|
||||||
self.set_per('soundevents', event, 'path', default[1])
|
self.set_per('soundevents', event, 'path', default[1])
|
||||||
|
|
||||||
# set initial cache values for proxie65 hosts
|
# set initial cache values for proxie65 hosts
|
||||||
for proxy in self.proxies65_default:
|
for proxy in self.ft_proxies65_default:
|
||||||
default = self.proxies65_default[proxy]
|
default = self.ft_proxies65_default[proxy]
|
||||||
self.add_per('proxies65_cache', proxy)
|
self.add_per('ft_proxies65_cache', proxy)
|
||||||
self.set_per('proxies65_cache', proxy, 'host', default[0])
|
self.set_per('ft_proxies65_cache', proxy, 'host', default[0])
|
||||||
self.set_per('proxies65_cache', proxy, 'port', default[1])
|
self.set_per('ft_proxies65_cache', proxy, 'port', default[1])
|
||||||
self.set_per('proxies65_cache', proxy, 'jid', default[2])
|
self.set_per('ft_proxies65_cache', proxy, 'jid', default[2])
|
||||||
return
|
return
|
||||||
|
|
|
@ -527,10 +527,10 @@ class Connection:
|
||||||
port = item.getAttr('port')
|
port = item.getAttr('port')
|
||||||
jid = item.getAttr('jid')
|
jid = item.getAttr('jid')
|
||||||
conf = gajim.config
|
conf = gajim.config
|
||||||
conf.add_per('proxies65_cache', jid)
|
conf.add_per('ft_proxies65_cache', jid)
|
||||||
conf.set_per('proxies65_cache', jid, 'host', str(host))
|
conf.set_per('ft_proxies65_cache', jid, 'host', str(host))
|
||||||
conf.set_per('proxies65_cache', jid, 'port', int(port))
|
conf.set_per('ft_proxies65_cache', jid, 'port', int(port))
|
||||||
conf.set_per('proxies65_cache', jid, 'jid', str(jid))
|
conf.set_per('ft_proxies65_cache', jid, 'jid', str(jid))
|
||||||
raise common.xmpp.NodeProcessed
|
raise common.xmpp.NodeProcessed
|
||||||
try:
|
try:
|
||||||
streamhost = query.getTag('streamhost-used')
|
streamhost = query.getTag('streamhost-used')
|
||||||
|
@ -661,9 +661,9 @@ class Connection:
|
||||||
|
|
||||||
def get_cached_proxies(self, proxy):
|
def get_cached_proxies(self, proxy):
|
||||||
''' get cached entries for proxy and request the cache again '''
|
''' get cached entries for proxy and request the cache again '''
|
||||||
host = gajim.config.get_per('proxies65_cache', proxy, 'host')
|
host = gajim.config.get_per('ft_proxies65_cache', proxy, 'host')
|
||||||
port = gajim.config.get_per('proxies65_cache', proxy, 'port')
|
port = gajim.config.get_per('ft_proxies65_cache', proxy, 'port')
|
||||||
jid = gajim.config.get_per('proxies65_cache', proxy, 'jid')
|
jid = gajim.config.get_per('ft_proxies65_cache', proxy, 'jid')
|
||||||
|
|
||||||
iq = common.xmpp.Protocol(name = 'iq', to = proxy, typ = 'get')
|
iq = common.xmpp.Protocol(name = 'iq', to = proxy, typ = 'get')
|
||||||
query = iq.setTag('query')
|
query = iq.setTag('query')
|
||||||
|
|
Loading…
Reference in New Issue