NO IPV6 under Deluged 2.0.5 + libtorrent: 2.0.5.0

General support for problems installing or using Deluge
Post Reply
mlyxshi
New User
New User
Posts: 3
Joined: Sun Apr 03, 2022 11:07 pm

NO IPV6 under Deluged 2.0.5 + libtorrent: 2.0.5.0

Post 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?
mhertz
Moderator
Moderator
Posts: 2195
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: NO IPV6 under Deluged 2.0.5 + libtorrent: 2.0.5.0

Post 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.
mlyxshi
New User
New User
Posts: 3
Joined: Sun Apr 03, 2022 11:07 pm

Re: NO IPV6 under Deluged 2.0.5 + libtorrent: 2.0.5.0

Post by mlyxshi »

Thanks a lot!
mhertz
Moderator
Moderator
Posts: 2195
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: NO IPV6 under Deluged 2.0.5 + libtorrent: 2.0.5.0

Post 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.
Post Reply