#!/bin/sh echo "## Simple Tor client configuration" [ "$TOR_SOCKS_PORT" ] && echo "SocksPort $TOR_SOCKS_PORT" [ "$TOR_SOCKS_ADDRESS" ] && echo "SocksListenAddress $TOR_SOCKS_ADDRESS" [ "$TOR_CONTROL_PORT" ] && echo "ControlPort $TOR_CONTROL_PORT" [ "$TOR_CIRCUIT_IDLE_TIMEOUT" ] && echo "CircuitIdleTimeout $TOR_CIRCUIT_IDLE_TIMEOUT" if [ "$TOR_SOCKS_POLICY_REJECT" != "no" ]; then echo "$TOR_SOCKS_POLICY_ACCEPT" | grep -v "^#" | while read -r addr; do [ -n "$addr" ] && echo "SocksPolicy accept $addr" done fi [ "$TOR_SOCKS_POLICY_REJECT" != "no" ] && echo "SocksPolicy reject *" if [ ! -z "$TOR_ENTRY_NODES" ]; then echo -n "EntryNodes " echo "$TOR_ENTRY_NODES" | grep -v "^#" | while read -r srv; do [ -n "$srv" ] && echo -n "$srv," done echo "" fi [ "$TOR_STRICT_ENTRY_NODES" == "yes" ] && echo "StrictEntryNodes 1" if [ ! -z "$TOR_EXIT_NODES" ]; then echo -n "ExitNodes " echo "$TOR_EXIT_NODES" | grep -v "^#" | while read -r srv; do [ -n "$srv" ] && echo -n "$srv," done echo "" fi [ "$TOR_STRICT_EXIT_NODES" == "yes" ] && echo "StrictExitNodes 1" cat <