Show a terminal message if bridge is enabled but one is not set. By design, there is no easy way for us to get Tor bridges automatically
work on tor blocking detection
This commit is contained in:
		
							parent
							
								
									e900d597d8
								
							
						
					
					
						commit
						ce63c4cd3b
					
				
					 5 changed files with 11 additions and 7650 deletions
				
			
		
							
								
								
									
										2
									
								
								.gitignore
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.gitignore
									
										
									
									
										vendored
									
									
								
							| 
						 | 
					@ -40,3 +40,5 @@ src/data/*.log
 | 
				
			||||||
onionr-*.pkg.tar.gz
 | 
					onionr-*.pkg.tar.gz
 | 
				
			||||||
pkg/
 | 
					pkg/
 | 
				
			||||||
spawnnodes.py
 | 
					spawnnodes.py
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static-data/tor-node-list.dat
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										3
									
								
								scripts/unblock-tor.sh
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										3
									
								
								scripts/unblock-tor.sh
									
										
									
									
									
										Executable file
									
								
							| 
						 | 
					@ -0,0 +1,3 @@
 | 
				
			||||||
 | 
					#!/bin/bash
 | 
				
			||||||
 | 
					# Unblock Tor Exit nodes
 | 
				
			||||||
 | 
					iptables -F Tor
 | 
				
			||||||
| 
						 | 
					@ -29,7 +29,7 @@ def add_bridges(torrc: str) -> str:
 | 
				
			||||||
            # allow blank fingerprint purposefully
 | 
					            # allow blank fingerprint purposefully
 | 
				
			||||||
            fingerprint = config.get('tor.bridge_fingerprint', '')
 | 
					            fingerprint = config.get('tor.bridge_fingerprint', '')
 | 
				
			||||||
            torrc += '\nUseBridges 1\nBridge %s %s\n' % (bridge, fingerprint)
 | 
					            torrc += '\nUseBridges 1\nBridge %s %s\n' % (bridge, fingerprint)
 | 
				
			||||||
        else:
 | 
					        if not bridge:
 | 
				
			||||||
            logger.error('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)
 | 
					                         'this probably won\'t work', terminal=True)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										5
									
								
								static-data/download-tor-node-list.sh
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										5
									
								
								static-data/download-tor-node-list.sh
									
										
									
									
									
										Executable file
									
								
							| 
						 | 
					@ -0,0 +1,5 @@
 | 
				
			||||||
 | 
					#!/bin/bash
 | 
				
			||||||
 | 
					DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
 | 
				
			||||||
 | 
					cd "$DIR"
 | 
				
			||||||
 | 
					curl https://www.dan.me.uk/torlist/ > tor-node-list.dat
 | 
				
			||||||
 | 
					sed -i 's|^#.*$||g' tor-node-list.dat
 | 
				
			||||||
										
											
												File diff suppressed because it is too large
												Load diff
											
										
									
								
							
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue