Page 1 of 1

NO IPV6 under Deluged 2.0.5 + libtorrent: 2.0.5.0

Posted: Sun Apr 03, 2022 11:26 pm
by mlyxshi

Code: Select all

deluged 2.0.5
libtorrent: 2.0.5.0
Python: 3.8.10
OS: Linux Ubuntu 20.04 focal
I compile Boost.Python libtorrent deluge.

Code: Select all

#!/bin/sh

apt install  wget curl git build-essential -y

cd ~
wget https://boostorg.jfrog.io/artifactory/main/release/1.78.0/source/boost_1_78_0.tar.gz
tar xvf boost_1_78_0.tar.gz
cd boost_1_78_0
./bootstrap.sh --with-python=/usr/bin/python3
./b2 --with-python
./b2 install --with-python

apt install -y libboost-tools-dev libboost-dev libboost-system-dev libssl-dev 
cd ~
git clone --recurse-submodules https://github.com/arvidn/libtorrent
cd libtorrent
python3 setup.py build
python3 setup.py install

cd ~
git clone https://github.com/deluge-torrent/deluge
cd deluge
git checkout master
apt install closure-compiler python3-pip -y
python3 setup.py build
python3 setup.py install 
NO IPV6 under Deluged 2.0.5 +libtorrent: 2.0.5.0
However, IPV6 works well under Deluged 2.0.5 +libtorrent: 1.1.14

Does anybody have the same issue?

Re: NO IPV6 under Deluged 2.0.5 + libtorrent: 2.0.5.0

Posted: Mon Apr 04, 2022 7:14 am
by mlyxshi

Re: NO IPV6 under Deluged 2.0.5 + libtorrent: 2.0.5.0

Posted: Mon Apr 04, 2022 10:45 am
by mhertz
As mlyxshi helpfully posted, you need that patch, but however it's not enough, as that patch "just" enables support for defining multiple coma-seperated interfaces to bind to, from it's preferences page, including accepting brackets in addresses i.e. ipv6 addresses(as brackets not supported there - still isn't with the patch, but however gets appended behind scenes, so need defined without, as otherwise breaks the parsing).

Anyway, so if e.g. wanting "libtorrent 1.1.x and older" behaviour back, meaning by default bind to all interfaces found, ipv4 and ipv6 alike, then in addition to applying said patch, then also needs this small change, which I used to patch into my unofficial deluge2 installer previously, like this:

Code: Select all

diff -urN a/preferencesmanager.py b/preferencesmanager.py
--- a/preferencesmanager.py	2021-01-19 20:10:43.507786400 +0100
+++ b/preferencesmanager.py	2021-01-19 21:32:45.873731000 +0100
@@ -221,7 +221,7 @@
         if self.config['listen_interface']:
             interfaces = self.config['listen_interface'].strip()
         else:
-            interfaces = '0.0.0.0'
+            interfaces = '0.0.0.0,::'
 
         lib_interfaces = []
         for interface in interfaces.split(','):
('../deluge/core/preferencesmanager.py')

In short, deluge hardcodes '0.0.0.0' as interfaces to bind to, which means all(so both ipv4 and ipv6) on libtorrent 1.1.x and down, but means only ipv4 on newer versions of libtorrent, so need specifiy '0.0.0.0,[::]', and as you need to exclude brackets with strangelovian's patch(as gets appended later behind scenes), then is added without brackets in my patch. I did report this on deluge bugtracker long ago also btw, and is scheduled for deluge 2.0.6.

Re: NO IPV6 under Deluged 2.0.5 + libtorrent: 2.0.5.0

Posted: Mon Apr 04, 2022 10:54 am
by mlyxshi
Thanks a lot!

Re: NO IPV6 under Deluged 2.0.5 + libtorrent: 2.0.5.0

Posted: Mon Apr 04, 2022 11:02 am
by mhertz
You're most welcome, and thanks likewise mate :) Btw, for own usage, then no need additionally adding my patch also, as can just add '0.0.0.0,::' into the preferences page of defining incoming interfaces(without quotes), which does the same(still need strangelovian's patch for this to work) - was a little to quick posting, and should have thought it through little more before posting, sorry.

Re: NO IPV6 under Deluged 2.0.5 + libtorrent: 2.0.5.0

Posted: Sat May 18, 2024 6:42 pm
by Theetjuh
Hi, sorry for resurrecting a really old topic, but is there any status on dualstack?

I thought the problem I was having with IPv6 was my VPN config, but it seems Deluge isn’t running IPv6 by default :o
After some searching I came to this thread with from I witnessed a 2 year old topic that doesn’t seem merged.

Is there anything I can do for myself to fix it?

The suggested 0.0.0.0,:: doesn’t work, when I use 0.0.0.0,[::] it only binds IPv6 and when I use [::],0.0.0.0 it only binds IPv4.

Re: NO IPV6 under Deluged 2.0.5 + libtorrent: 2.0.5.0

Posted: Sat May 18, 2024 8:47 pm
by Theetjuh
I changed the files manually from this pull request, it works perfectly!