# 3. Change all the proxy_set_header directives in your nginx config to use the $mapped_country_code variable instead of $geoip_country_code or a fixed value like 'TOR'
# 4. (optional) If you want to instead redirect all these known exits to your .onion instead, add "if ($mapped_country_code = "T1") { return 302 'http://xxxx.onion$request_uri'; }" to your clearnet vhost (server block) of your jschan nginx sites-available config
#
#get secops institute tor exit list to temp file
wget --retry-connrefused -qO- https://raw.githubusercontent.com/SecOps-Institute/Tor-IP-Addresses/master/tor-exit-nodes.lst | tee /tmp/tor-exits >/dev/null
#get fissionrelays tor exit lists to temp file
wget --retry-connrefused -qO- https://lists.fissionrelays.net/tor/exits-ipv6.txt | tee -a /tmp/tor-exits >/dev/null
wget --retry-connrefused -qO- https://lists.fissionrelays.net/tor/exits-ipv4.txt | tee -a /tmp/tor-exits >/dev/null
#add start of nginx conf file for default, loki and .onion