Add an ability to change circuits

This commit is contained in:
Ayanami committed 2022-06-07 04:16:37 +09:00
1 parent 31192d1893
commit 02a0ac14fd
3 files changed
+9

No files matched your search

+3
View File
@@ -143,6 +143,9 @@ class PoolsUpdater {
if (config.SOCKS5PROXY.USERNAME && config.SOCKS5PROXY.PASSWORD) {
socksOptions.username = config.SOCKS5PROXY.USERNAME;
socksOptions.password = config.SOCKS5PROXY.PASSWORD;
} else {
// Retry with different tor circuits https://stackoverflow.com/a/64960234
socksOptions.username = `circuit${retry}`;
}
axiosOptions.httpsAgent = new SocksProxyAgent(socksOptions);