aMule Forum
English => Feature requests => Topic started by: gav616 on January 07, 2010, 08:12:34 PM
-
To be able to update the IPFilter using 'amulecmd'.
For example:
#!/bin/sh
amulecmd -c update ipfilter
Reason:
I wanna create a cron script to update the filter once a week.
either from the current URL in my config, or maybe you can also specify a url when issuing the cmd.
-
Sure. How?
At the moment we have reload ipfilter.
1) I could add reload ipfilternet
2) I could change it to reload ipfilter local and reload ipfilter net (breaking reload ipfilter).
I find 2) cleaner. update ipfilter doesn't fit in well imho.
-
I agree with you, my suggestion was an example, based on, well, not much :D
-
(breaking reload ipfilter).
You don't necessarily have to. You can make reload ipfilter an alias of reload ipfilter local.
And you could maybe add a variant which accepts an url, such as reload ipfilter from <url>.
-
aMulecmd$ help reload ipfilter
RELOAD IPFILTER: Reload IP Filter table.
Available extensions:
File Reload current IP Filter table.
Net Update IP Filter table from URL.
aMulecmd$ help reload ipfilter net
RELOAD IPFILTER NET: Update IP Filter table from URL.
aMulecmd$ reload ipfilter net
> Operation was successful.
aMulecmd$ reload ipfilter net http://bluetack.co.uk/config/level1.gz
> Operation was successful.
aMulecmd$ reload ipfilter file
> Operation was successful.
aMulecmd$ reload ipfilter
> Operation was successful.
aMulecmd$ reload ipfilter file duh
This command should not have any parameters.
Type 'help reload ipfilter file' to get more help.
aMulecmd$
9948
-
Marvellous! much appreciated ;D
Now make it so it can only update if the file is newer then the existing one... (I like keeping you busy...:))
Reason:
Bluetack and other mirrors get hammed, it would be nice if we only updated when necessary.
edit*
I think the eMule mod MorphXT uses a system to only download when needed, might be helpful to look at the source code. (maybe)
-
Might be helpful if you look at the source code and give a hint how this is supposed to work.
I think this could only be done for a special site, but not generally. But I'm open for suggestions. :)
-
Basically, there are two ways to do it.
1) The server checks if the file is newer:
We need to include in the request an "If-Modified-Since" header, and the server should reply with a "304 Not modified" response if the file is unchanged.
2) We check if the file is newer on the server:
We send a HEAD request to the server, and then check the "Last-Modified" response header.
-
9949
gav ~ $ /usr/bin/amulecmd -c reload ipfilter net http://bluetack.co.uk/config/level1.gz
Unexpected parameter 'ipfilter'
-
amulecmd -c "reload ipfilter net http://bluetack.co.uk/config/level1.gz"
-
:o ;D
-
Is it possible for multiple lists to be supported?
obviously they would have to be downloaded then merged together...
-
It would not be a big problem, but do you really think that's necessary?
-
It would not be a big problem, but do you really think that's necessary?
ability to mix and match the filters would be very useful.
e.g.
using two or three lists:
level1.gz - anti-p2p corps
badpeers.gz - anti-p2p clients
ect..
-
Aren't these combined lists also available for download?
- I'd make it so that you can enter several URLs (separated by ';') instead of the single one.
-
Very few (one?) offer combined lists (ipfilter.dat), the rest are manual download only (the url changes every 'X' time, and only updated once a month..)
Thank you.
-
If they are manual download only this won't help anyway, right?
-
And what happens if the two (or more) lists specify overlapping IP ranges with different filtering level? Which should be preferred?
-
Last entry wins. Like if you just copy the lists together into one file, as gav616 is probably doing now.
-
The manual 'ipfilter.dat' from bluetack is a number of there filters pre-checked/merged, using there own 'Blocklist Manager'
then its presented as a download on there backup site (in emule file format (including filter level lines and such)).
Another unique Blocklist Manager feature allows us to merge all adjacent IP ranges together to help minimise overall file sizes and help improve the efficiency of IP blocking programs.
what this feature will do is get the raw PG file format and just copy the lists together into one file, like you say.
Less efficient then going through a checking/deleting/merge/cut process (another system to write :S), but as you said, Last entry wins.