rakshasa / rtorrent

rTorrent BitTorrent client
https://github.com/rakshasa/rtorrent/wiki
GNU General Public License v2.0
4.05k stars 412 forks source link

ipv4_filter.load does not exist #1173

Open memborg opened 1 year ago

memborg commented 1 year ago

I'm running rtorrent 0.9.8 on Debian Bullseye, which does not support ipv4_filter.load. Is there a way to check which "modules" are enabled and which are not?

kannibalox commented 1 year ago

rtorrent doesn't have modules, any periods in method names are just there to group things nicely. You can list the available methods with system.listMethods, which from my quick testing shows that it does indeed support ipv4_filter.load:

$ docker run --rm -it -p 7000:7000 debian:bullseye bash -c "apt update && apt install -y rtorrent && rtorrent -o scgi_port=0.0.0.0:7000"
$ rtxmlrpc system.listMethods | grep ipv4
ipv4_filter.add_address
ipv4_filter.dump
ipv4_filter.get
ipv4_filter.load
ipv4_filter.size_data
memborg commented 1 year ago

I can see I forgot to say that I'm getting this error in the .rtorrent.rc file. Sorry about that.

kannibalox commented 1 year ago

Please post the .rtorrent.rc you are using and the error message you are receiving.

memborg commented 1 year ago

As requested the .rctorrent.rc file.

You'll find my IP filtering config starting at line 47 and the most recent config I've tried is at line 49

# IP filtering
## schedule2 = load_ipv4_filter, 5, 0, "ipv4_filter.load=(cat,(cfg.basedir),bt_blocklists),unwanted"
ipv4_filter.load=(cat,(cfg.basedir),bt_blocklists),unwanted

rtorrent.rc.txt

kannibalox commented 1 year ago

The file needs to exist for the command to succeed, but other than it works as expected for me.

$ docker run --rm -it -v "$PWD"/rtorrent.rc.txt:/root/.rtorrent.rc -p 7000:7000 debian:bullseye \
  bash -c "apt update && apt install -y rtorrent && rtorrent -o scgi_port=0.0.0.0:7000"
rtorrent: Error in option file: ~/.rtorrent.rc:49: Could not open ip filter file: ~/rtorrent/bt_blocklists
$ docker run --rm -it -v "$PWD"/rtorrent.rc.txt:/root/.rtorrent.rc -p 7000:7000 debian:bullseye \
  bash -c "apt update && apt install -y rtorrent && mkdir ~/rtorrent && touch ~/rtorrent/bt_blocklists && rtorrent -o scgi_port=0.0.0.0:7000" # Starts up as expected

Is there a specific error message you're getting?

memborg commented 1 year ago

Oh, sorry I forgot to add the error message I get: rtorrent: Error in option file: ~/.rtorrent.rc:49: Command "ipv4_filter.load" does not exist.

You are so patient and I'm sorry you have to endure my vacation brain.

kannibalox commented 1 year ago

Can you please confirm you are using vanilla rtorrent, and not a fork like https://github.com/jesec/rtorrent? That fork in particular has removed all the filter commands. If that's not the case, I am officially stumped, those commands have been around since at least 2011 and there's no special logic around them.

memborg commented 1 year ago

You're right. I have downloaded it from the jesec repository. I thought I was using the one from the official Debian repos. Sorry for the inconvenience.

memborg commented 1 year ago

The static compiled version works as intended.