qbittorrent / qBittorrent

qBittorrent BitTorrent client
https://www.qbittorrent.org
Other
28.13k stars 3.96k forks source link

Weird Ipv4/v6 mixup #14552

Open chgans opened 3 years ago

chgans commented 3 years ago

qBittorrent version and Operating System

Acting as server: Stock qBittorrent 4.03, Qt 5.9, libtorrent-rasterbar 1.1.5 on KUbuntu 18.04 Problematic client, very simple test app using libtorrent-rasterbar v2.0.2, no Qt, test app is running on same host, using same address, but different port.

What is the problem

The client cannot connect to peer once tracker announce is done:

start session
version: 2.0.2.0 revision: bee27fc69
max-connections: 200 max-files: 1024
 *** session thread init
 done starting session
RECALCULATE UNCHOKE SLOTS: [ peers: 0 eligible-peers: 0 allowed-slots: 8 ]
update listen interfaces: 169.254.1.1:6881
parsed listen interfaces count: 1, ifaces: 169.254.1.1:6881
not starting DHT announce timer: m_dht == nullptr
about to stop DHT, running: false
reopen listen sockets
attempting to open listen socket to: 169.254.1.1:6881 on device: enx0050b615020d accept-incoming 
 listening on: 169.254.1.1 TCP port: 6881 UDP port: 6881
successfully listening on [TCP] 169.254.1.1:6881
successfully listening on [uTP] 169.254.1.1:6881
>>> SET_TOS [ tcp (169.254.1.1 6881) tos: 20 e: Success ]
>>> SET_TOS [ udp (169.254.1.1 6881) tos: 20 e: Success ]
added torrent: Go7 Manuals v3.0
Go7 Manuals v3.0 added
Go7 Manuals v3.0: creating torrent: Go7 Manuals v3.0 max-uploads: 16777215 max-connections: 16777215 upload-limit: -1 download-limit: -1 flags: apply-ip-filter paused auto-managed update-subscribe  save-path: /tmp/torrent
Go7 Manuals v3.0: *** UPDATE LIST [ torrent_want_scrape : 1 ]
Go7 Manuals v3.0: init torrent: Go7 Manuals v3.0
Go7 Manuals v3.0: init, async_check_files
Go7 Manuals v3.0: fastresume data accepted
Go7 Manuals v3.0: state changed to: downloading
Go7 Manuals v3.0: set_state() 3
Go7 Manuals v3.0: *** UPDATE LIST [ torrent_downloading_auto_managed : 1 ]
Go7 Manuals v3.0 checked
Go7 Manuals v3.0: start_announcing(), paused
Go7 Manuals v3.0: auto manager starting torrent
Go7 Manuals v3.0 resumed
Go7 Manuals v3.0: *** UPDATE LIST [ torrent_want_tick : 1 ]
Go7 Manuals v3.0: *** UPDATE LIST [ torrent_want_scrape : 0 ]
Go7 Manuals v3.0: *** announce: [ announce_to_all_tiers: 0 announce_to_all_trackers: 0 num_trackers: 1 ]
Go7 Manuals v3.0: *** tracker:  (0) [ep: 169.254.1.1:6881 ] "http://169.254.1.1:9000/announce" [  i->tier: 0 tier: 2147483647 working: 1 limit: 0 can: 1 sent: 0 ]
Go7 Manuals v3.0: ==> TRACKER REQUEST "http://169.254.1.1:9000/announce" event: started abort: 0 ssl: (nil) port: 6881 ssl-port: 0 fails: 0 upd: 0 ep: 169.254.1.1:6881
Go7 Manuals v3.0: *** QUEUE_TRACKER_REQUEST [ listen_port: 6881 ]
Go7 Manuals v3.0: ==> TRACKER_REQUEST [ url: http://169.254.1.1:9000/announce?info_hash=%ae%17%96%25P%ea%c1%af%60%3c4b-%09%8a%e0%fe%cd%3fJ&peer_id=-LT2020-.CIdApoQdKnd&port=6881&uploaded=0&downloaded=0&left=12769879&corrupt=0&key=C5CE23F5&event=started&numwant=200&compact=1&no_peer_id=1&supportcrypto=1&redundant=0 ]
Go7 Manuals v3.0 (http://169.254.1.1:9000/announce)[169.254.1.1:6881] sending announce (started)
Go7 Manuals v3.0: *** update_tracker_timer: [ announce_to_all_tiers: 0 announce_to_all_trackers: 0 num_trackers: 1 ]
Go7 Manuals v3.0: *** tracker: (0) [ep: 169.254.1.1:6881 ] "http://169.254.1.1:9000/announce" [ found: 0 i->tier: 0 tier: 2147483647 working: 1 fails: 0 limit: 0 upd: 1 ]
Go7 Manuals v3.0: *** update tracker timer: next_announce < now 0 m_waiting_tracker: 0 next_announce_in: 531678674
Go7 Manuals v3.0: [1401] 0 0 0 0 0 0 0 0 0 0
Go7 Manuals v3.0: *** update_tracker_timer: [ announce_to_all_tiers: 0 announce_to_all_trackers: 0 num_trackers: 1 ]
Go7 Manuals v3.0: *** tracker: (0) [ep: 169.254.1.1:6881 ] "http://169.254.1.1:9000/announce" [ found: 0 i->tier: 0 tier: 2147483647 working: 1 fails: 0 limit: 0 upd: 0 ]
Go7 Manuals v3.0: *** update tracker timer: next_announce < now 0 m_waiting_tracker: 1 next_announce_in: 1800
Go7 Manuals v3.0: TRACKER RESPONSE [ interval: 1800 | min-interval: 30 | external ip: 0.0.0.0 | resolved to: 169.254.1.1,  | we connected to: 169.254.1.1 ]
Go7 Manuals v3.0 (http://169.254.1.1:9000/announce)[169.254.1.1:6881] received peers: 4
Go7 Manuals v3.0: *** UPDATE LIST [ torrent_want_peers_download : 1 ]
Go7 Manuals v3.0: name-lookup add_peer() [ ::ffff:169.254.6.197 ] connect-candidates: 1
Go7 Manuals v3.0: name-lookup add_peer() [ ::ffff:169.254.1.1 ] connect-candidates: 2
Go7 Manuals v3.0: name-lookup add_peer() [ ::ffff:169.254.1.1 ] connect-candidates: 2
Go7 Manuals v3.0: name-lookup add_peer() [ ::ffff:127.0.0.1 ] connect-candidates: 3
Go7 Manuals v3.0: [1000] 0 0 0 0 0 0 0 0 0 0
Go7 Manuals v3.0 peer [ [::ffff:169.254.1.1]:8999 client: Unknown ] [[::ffff:169.254.1.1]:8999] >>> OUTGOING_CONNECTION [ ep: [::ffff:169.254.1.1]:8999 type: uTP seed: 0 p: 0x7f493000f290 local: 0.0.0.0:0 ]
Go7 Manuals v3.0 peer [ [::ffff:169.254.1.1]:8999 client: Unknown ] [[::ffff:169.254.1.1]:8999] *** CONSTRUCT [ bt_peer_connection ]
Go7 Manuals v3.0 peer [ [::ffff:169.254.1.1]:8999 client: Unknown ] [[::ffff:169.254.1.1]:8999] *** SET_PEER_CLASS [ a: ::ffff:169.254.1.1 ]
Go7 Manuals v3.0 peer [ [::ffff:169.254.1.1]:8999 client: Unknown ] [[::ffff:169.254.1.1]:8999] *** CLASS [ global  ]
Go7 Manuals v3.0 peer [ [::ffff:169.254.1.1]:8999 client: Unknown ] [[::ffff:169.254.1.1]:8999] >>> OPEN [ protocol: IPv6 ]
Go7 Manuals v3.0 peer [ [::ffff:169.254.1.1]:8999 client: Unknown ] [[::ffff:169.254.1.1]:8999] >>> BIND [ dst: 0.0.0.0:0 ec: Operation not supported ]
Go7 Manuals v3.0 peer [ [::ffff:169.254.1.1]:8999 client: Unknown ] [[::ffff:169.254.1.1]:8999] *** CONNECTION_CLOSED [ op: 13 ERROR: (generic:95) Operation not supported ]
Go7 Manuals v3.0 peer [ [::ffff:169.254.1.1]:8999 client: Unknown ] disconnecting (uTP) [sock_bind] [generic]: Operation not supported (reason: 0)
Go7 Manuals v3.0 peer [ [::ffff:169.254.6.197]:6881 client: Unknown ] [[::ffff:169.254.6.197]:6881] >>> OUTGOING_CONNECTION [ ep: [::ffff:169.254.6.197]:6881 type: uTP seed: 0 p: 0x7f493000f260 local: 0.0.0.0:0 ]
Go7 Manuals v3.0 peer [ [::ffff:169.254.6.197]:6881 client: Unknown ] [[::ffff:169.254.6.197]:6881] *** CONSTRUCT [ bt_peer_connection ]
Go7 Manuals v3.0 peer [ [::ffff:169.254.6.197]:6881 client: Unknown ] [[::ffff:169.254.6.197]:6881] *** SET_PEER_CLASS [ a: ::ffff:169.254.6.197 ]
Go7 Manuals v3.0 peer [ [::ffff:169.254.6.197]:6881 client: Unknown ] [[::ffff:169.254.6.197]:6881] *** CLASS [ global  ]
Go7 Manuals v3.0 peer [ [::ffff:169.254.6.197]:6881 client: Unknown ] [[::ffff:169.254.6.197]:6881] >>> OPEN [ protocol: IPv6 ]
Go7 Manuals v3.0 peer [ [::ffff:169.254.6.197]:6881 client: Unknown ] [[::ffff:169.254.6.197]:6881] >>> BIND [ dst: 0.0.0.0:0 ec: Operation not supported ]
Go7 Manuals v3.0 peer [ [::ffff:169.254.6.197]:6881 client: Unknown ] [[::ffff:169.254.6.197]:6881] *** CONNECTION_CLOSED [ op: 13 ERROR: (generic:95) Operation not supported ]
Go7 Manuals v3.0 peer [ [::ffff:169.254.6.197]:6881 client: Unknown ] disconnecting (uTP) [sock_bind] [generic]: Operation not supported (reason: 0)
Go7 Manuals v3.0 peer [ [::ffff:127.0.0.1]:8999 client: Unknown ] [[::ffff:127.0.0.1]:8999] >>> OUTGOING_CONNECTION [ ep: [::ffff:127.0.0.1]:8999 type: uTP seed: 0 p: 0x7f493000f2c0 local: 0.0.0.0:0 ]
Go7 Manuals v3.0 peer [ [::ffff:127.0.0.1]:8999 client: Unknown ] [[::ffff:127.0.0.1]:8999] *** CONSTRUCT [ bt_peer_connection ]
Go7 Manuals v3.0 peer [ [::ffff:127.0.0.1]:8999 client: Unknown ] [[::ffff:127.0.0.1]:8999] *** SET_PEER_CLASS [ a: ::ffff:127.0.0.1 ]
Go7 Manuals v3.0 peer [ [::ffff:127.0.0.1]:8999 client: Unknown ] [[::ffff:127.0.0.1]:8999] *** CLASS [ global  ]
Go7 Manuals v3.0 peer [ [::ffff:127.0.0.1]:8999 client: Unknown ] [[::ffff:127.0.0.1]:8999] >>> OPEN [ protocol: IPv6 ]
Go7 Manuals v3.0 peer [ [::ffff:127.0.0.1]:8999 client: Unknown ] [[::ffff:127.0.0.1]:8999] >>> BIND [ dst: 0.0.0.0:0 ec: Operation not supported ]
Go7 Manuals v3.0 peer [ [::ffff:127.0.0.1]:8999 client: Unknown ] [[::ffff:127.0.0.1]:8999] *** CONNECTION_CLOSED [ op: 13 ERROR: (generic:95) Operation not supported ]
Go7 Manuals v3.0 peer [ [::ffff:127.0.0.1]:8999 client: Unknown ] disconnecting (uTP) [sock_bind] [generic]: Operation not supported (reason: 0)
RECALCULATE UNCHOKE SLOTS: [ peers: 3 eligible-peers: 0 allowed-slots: 8 ]
Go7 Manuals v3.0 peer [ [::ffff:169.254.1.1]:8999 client: Unknown ] [[::ffff:169.254.1.1]:8999] *** CONNECTION CLOSED [  ]
Go7 Manuals v3.0 peer [ [::ffff:169.254.6.197]:6881 client: Unknown ] [[::ffff:169.254.6.197]:6881] *** CONNECTION CLOSED [  ]
Go7 Manuals v3.0 peer [ [::ffff:127.0.0.1]:8999 client: Unknown ] [[::ffff:127.0.0.1]:8999] *** CONNECTION CLOSED [  ]
Go7 Manuals v3.0: [1000] 0 0 0 0 0 0 0 0 0 0
Go7 Manuals v3.0: [1000] 0 0 0 0 0 0 0 0 0 0
Go7 Manuals v3.0: [1000] 0 0 0 0 0 0 0 0 0 0
Go7 Manuals v3.0: [1000] 0 0 0 0 0 0 0 0 0 0
Go7 Manuals v3.0: [1000] 0 0 0 0 0 0 0 0 0 0

What is the expected behavior

Client should connect to peer on 169.254.1.1:8999, and peer 169.254.6.197:6881 (another device on the network)

Steps to reproduce

Fire qBittorrent, enable integrated tracker, set listen interface/address, initialise with data/torrent so that qBittorrent is ready for seeding

Run client:

#include <iostream>

#include <libtorrent/session.hpp>
#include <libtorrent/session_params.hpp>
#include <libtorrent/add_torrent_params.hpp>
#include <libtorrent/torrent_handle.hpp>
#include <libtorrent/alert_types.hpp>
#include <libtorrent/torrent_info.hpp>

int main(int, char **)
{
    lt::settings_pack settings = lt::default_settings();
    settings.set_str(lt::settings_pack::listen_interfaces,
                     "169.254.1.1:6881"); // tried with disabling this
    settings.set_str(lt::settings_pack::outgoing_interfaces,
                     "169.254.1.1,enx0050b615020d"); // tried with disabling this
    settings.set_bool(lt::settings_pack::enable_upnp, false);
    settings.set_bool(lt::settings_pack::enable_natpmp, false);
    settings.set_bool(lt::settings_pack::enable_lsd, false);
    settings.set_bool(lt::settings_pack::enable_dht, false);
    settings.set_bool(lt::settings_pack::use_dht_as_fallback, false);
    settings.set_bool(lt::settings_pack::enable_ip_notifier, true);
    settings.set_int(lt::settings_pack::mixed_mode_algorithm, lt::settings_pack::prefer_tcp);
    settings.set_int(lt::settings_pack::alert_mask, lt::alert_category::all);

    lt::session session(settings);
    const std::string filename(torrent_filename);
    auto info = std::make_shared<lt::torrent_info>(filename);
    lt::add_torrent_params params;
    params.ti = info;
    params.save_path = "/tmp/torrent";
    session.async_add_torrent(params);

    for (;;) {
        std::vector<lt::alert*> alerts;
        session.pop_alerts(&alerts);
        for (lt::alert const* a : alerts) {
            std::cout << a->message() << std::endl;
        }
        std::this_thread::sleep_for(std::chrono::milliseconds(200));
    }

    return 0;
}

Extra info(if any)

This is a multi-home setup, where torrent nodes should only talk locally on a dedicated interface which is configured as 169.254.1.1 (Link local IPv4).

Looking at libtorrent code, it seems that problem start somewhere around in torrent.cpp. torrent::tracker_response()

m_ses.get_resolver().async_resolve(i.hostname, aux::resolver_interface::abort_on_shutdown
                    , std::bind(&torrent::on_peer_name_lookup, shared_from_this(), _1, _2, i.port, v));

and end up in torrent::on_peer_name_lookup(), where the "name-lookup add_peer()" log is produced.

thalieht commented 3 years ago

qBittorrent 4.03

Try with the official PPA: stable or unstable and report back.

chgans commented 3 years ago

Using stable PPA, the problem is gone, but another shows up :( qBittorrent v4.3.3 (server)

chgans@chgans-laptop:~/tmp$ sudo netstat -ltupn | grep torr
tcp        0      0 169.254.1.1:49025       0.0.0.0:*               LISTEN      9807/qbittorrent    
tcp6       0      0 :::9000                 :::*                    LISTEN      9807/qbittorrent    
udp        0      0 169.254.1.1:49025       0.0.0.0:*                           9807/qbittorrent    

torrent-rasterbar 1.2.13 (client)

chgans@chgans-laptop:~/tmp$ sudo netstat -ltupn | grep burn
tcp        0      0 169.254.1.1:6881        0.0.0.0:*               LISTEN      9689/neon-burn-in-c 
udp        0      0 169.254.1.1:6881        0.0.0.0:*                           9689/neon-burn-in-c 

Logs on server side:

(N) 2021-03-16T10:40:20 - qBittorrent v4.3.3 started
(N) 2021-03-16T10:40:20 - Using config directory: /home/chgans/.config/qBittorrent/
(I) 2021-03-16T10:40:20 - Trying to listen on: 169.254.1.1:49025
(N) 2021-03-16T10:40:20 - Peer ID: -qB4330-
(N) 2021-03-16T10:40:20 - HTTP User-Agent is 'qBittorrent/4.3.3'
(I) 2021-03-16T10:40:20 - DHT support [OFF]
(I) 2021-03-16T10:40:20 - Local Peer Discovery support [OFF]
(I) 2021-03-16T10:40:20 - PeX support [OFF]
(I) 2021-03-16T10:40:20 - Anonymous mode [OFF]
(I) 2021-03-16T10:40:20 - Encryption support [ON]
(I) 2021-03-16T10:40:20 - Embedded Tracker: Now listening on IP: 0.0.0.0, port: 9000
(N) 2021-03-16T10:40:20 - Options were saved successfully.
(I) 2021-03-16T10:40:20 - Successfully listening on IP: 169.254.1.1, port: TCP/49025
(I) 2021-03-16T10:40:20 - Successfully listening on IP: 169.254.1.1, port: UDP/49025
(N) 2021-03-16T10:40:20 - 'XXX' restored.
(N) 2021-03-16T10:40:20 - 'YYY' restored.
etc..

Logs on client side:

Go7 Manuals v3.0: [1000] 0 0 0 0 0 0 0 0 0 0
Go7 Manuals v3.0: [1000] 0 0 0 0 0 0 0 0 0 0
Go7 Manuals v3.0: *** UPDATE LIST [ torrent_want_tick : 0 ]
Go7 Manuals v3.0 peer [ 169.254.1.1:49025 client: Unknown ] [169.254.1.1:49025] >>> OUTGOING_CONNECTION [ ep: 169.254.1.1:49025 type: uTP seed: 0 p: 0x7f279c0111e0 local: 0.0.0.0:0 ]
Go7 Manuals v3.0 peer [ 169.254.1.1:49025 client: Unknown ] [169.254.1.1:49025] *** CONSTRUCT [ bt_peer_connection ]
Go7 Manuals v3.0: *** UPDATE LIST [ torrent_want_peers_download : 0 ]
Go7 Manuals v3.0: *** UPDATE LIST [ torrent_want_tick : 1 ]
Go7 Manuals v3.0 peer [ 169.254.1.1:49025 client: Unknown ] [169.254.1.1:49025] *** SET_PEER_CLASS [ a: 169.254.1.1 ]
Go7 Manuals v3.0 peer [ 169.254.1.1:49025 client: Unknown ] [169.254.1.1:49025] *** CLASS [ local  ]
Go7 Manuals v3.0 peer [ 169.254.1.1:49025 client: Unknown ] [169.254.1.1:49025] >>> OPEN [ protocol: IPv4 ]
Go7 Manuals v3.0 peer [ 169.254.1.1:49025 client: Unknown ] [169.254.1.1:49025] >>> BIND [ dst: 169.254.1.1:6881 ec: Success ]
Go7 Manuals v3.0 peer [ 169.254.1.1:49025 client: Unknown ] [169.254.1.1:49025] >>> ASYNC_CONNECT [ dst: 169.254.1.1:49025 ]
Go7 Manuals v3.0 peer [ 169.254.1.1:49025 client: Unknown ] connecting to peer (uTP)
Go7 Manuals v3.0 peer [ 169.254.1.1:49025 client: Unknown ] [169.254.1.1:49025] *** LOCAL ENDPOINT [ e: 169.254.1.1:6881 ]
Go7 Manuals v3.0 peer [ 169.254.1.1:49025 client: Unknown ] [169.254.1.1:49025] <<< CANNOT_READ [ quota: 104  can-write-to-disk: yes queue-limit: 1048576 disconnecting: no  connecting: yes ]
RECALCULATE UNCHOKE SLOTS: [ peers: 1 eligible-peers: 0 allowed-slots: 8 ]
Go7 Manuals v3.0 peer [ 169.254.1.1:49025 client: Unknown ] [169.254.1.1:49025] >>> COMPLETED [ ep: 169.254.1.1:49025 ]
Go7 Manuals v3.0 peer [ 169.254.1.1:49025 client: Unknown ] [169.254.1.1:49025] *** SET_NON_BLOCKING [  ]
Go7 Manuals v3.0 peer [ 169.254.1.1:49025 client: Unknown ] [169.254.1.1:49025] >>> SET_TOS [ tos: 32 e: Success ]
Go7 Manuals v3.0 peer [ 169.254.1.1:49025 client: Unknown ] [169.254.1.1:49025] *** ENCRYPTION [ outgoing encryption policy: enabled ]
Go7 Manuals v3.0 peer [ 169.254.1.1:49025 client: Unknown ] [169.254.1.1:49025] ==> EXTENSIONS [ 0000000000000000000000000000000000000000000110000000000000000101 ]
Go7 Manuals v3.0 peer [ 169.254.1.1:49025 client: Unknown ] [169.254.1.1:49025] >>> HANDSHAKE [ sent peer_id: 2d4c54313243302d354364482d6b6b3864675921 client: libtorrent 1.2.12 ]
Go7 Manuals v3.0 peer [ 169.254.1.1:49025 client: Unknown ] [169.254.1.1:49025] ==> HANDSHAKE [ ih: ae17962550eac1af603c34622d098ae0fecd3f4a ]
Go7 Manuals v3.0 peer [ 169.254.1.1:49025 client: Unknown ] [169.254.1.1:49025] >>> CORKED_WRITE [ bytes: 68 ]
Go7 Manuals v3.0 peer [ 169.254.1.1:49025 client: Unknown ] [169.254.1.1:49025] <<< ASYNC_READ [ max: 104 bytes ]
Go7 Manuals v3.0 peer [ 169.254.1.1:49025 client: Unknown ] [169.254.1.1:49025] >>> ASYNC_WRITE [ bytes: 68 ]
Go7 Manuals v3.0 peer [ 169.254.1.1:49025 client: Unknown ] [169.254.1.1:49025] >>> CORKED_WRITE [ bytes: 68 ]
Go7 Manuals v3.0 peer [ 169.254.1.1:49025 client: Unknown ] [169.254.1.1:49025] *** ON_SEND_DATA [ bytes: 68  ]
Go7 Manuals v3.0 peer [ 169.254.1.1:49025 client: Unknown ] [169.254.1.1:49025] >>> WROTE [ 68 bytes ]
Go7 Manuals v3.0: [1000] 0 68 0 0 120 0 0 80 0 0
Go7 Manuals v3.0 peer [ 169.254.1.1:49025 client: Unknown ] [169.254.1.1:49025] <<< ON_RECEIVE_DATA [ bytes: 0 ERROR: (asio.misc:2) End of file ]
Go7 Manuals v3.0 peer [ 169.254.1.1:49025 client: Unknown ] [169.254.1.1:49025] *** ERROR [ in peer_connection::on_receive_data_impl ERROR: (asio.misc:2) End of file ]
Go7 Manuals v3.0 peer [ 169.254.1.1:49025 client: Unknown ] [169.254.1.1:49025] *** CLOSE_REASON [ 5 ]
Go7 Manuals v3.0 peer [ 169.254.1.1:49025 client: Unknown ] [169.254.1.1:49025] *** CONNECTION_CLOSED [ op: 11 ERROR: (asio.misc:2) End of file ]
Go7 Manuals v3.0 peer [ 169.254.1.1:49025 client: Unknown ] disconnecting (uTP) [sock_read] [asio.misc]: End of file (reason: 5)
Go7 Manuals v3.0: *** UPDATE LIST [ torrent_want_peers_download : 1 ]
Go7 Manuals v3.0 peer [ 169.254.1.1:49025 client: Unknown ] [169.254.1.1:49025] *** CONNECTION CLOSED [  ]
Go7 Manuals v3.0: [1000] 0 0 0 0 0 0 0 0 0 0
Go7 Manuals v3.0: [1000] 0 0 0 0 0 0 0 0 0 0
chgans commented 3 years ago

OK, so it looks like this is an edge case, running 2 clients on the same ip address/interface but different ports, upset libtorrent-rasterbar. With this change to the client:

    settings.set_str(lt::settings_pack::listen_interfaces,
                     "192.168.1.64:6881");
    settings.set_str(lt::settings_pack::outgoing_interfaces,
                     "");

Client can get data from server, but still cannot share with other devices on 169.254.0.0/16.