Option to force usage of v2 onion address

Hopefully this won't be needed for long
This commit is contained in:
Bob Mottram 2018-02-23 11:46:13 +00:00
parent 8fe06f8111
commit 3e03e30fd2
2 changed files with 8 additions and 1 deletions

View File

@ -392,6 +392,7 @@ function install_rss_main {
sleep 2
USE_V2_ONION_ADDRESS=1
RSS_MOBILE_READER_ONION_HOSTNAME=$(add_onion_service mobilerss 80 ${RSS_MOBILE_READER_ONION_PORT})
echo 'server {' > /etc/nginx/sites-available/$RSS_READER_DOMAIN_NAME

View File

@ -31,6 +31,7 @@
# The maximum amount of traffic per day in gigabytes
TOR_MAX_TRAFFIC_PER_MONTH_GB=10
USE_V2_ONION_ADDRESS=
HIDDEN_SERVICE_PATH='/var/lib/tor/hidden_service_'
function add_email_hostname {
@ -124,7 +125,12 @@ function add_onion_service {
fi
if ! grep -q "hidden_service_${onion_service_name}" /etc/tor/torrc; then
echo "HiddenServiceDir ${HIDDEN_SERVICE_PATH}${onion_service_name}/" >> /etc/tor/torrc
echo 'HiddenServiceVersion 3' >> /etc/tor/torrc
if [ ! $USE_V2_ONION_ADDRESS ]; then
echo 'HiddenServiceVersion 3' >> /etc/tor/torrc
else
echo 'HiddenServiceVersion 2' >> /etc/tor/torrc
USE_V2_ONION_ADDRESS=
fi
echo "HiddenServicePort ${onion_service_port_from} 127.0.0.1:${onion_service_port_to}" >> /etc/tor/torrc
if [ ${#onion_stealth_name} -gt 0 ]; then
echo "HiddenServiceAuthorizeClient stealth ${onion_stealth_name}" >> /etc/tor/torrc