[tor-commits] [arm/release] Adding wizard option for port forwarding

atagar at torproject.org atagar at torproject.org
Sun Jul 17 06:08:28 UTC 2011


commit b8101c830699b2c931c30e8a0fdaa10ca8e34d3d
Author: Damian Johnson <atagar at torproject.org>
Date:   Tue Jun 28 08:52:35 2011 -0700

    Adding wizard option for port forwarding
    
    Wizard option for the PortForwarding config option. This will need to be
    omitted if...
    - "tor-fw-helper" doesn't exist in the user's PATH
    - tor doesn't have the PortForwarding option (introduced in 0.2.3.1-alpha)
---
 src/cli/wizard.py |    4 +++-
 src/settings.cfg  |    4 ++++
 2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/src/cli/wizard.py b/src/cli/wizard.py
index d2fb067..7a9eaa0 100644
--- a/src/cli/wizard.py
+++ b/src/cli/wizard.py
@@ -15,13 +15,14 @@ from util import enum, uiTools
 RelayType = enum.Enum("RELAY", "EXIT", "BRIDGE", "CLIENT")
 
 # all options that can be configured
-Options = enum.Enum("DIVIDER", "NICKNAME", "CONTACT", "NOTIFY", "BANDWIDTH", "LIMIT", "CLIENT", "STARTUP", "NOTICE", "POLICY", "WEBSITES", "EMAIL", "IM", "MISC", "PLAINTEXT")
+Options = enum.Enum("DIVIDER", "NICKNAME", "CONTACT", "NOTIFY", "BANDWIDTH", "LIMIT", "CLIENT", "PORTFORWARD", "STARTUP", "NOTICE", "POLICY", "WEBSITES", "EMAIL", "IM", "MISC", "PLAINTEXT")
 RelayOptions = {RelayType.RELAY: (Options.NICKNAME,
                                   Options.CONTACT,
                                   Options.NOTIFY,
                                   Options.BANDWIDTH,
                                   Options.LIMIT,
                                   Options.CLIENT,
+                                  Options.PORTFORWARD,
                                   Options.STARTUP),
                 RelayType.EXIT:  (Options.NICKNAME,
                                   Options.CONTACT,
@@ -29,6 +30,7 @@ RelayOptions = {RelayType.RELAY: (Options.NICKNAME,
                                   Options.BANDWIDTH,
                                   Options.LIMIT,
                                   Options.CLIENT,
+                                  Options.PORTFORWARD,
                                   Options.STARTUP,
                                   Options.DIVIDER,
                                   Options.NOTICE,
diff --git a/src/settings.cfg b/src/settings.cfg
index 0ab57a2..435a4d2 100644
--- a/src/settings.cfg
+++ b/src/settings.cfg
@@ -347,6 +347,7 @@ wizard.message.exit Exits connect between the Tor network and the outside Intern
 
 wizard.toggle Notify => Yes, No
 wizard.toggle Client => Enabled, Disabled
+wizard.toggle Portforward => Enabled, Disabled
 wizard.toggle Startup => Yes, No
 wizard.toggle Notice => Yes, No
 wizard.toggle Policy => Default, Custom
@@ -367,6 +368,7 @@ wizard.default Notify => true
 wizard.default Bandwidth => 5 MB/s
 wizard.default Startup => true
 wizard.default Client => false
+wizard.default Portforward => true
 wizard.default Notice => true
 wizard.default Policy => true
 wizard.default Websites => true
@@ -388,6 +390,7 @@ wizard.label.opt Notify => Issue Notification
 wizard.label.opt Bandwidth => Relay Speed
 wizard.label.opt Limit => Monthly Limit
 wizard.label.opt Client => Client Usage
+wizard.label.opt Portforward => Port Forwarding
 wizard.label.opt Startup => Run At Startup
 wizard.label.opt Notice => Disclaimer Notice
 wizard.label.opt Policy => Exit Policy
@@ -408,6 +411,7 @@ wizard.description.opt Notify => Sends automated email notifications to the abov
 wizard.description.opt Bandwidth => Limit for the average rate at which you relay traffic.
 wizard.description.opt Limit => Maximum amount of traffic to relay each month. Some ISPs, like Comcast, cap their customer's Internet usage so this is an easy way of staying below that limit.
 wizard.description.opt Client => Enable this if you would like to use Tor yourself. This opens or closes the SOCKS port used by applications for connecting to Tor.
+wizard.description.opt Portforward => If needed, attempts NAT traversal using UPnP and NAT-PMP. This allows for automatic port forwarding on most home routers.
 wizard.description.opt Startup => Runs Tor in the background when the system starts.
 wizard.description.opt Notice => Provides a disclaimer that this is an exit on port 80 (http://www.atagar.com/exitNotice).
 wizard.description.opt Policy => Ports allowed to exit from your relay. The default policy allows for common services while limiting the chance of getting a DMCA takedown for torrent traffic (http://www.atagar.com/exitPolicy).





More information about the tor-commits mailing list