work on tor blocking detection
This commit is contained in:
		
							parent
							
								
									a24086da62
								
							
						
					
					
						commit
						2ddeab8788
					
				
					 3 changed files with 7674 additions and 1 deletions
				
			
		|  | @ -22,6 +22,7 @@ import logger | |||
| 
 | ||||
| def add_bridges(torrc: str) -> str: | ||||
|     """Configure tor to use a bridge using Onionr config keys.""" | ||||
|     config.reload() | ||||
|     if config.get('tor.use_bridge', False) is True: | ||||
|         bridge = config.get('tor.bridge_ip', None) | ||||
|         if bridge is not None: | ||||
|  | @ -29,6 +30,7 @@ def add_bridges(torrc: str) -> str: | |||
|             fingerprint = config.get('tor.bridge_fingerprint', '') | ||||
|             torrc += '\nUseBridges 1\nBridge %s %s\n' % (bridge, fingerprint) | ||||
|         else: | ||||
|             logger.warn('bridge was enabled but not specified in config') | ||||
|             logger.error('Bridge was enabled but not specified in config, ' + | ||||
|                          'this probably won\'t work', terminal=True) | ||||
| 
 | ||||
|     return torrc | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue