Capital
This commit is contained in:
parent
fb30ca8de1
commit
b6bf112e77
|
@ -752,12 +752,12 @@ function store_passwords {
|
|||
}
|
||||
|
||||
function show_tor_bridges {
|
||||
if ! grep "bridge " /etc/tor/torrc; then
|
||||
if ! grep "Bridge " /etc/tor/torrc; then
|
||||
echo $'No Tor bridges have been added'
|
||||
return
|
||||
fi
|
||||
clear
|
||||
grep "bridge " /etc/tor/torrc
|
||||
grep "Bridge " /etc/tor/torrc
|
||||
}
|
||||
|
||||
function add_tor_bridge {
|
||||
|
|
|
@ -435,7 +435,7 @@ function tor_add_bridge {
|
|||
echo 'UseBridges 1' >> /etc/tor/torrc
|
||||
fi
|
||||
|
||||
bridge_str="bridge $bridge_type ${bridge_ip_address}:${bridge_port} ${bridge_key}"
|
||||
bridge_str="Bridge $bridge_type ${bridge_ip_address}:${bridge_port} ${bridge_key}"
|
||||
if ! grep "${bridge_str}" /etc/tor/torrc; then
|
||||
sed -i "/UseBridges/a ${bridge_str}" >> /etc/tor/torrc
|
||||
fi
|
||||
|
@ -447,13 +447,13 @@ function tor_remove_bridge {
|
|||
bridge_ip_address="$1"
|
||||
bridge_type='obfs4'
|
||||
|
||||
bridge_str="bridge $bridge_type ${bridge_ip_address}"
|
||||
bridge_str="Bridge $bridge_type ${bridge_ip_address}"
|
||||
if grep "${bridge_str}" /etc/tor/torrc; then
|
||||
sed -i "/${bridge_str}/d" /etc/tor/torrc
|
||||
fi
|
||||
|
||||
# If there are no bridges remaining then remove UseBridges
|
||||
if ! grep "bridge " /etc/tor/torrc; then
|
||||
if ! grep "Bridge " /etc/tor/torrc; then
|
||||
if ! grep "#UseBridges" /etc/tor/torrc; then
|
||||
sed -i 's|UseBridges|#UseBridges|g' /etc/tor/torrc
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue