|
@@ -435,7 +435,7 @@ function tor_add_bridge {
|
435
|
435
|
echo 'UseBridges 1' >> /etc/tor/torrc
|
436
|
436
|
fi
|
437
|
437
|
|
438
|
|
- bridge_str="bridge $bridge_type ${bridge_ip_address}:${bridge_port} ${bridge_key}"
|
|
438
|
+ bridge_str="Bridge $bridge_type ${bridge_ip_address}:${bridge_port} ${bridge_key}"
|
439
|
439
|
if ! grep "${bridge_str}" /etc/tor/torrc; then
|
440
|
440
|
sed -i "/UseBridges/a ${bridge_str}" >> /etc/tor/torrc
|
441
|
441
|
fi
|
|
@@ -447,13 +447,13 @@ function tor_remove_bridge {
|
447
|
447
|
bridge_ip_address="$1"
|
448
|
448
|
bridge_type='obfs4'
|
449
|
449
|
|
450
|
|
- bridge_str="bridge $bridge_type ${bridge_ip_address}"
|
|
450
|
+ bridge_str="Bridge $bridge_type ${bridge_ip_address}"
|
451
|
451
|
if grep "${bridge_str}" /etc/tor/torrc; then
|
452
|
452
|
sed -i "/${bridge_str}/d" /etc/tor/torrc
|
453
|
453
|
fi
|
454
|
454
|
|
455
|
455
|
# If there are no bridges remaining then remove UseBridges
|
456
|
|
- if ! grep "bridge " /etc/tor/torrc; then
|
|
456
|
+ if ! grep "Bridge " /etc/tor/torrc; then
|
457
|
457
|
if ! grep "#UseBridges" /etc/tor/torrc; then
|
458
|
458
|
sed -i 's|UseBridges|#UseBridges|g' /etc/tor/torrc
|
459
|
459
|
fi
|