halloy
halloy copied to clipboard
implement custom proxy option per server #592
Solution for #592
The logic is as follows:
- If a server proxy is provided, it will be used.
- If a server proxy is not provided, the global proxy will be used.
- If the global proxy is not provided, a plain connection will be used.
The API is compatible with previous Halloy versions, proxy config for the specific server looks like that:
[servers.test]
nickname = "utest"
realname = "utest"
server = "irc.test.i2p"
port = 6667
use_tls = false
channels = []
[servers.test.proxy.http]
host = "xxx.xxx.xxx.xxx"
port = 4444
By the way, my rustfmt formatted main.rs. I hope that is okay with the modern Rust version.