[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Mldonkey-users] Traffic shaping
From: |
Georgi Georgiev |
Subject: |
[Mldonkey-users] Traffic shaping |
Date: |
Wed, 17 Sep 2003 19:21:49 +0900 |
User-agent: |
Mutt/1.5.4i-ja.1 |
I saw several posts about traffic shaping mldonkey, but I am looking for a more
simple approach.
I want to, if possible, use an approach similar to what I did with Direct
Connect. I don't like the DC support in mldonkey, so I use dcgui-qt. What I did
is that I added two IP addresses to my eth0 -- 10.0.0.2 and 10.0.0.12. I also
patched dclib and dcgui-qt to have a new option that allows an IP address to be
specified for outgoing connections. So, my dcgui-qt is now using 10.0.0.12 for
outgoing connections, my NAT router forwards the appropriate DC ports from
the outside to 10.0.0.12 and my bandwidth limiting script looks like this:
tc qdisc add dev eth0 root handle 1: htb
tc class add dev eth0 parent 1: classid 1:1 htb rate 100Mbit
tc class add dev eth0 parent 1:1 classid 1:10 htb rate 100Mbit
tc class add dev eth0 parent 1:1 classid 1:20 htb rate 350Kbps
tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip src 10.0.0.12
flowid 1:20
This works perfecetly with dcgui-qt.
I wanted to use the same approach with mldonkey so I also forwarded the ports,
that mldonkey listens on, to 10.0.0.12. This way, when the remote user
initiates a connection, the bandwidth cap again applies. Regarding locally
originating connections, though... I don't think there is an option to choose
the IP address for outgoing connections, right? Is somebody able to create a
patch similar to what I did with dcgui-qt? OCaml is not something I feel like
starting to learn.
--
( Georgi Georgiev ( Sometime when you least expect it, Love will (
) address@hidden ) tap you on the shoulder... and ask you to )
( +81(90)6266-1163 ( move out of the way because it still isn't (
) ------------------- ) your turn. -- N.V. Plyter )
- [Mldonkey-users] Traffic shaping,
Georgi Georgiev <=