Support for multiple SOCKS5 proxies
Currently SOCKS5 support allows to configure only a single proxy using settings socks5_host, socks5_port, socks5_user, socks5_password which can only contain a single proxy. In addition to that, socks5_enabled enables/disables usage of proxy. This SOCKS5 support was developed with @Jikstra mostly to support usage of Tor and configuring the application to use 127.0.0.1:9050 local SOCKS proxy that passes all the traffic to the Tor network.
Another usage of SOCKS proxies is to bypass IP blocks of the servers. This is how it is used in Telegram and why there are telegram channels with large lists of SOCKS5 proxies. See also #5895 PR that adds support for sharing SOCKS5 proxies from Telegram to Delta Chat via QR codes.
Current settings should be aggregated into a single proxy_list setting that contains a list of newline-separated proxies like socks5://127.0.0.1:9050. This may also be extended to support SOCKS4 and other protocols in the future. socks5_enabled to enable/disable proxies (not renamed into proxy_enabled for compatibility) can be left as is.
Setting either setting should automatically restart I/O, currently this does not happen.
Delta Chat should automatically try to switch proxy if the current one is not working, similarly to Telegram with "Auto-switch proxies" setting enabled. Not sure if we also need a way to manually select active proxy. To remember working proxy we can probably extend connection_history SQL table with a column or have a separate table. Probably should be a column because we don't want to get stuck with a working proxy that fails to connect to our server when there is another proxy available that can connect to the server.
There is no plan to build "proxy chains", it is a poor method to achieve anonymity. Using multiple SOCKS5 proxies at a time is out of scope for the issue.