Add an ability to change circuits
This commit is contained in:
		
							parent
							
								
									40bfc6bff3
								
							
						
					
					
						commit
						6ff473ab5d
					
				@ -181,6 +181,9 @@ class Bisq {
 | 
			
		||||
          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}`;
 | 
			
		||||
          }
 | 
			
		||||
 | 
			
		||||
          // Handle proxy agent for onion addresses
 | 
			
		||||
 | 
			
		||||
@ -76,6 +76,9 @@ class FiatConversion {
 | 
			
		||||
          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}`;
 | 
			
		||||
          }
 | 
			
		||||
 | 
			
		||||
          // Handle proxy agent for onion addresses
 | 
			
		||||
 | 
			
		||||
@ -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);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user