# This is a tor configuration made by arm. To change the configuration by hand
# edit this file then either...
# - tell arm to reset tor by pressing 'x'
# - run 'pkill -sighup tor'
# - or restart tor
#
# Descriptions of all of these configuration attributes (and many more) are
# available in the tor man page.

[IF SHUTDOWN]
  [NEWLINE]
  # The following flag tells arm to shut down tor when it quits.
  # ARM_SHUTDOWN
[END IF]

[NEWLINE]
DataDirectory [DATA_DIR]      # location to store runtime data
Log [LOG_ENTRY]               # location to log notices, warnings, and errors
ControlPort 9052              # port controllers can connect to
CookieAuthentication 1        # method for controller authentication

[IF RELAY | EXIT | BRIDGE]
  RunAsDaemon 1               # runs as a background process
  
  [IF LOWPORTS | STARTUP]
    User [USERNAME]           # lowers our permissions to this user
  [END IF]
[END IF]
[NEWLINE]

[IF RELAY | EXIT | BRIDGE]
  [IF LOWPORTS]
    ORPort 443                # port used for relaying traffic
  [ELSE]
    ORPort 9001               # port used for relaying traffic
  [END IF]
  
  [IF RELAY | EXIT]
    [IF LOWPORTS]
      DirPort 80              # port used for mirroring directory information
    [ELSE]
      DirPort 9030            # port used for mirroring directory information
    [END IF]
    
    Nickname [NICKNAME]       # name for this relay
    ContactInfo [CONTACT]     # contact information in case there's an issue
  [END IF]
  
  [IF BRIDGE]
    BridgeRelay 1             # makes us a bridge rather than a public relay
    
    [IF NOT DISTRIBUTE]
      PublishServerDescriptor 0 # keeps our bridge descriptor private
    [END IF]
  [END IF]
  
  RelayBandwidthRate [BANDWIDTH] # limit for the bandwidth we'll use to relay
  RelayBandwidthBurst [BURST] # maximum rate when relaying bursts of traffic
  AccountingMax [LIMIT]       # maximum amount of traffic we'll relay per month
  
  [IF NOT CLIENT]
    SocksPort 0               # prevents tor from being used as a client
  [END IF]
  
  [IF PORTFORWARD]
    PortForwarding 1          # negotiates UPnP and NAT-PMP if needed
  [END IF]
  
  [IF RELAY | BRIDGE]
    ExitPolicy reject *:*     # prevents us from connecting to non-relays
  [ELSE]
    [IF NOTICE]
      DirPortFrontPage [NOTICE_PATH] # disclaimer saying that this is an exit
    [END IF]
    
    [NEWLINE]
    [EXIT_POLICY]
    ExitPolicy reject *:*     # prevents any exit traffic not permitted above
  [END IF]
[ELSE]
  ClientOnly 1                # prevents us from ever being used as a relay
  MaxCircuitDirtiness [REUSE] # duration that circuits can be reused
  
  [IF BRIDGED]
    UseBridges 1              # uses the following bridges to connect
    [BRIDGES]
  [END IF]
[END IF]
[NEWLINE]

