':param proxy_type: int (0 = no proxy server,
1 = SOCKS4,
2 = SOCKS5,
3 = SOCKS5 + auth,
4 = HTTP,
5 = HTTP + auth)
:param server: (host, [ports]) tuple or None
:param auth: (username, password) tuple or None'

def set_anon_proxy_settings(self, proxy_type, server=None, auth=None):

    self.config['libtorrent']['anon_proxy_type'] = proxy_type
    if (server and proxy_type):
        self.config['libtorrent']['anon_proxy_server_ip'] = server[0]
        self.config['libtorrent']['anon_proxy_server_ports'] = [str(i) for i in server[1]]
    else:
        self.config['libtorrent']['anon_proxy_server_ip'] = None
        self.config['libtorrent']['anon_proxy_server_ports'] = None
    self.config['libtorrent']['anon_proxy_auth'] = (auth if (proxy_type in [3, 5]) else None)
