pyshaper 0.1.3 review

Download
by rbytes.net on

pyshaper is a simple yet very versatile dynamic bandwidth manager application for Linux platforms

License: (FDL) GNU Free Documentation License
File size: 54K
Developer: David McNab
0 stars award from rbytes.net

pyshaper is a simple yet very versatile dynamic bandwidth manager application for Linux platforms.

Development of pyshaper was started by a number of factors:

Broadband internet access within New Zealand is abysmal, due to the local telco mafia controlling the local loop. You have to either put up with 128kb/s up/down (with 5-15GB monthly traffic), or suffer stupidly restrictive traffic caps (as little as 400MB/month) if you want faster connections
Existing traffic shaping software is either extremely limited or extremely complicated
I like to participate in a few different Peer2peer networks (eg Freenet, I2P etc - not your typical warez/MP3-type networks, but more privacy/anonymity networks), and I needed a simple way to stop these programs from blowing out my traffic
'tc' has a steep learning curve, and doesn't allow easy filtering on any criteria other than source/destination host/port.

I scoured the net, and came across the wondershaper script, as well as a prototype easy-shaper program called 'snitch'. These programs helped me to start fathoming the occult mysteries of the arcane 'tc' utility (part of the iproute2 suite). tc in its present state is very lacking in doco and examples, so these programs helped heaps.

So, as is an Open Source motto - If you can't find it, write it! - I realised I had to pull my finger out and write something myself.

Here are some key features of "pyshaper":
pyshaper lets you set bandwidth minimum and maximum limits on several criteria:

remote host/port, and local host/port (most shaper apps have this)
pid of locally connected program
username under which local program is running
command line and arguments under which local program was launched
country in which remmote peer resides

With all these filtering criteria available, you can set up some pretty sophisticated filters.

For instance, you can use the 'by program' filtering to put bandwidth caps on peer2peer programs that often talk via several different protocols, to different ports (which evades most other traffic-shaping programs).

Or, you can set individual inbound and/or outbound limits based on specific countries (or all countries other than your own).

Configuration file syntax is pretty simple and straightforward. No arcane nuts'n'bolts TCP/IP grease-monkey bit-bashing knowledge needed. After a quick pass through the doco and examples, you'll be building your shaping configuration within a few short minutes.

Requirements:
Linux 2.4.x, 2.5.x or 2.6.x (tested on 2.6.4) iproute2 software (with the 'tc' utility) (available with all decent Linux distros)
Python 2.2.2 or later
GeoIP (optional, debian package python-geoip)
A few simple kernel settings, spelt out in the INSTALL file
In addition, if you want to run the optional GUI front-end, you'll need:
Tkinter (debian package python-tk)
Tk 8.4 or later - http://www.tcl.tk (debian package tk8.4 (or 'tk8.5'...)
Python Megawidgets (PMW) - http://pmw.sourceforge.net (debian package python-pmw)
tcpdump (debian package tcpdump)

pyshaper 0.1.3 search tags