Skip to content

Commit

Permalink
Add update/version to script. Cleanup copyright and other text.
Browse files Browse the repository at this point in the history
  • Loading branch information
magnific0 committed Feb 16, 2018
1 parent f4405e8 commit 6b6c510
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 39 deletions.
40 changes: 20 additions & 20 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
Changes since version 1.4
- download limiting has been added from (removed in 1.3), it had to be reworked
the script now directs ingress to ifb virtual interface where it is properly
limited. Source for this work are:
Changes since version 1.4 - Jacco Geul <jacco@geul.net>:
- download limiting has been added from (removed in 1.3), it had to be
reworked the script now directs ingress to ifb virtual interface where
it is properly limited. Source for this work are:
- https://gist.github.com/ole1986/d9d6be5218affd41796610a35e3b069c
- https://wiki.archlinux.org/index.php/advanced_traffic_control
- make upload or download limiting optional

Changes since version 1.3 (forked by Saimonn/Camptocamp):
- move from CBQ to HTB queing.
CBQ didn't cope well on a ~100Mbps link : individual downloads
were ceiling at 3Mbit/s. Moving to HTB allows to really use all the
available bandwith, event with a single TCP connection, and without
any caveats on SIP telephony or link reactivity.
Changes since version 1.3 - Simon Séhier <simon@sehier.fr>:
- move from CBQ to HTB queing.
CBQ didn't cope well on a ~100Mbps link : individual downloads
were ceiling at 3Mbit/s. Moving to HTB allows to really use all the
available bandwith, event with a single TCP connection, and without
any caveats on SIP telephony or link reactivity.

Changes since version 1.2 (forked by magnic0):
- added command-line interface (through options and flags)
that didn't seem to be working before as the options were
hardcoded in the script.
Changes since version 1.2 - Jacco Geul <jacco@geul.net>:
- added command-line interface (through options and flags)
that didn't seem to be working before as the options were
hardcoded in the script.

Changes since version 1.1:
- Georg Wild <georg.wild@gmx.de> noticed that
NOPRIOHOSTDST was never used
Changes since version 1.1 - Bert Hubert <ahu@ds9a.nl>:
- Georg Wild <georg.wild@gmx.de> noticed that
NOPRIOHOSTDST was never used

Changes since version 1.0:
Changes since version 1.0 - Bert Hubert <ahu@ds9a.nl>:

- we now prioritize ALL small packets, not just acks
- ability to deprioritize certain source/dst host/ports
- we now prioritize ALL small packets, not just acks
- ability to deprioritize certain source/dst host/ports
23 changes: 11 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ The Wonder Shaper 1.4
Copyright
-------------

bert hubert <ahu@ds9a.nl> http://lartc.org/wondershaper (c) Copyright 2002
Simon Séhier <simon@sehier.fr> - Camptocamp (c) Copyright 2015 - HTB
magnific0 http://www.github.com/magnific0 (c) Copyright 2012-2017
Licenced under the GPL
Copyright (c) 2002-2017 Bert Hubert <ahu@ds9a.nl>, Jacco Geul <jacco@geul.net>, Simon Séhier <simon@sehier.fr>

See the ChangeLog for information on the individual contributions of the authors.

About
--------------
Expand Down Expand Up @@ -78,7 +77,7 @@ This way wondershaper is activated with your setting upon reboot.
Usage
--------------

wondershaper [-hcs] [-a <adapter>] [-d <rate>] [-u <rate>]
wondershaper [-hcs] [-a <adapter>] [-d <rate>] [-u <rate>]

The following command line options are allowed:

Expand All @@ -98,18 +97,18 @@ The following command line options are allowed:

The different modes are:

wondershaper -a <adapter> -d <rate> -u <rate>
wondershaper -a <adapter> -d <rate> -u <rate>

wondershaper -c -a <adapter>
wondershaper -c -a <adapter>

wondershaper -s -a <adapter>
wondershaper -s -a <adapter>

Some examples:

wondershaper -a eth0 -d 1024 -u 512
wondershaper -a eth0 -d 1024 -u 512

wondershaper -a eth1 -d 94000 -u 94000 # could be used on a 100Mbps link
wondershaper -a eth1 -d 94000 -u 94000 # could be used on a 100Mbps link

wondershaper -a eth1 -u 94000 # only limit upload
wondershaper -a eth1 -u 94000 # only limit upload

wondershaper -c -a eth0
wondershaper -c -a eth0
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
1.3
1.4

19 changes: 13 additions & 6 deletions wondershaper
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,17 @@
# Set the following values to somewhat less than your actual download
# and uplink speed. In kilobits. Also set the device that is to be shaped.
#
# Orginal: bert hubert <ahu@ds9a.nl>, Copyright 2002, Licensed under the GPL
# Fixes: magnific0 (http://www.github.com/magnific0/wondershaper)
# systemd .service and .conf file by kfgz and cmsigler at aur.archlinux.org
# License GPLv2 <https://gnu.org/licenses/gpl-2.0.html>
#
# Copyright (c) 2002-2018 Bert Hubert <ahu@ds9a.nl>,
# Jacco Geul <jacco@geul.net>, Simon Séhier <simon@sehier.fr>
#
# See the ChangeLog for information on the individual contributions of the authors.

QUANTUM=6000
BURST=15k
COMMONOPTIONS="$COMMONOPTIONS"

VERSION=1.4

usage()
{
Expand All @@ -28,6 +31,7 @@ OPTIONS:
-p Use presets in /etc/conf.d/wondershaper.conf
-c Clear the limits from adapter
-s Show the current status of adapter
-v Show the current version
MODES:
wondershaper -a <adapter> -d <rate> -u <rate>
Expand All @@ -48,10 +52,12 @@ IFACE=
IFB="ifb0"
MODE=

while getopts hd:u:a:pcs o
while getopts hvd:u:a:pcs o
do case "$o" in
h) usage
exit 1;;
v) echo "Version $VERSION"
exit 0;;
d) DSPEED=$OPTARG;;
u) USPEED=$OPTARG;;
a) IFACE=$OPTARG;;
Expand Down Expand Up @@ -224,7 +230,8 @@ then

# Redirect ingress (incoming) to egress ifb0
tc qdisc add dev $IFACE handle ffff: ingress
tc filter add dev $IFACE parent ffff: protocol ip u32 match u32 0 0 action mirred egress redirect dev $IFB
tc filter add dev $IFACE parent ffff: protocol ip u32 match u32 0 0 \
action mirred egress redirect dev $IFB

# Add class and rules for virtual
tc qdisc add dev $IFB root handle 2: htb
Expand Down

0 comments on commit 6b6c510

Please sign in to comment.