[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r11206: minor tweaks (tor/trunk/contrib)
Author: arma
Date: 2007-08-19 17:05:08 -0400 (Sun, 19 Aug 2007)
New Revision: 11206
Modified:
tor/trunk/contrib/linux-tor-prio.sh
Log:
minor tweaks
Modified: tor/trunk/contrib/linux-tor-prio.sh
===================================================================
--- tor/trunk/contrib/linux-tor-prio.sh 2007-08-19 21:03:06 UTC (rev 11205)
+++ tor/trunk/contrib/linux-tor-prio.sh 2007-08-19 21:05:08 UTC (rev 11206)
@@ -1,17 +1,17 @@
#!/bin/bash
-# Writen by Mike Perry
+# Written by Mike Perry
# Based on instructions from Dan Singletary's ADSL Bandwidth Management HOWTO
# http://www.faqs.org/docs/Linux-HOWTO/ADSL-Bandwidth-Management-HOWTO.html
-# This script is Public Domain.
+# This script is Public Domain.
# The following configuration works well for a ~5Mbit tor node. It requires
-# that you place your Tor traffic on a seperate IP from the rest of your
+# that you place your Tor traffic on a separate IP from the rest of your
# traffic.
# BEGIN DEVICE PARAMETERS
DEV=eth0
-BOX_IP=42.42.42.42
+BOX_IP=42.42.42.42
TOR_IP=43.43.43.43
# Average ping to most places on the net, milliseconds
@@ -26,7 +26,7 @@
# fairness no matter what the queing priority is.
RATE_UP=5000
-# RATE_UP_TOR is the minimum speed your Tor connections will have.
+# RATE_UP_TOR is the minimum speed your Tor connections will have.
# They will have at least this much bandwidth for upload
RATE_UP_TOR=1500
@@ -47,7 +47,7 @@
# The queue size should be no larger than your bandwidth-delay
# product. This is RT latency*bandwidth/MTU/2
-BDP=$(expr $RTT_LATENCY \* $RATE_UP / $AVG_PKT)
+BDP=$(expr $RTT_LATENCY \* $RATE_UP / $AVG_PKT)
# Further research indicates that the BDP calculations should use
# RTT/sqrt(n) where n is the expected number of active connections..
@@ -82,8 +82,8 @@
ip link set imq0 down 2> /dev/null > /dev/null
rmmod imq 2> /dev/null > /dev/null
-if [ "$1" = "stop" ]
-then
+if [ "$1" = "stop" ]
+then
echo "Shaping removed on $DEV."
exit
fi
@@ -121,7 +121,8 @@
# High prio for everything else
# Don't bother to use BOX_IP. Box probably has other IPs too...
-#iptables -t mangle -A TORSHAPER-OUT -s $BOX_IP -j MARK --set-mark 20
+#iptables -t mangle -A TORSHAPER-OUT -s $BOX_IP -j MARK --set-mark 20
iptables -t mangle -A TORSHAPER-OUT -m mark --mark 0 -j MARK --set-mark 20
echo "Outbound shaping added to $DEV. Rate for Tor upload at least: ${RATE_UP_TOR}Kbyte/sec."
+