Rapidshare - lower priority

I need to put everything which consists of *.rapidshare.com, to a lower priority than anything else. Everything else should have higher priority than downloading (useless) files from just only one provider - RS. Since RS occupies all my bandwidth, I can’t even play normally :slight_smile:

I would like to EITHER limit DL from RS to a certain number (like 5 Mbit/s) or just to have it using all available bandwidth, when nothing other is using the same bandwidth.

The simplest way to limit the Download speed from exactly RS.com would be to make a simple queue, and that I manually turn it on or off, depending on my needs, but I don’t know what to put in it since Rapidshare has many many servers with many many IP’s…

Edit: I’ve found mrz’s script on the forum but don’t know how to implement it into queue… please help… and how often should the script run.. once in 24h or more?

# check every dns entry
:foreach i in=[/ip dns cache find] do={
    :local bNew "true";
#  check if dns name contains rapidshare
    :if ([:find [/ip dns cache get $i name] "rapidshare"] != 0) do={
        :local tmpAddress [/ip dns cache get $i address] ;
#---- if address list is empty do not check ( add address directly )
        :if ( [/ip firewall address-list find ] = "") do={
            /ip firewall address-list add address=$tmpAddress list=rapidshare disabled=no;
        } else={
#------- check every address list entry
            :foreach j in=[/ip firewall address-list find ] do={
#---------- set bNew variable to false if address exists in address list
                :if ( [/ip firewall address-list get $j address] = $tmpAddress ) do={
                    :set bNew "false";
                }
            }
#------- if address is new then add to address list
            :if ( $bNew = "true" ) do={
                /ip firewall address-list add address=$tmpAddress list=rapidshare disabled=no
            }
        }
    }
}

# [ THE END ]

Please help!

Thanks

By searching forum I found out that the address list needs to be marked in mangle. Then queued somehow. Please help.

Use connection bytes option when mangle packets…0-500000 for browsing, >500000 for HTTP download (rapidshare)…it works for me…