Show tor bridge details on about screen

This commit is contained in:
Bob Mottram 2016-12-22 13:44:01 +00:00
parent 065394c83c
commit 454e48a53e
1 changed files with 29 additions and 0 deletions

View File

@ -501,6 +501,34 @@ function show_ip_addresses {
echo ''
}
function show_tor_bridges {
bridges_list=$(grep "Bridge " /etc/tor/torrc | grep -v '##')
if [ ${#bridges_list} -gt 0 ]; then
echo $'Tor Bridges'
echo '==========='
echo ''
echo "${bridges_list}"
echo ''
echo ''
fi
if ! grep "#BridgeRelay" /etc/tor/torrc; then
if grep "BridgeRelay 1" /etc/tor/torrc; then
read_config_param 'TOR_BRIDGE_PORT'
read_config_param 'TOR_BRIDGE_NICKNAME'
if [ ${#TOR_BRIDGE_NICKNAME} -gt 0 ]; then
echo "Tor bridge on this system"
echo '========================='
echo ''
echo "IP Address: $(get_ipv4_address)"
echo "Port: ${TOR_BRIDGE_PORT}"
echo "Nickname: ${TOR_BRIDGE_NICKNAME}"
echo ''
echo ''
fi
fi
fi
}
function show_ssh_public_key {
echo $'SSH Public Keys'
echo '==============='
@ -519,6 +547,7 @@ function show_about {
clear
show_ip_addresses
show_tor_bridges
show_ssh_public_key
show_domains
show_mirrors_password