#!/bin/sh echo "User tor" echo "Group tor" if [ ! -z "$TOR_DATADIRECTORY" ]; then echo "DataDirectory $TOR_DATADIRECTORY" else echo "DataDirectory /var/tmp/tor" fi [ "$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" if [ "$TOR_RELAY_ENABLED" == "yes" ]; then [ "$TOR_NICKNAME" ] && echo "Nickname $TOR_NICKNAME" [ "$TOR_ADDRESS" ] && echo "Address $TOR_ADDRESS" [ "$TOR_BANDWIDTHRATE" ] && echo "BandwidthRate $TOR_BANDWIDTHRATE" [ "$TOR_BANDWIDTHBURST" ] && echo "BandwidthBurst $TOR_BANDWIDTHBURST" [ "$TOR_ORPORT" ] && echo "ORPort $TOR_ORPORT" [ "$TOR_DIRPORT" ] && echo "DirPort $TOR_DIRPORT" [ "$TOR_MAXONIONSPENDING" ] && echo "MaxOnionsPending $TOR_MAXONIONSPENDING" [ "$TOR_EXITPOLICY" ] && echo "ExitPolicy $TOR_EXITPOLICY" fi cat <