arvidn / libtorrent

an efficient feature complete C++ bittorrent implementation
http://libtorrent.org
Other
5.25k stars 996 forks source link

I2P support #2530

Closed ghost closed 1 year ago

ghost commented 6 years ago

libtorrent version: 1.1.1.0 platform/architecture: Ubuntu 17.10

Hey, i am just curious what is the status of the I2P support. The documentation about this feature is a little bit light right now. In particular i am not sure where i do mistake in the following python code:

import libtorrent as lt session = lt.session(flags=0) h = session.add_torrent({'ti': lt.torrent_info('/tmp/Downloads/test.torrent'), 'save_path': '/tmp/Downloads'})

session.listen_on(6881, 6881)

proxy_settings = lt.proxy_settings() proxy_settings.hostname = '127.0.0.1' proxy_settings.port = 7656 session.set_i2p_proxy(proxy_settings)

The program doesnot download anything and cannot find peers(the i2pshark do it very fast). Please help me to figure out what is going on. Am i right that libtorrent use SAM interface, so i should use port 7656?

arvidn commented 6 years ago

Yes, libtorrent use the SAM protocol. The main problem with libtorrent's i2p support is that it does not have any regression tests, so it's possible that it has broken at some point.

Do you have a log of the alerts you get? please enable all alerts in the alert_mask in the settings_pack.

ghost commented 6 years ago

As you suggested i added to the code

session.set_alert_mask(lt.alert.category_t.all_categories) and

in the end time.sleep(4) alerts = session.pop_alerts() for alert in alerts: print(type(alert).name, alert.message())

And get the following:

add_torrent_alert added torrent: test listen_succeeded_alert successfully listening on [TCP] [::]:6861 listen_succeeded_alert successfully listening on [TCP] 0.0.0.0:6861 listen_succeeded_alert successfully listening on [UDP] 0.0.0.0:6861 state_changed_alert : state changed to: downloading torrent_checked_alert checked

Everything looks fine for me.

The torrent is from tracker2.postman.i2p. I read that previously the tracker was not supported by the libtorrent, because the program did not support base32 names. Am i correct that now base32 names are supproted?

arvidn commented 6 years ago

there must be more alerts than that, right? things like announces to the trackers for instance.

ghost commented 6 years ago

Indeed, it is strange. i do not see any other alerts

arvidn commented 6 years ago

oh, you're probably setting the mask after everything already happened. set the mask as part of the settings_pack and pass that into the session constructor

ghost commented 6 years ago

Ok, i put session = lt.session(alert_mask=lt.alert.category_t.all_categories,flags=0) and get that the host not found. The full alert is

listen_succeeded_alert successfully listening on [TCP] [::]:6881 listen_succeeded_alert successfully listening on [TCP] 0.0.0.0:6881 listen_succeeded_alert successfully listening on [UDP] 0.0.0.0:6881 add_torrent_alert added torrent: test torrent_added_alert added state_changed_alert : state changed to: downloading torrent_checked_alert checked torrent_resumed_alert resumed tracker_announce_alert (http://tracker2.postman.i2p/announce.php) sending announce (started) stats_alert : [1000] 0 0 0 0 0 0 0 0 0 0 tracker_error_alert (http://tracker2.postman.i2p/announce.php) (-1) Host not found (authoritative) "" (1) tracker_announce_alert (http://s5ikrdyjwbcgxmqetxb3nyheizftms7euacuub2hic7defkh3xhq.b32.i2p/a) sending announce (started) tracker_error_alert (http://s5ikrdyjwbcgxmqetxb3nyheizftms7euacuub2hic7defkh3xhq.b32.i2p/a) (-1) Host not found (authoritative) "" (1) stats_alert : [1000] 0 0 0 0 0 0 0 0 0 0 stats_alert : [1000] 0 0 0 0 0 0 0 0 0 0 stats_alert : [1000] 0 0 0 0 0 0 0 0 0 0 stats_alert : [1000] 0 0 0 0 0 0 0 0 0 0 stats_alert : [1000] 0 0 0 0 0 0 0 0 0 0 stats_alert : [1000] 0 0 0 0 0 0 0 0 0 0 stats_alert : [1000] 0 0 0 0 0 0 0 0 0 0 stats_alert : [1000] 0 0 0 0 0 0 0 0 0 0 stats_alert : [1000] 0 0 0 0 0 0 0 0 0 0 listen_succeeded_alert successfully listening on [TCP] [::]:6861 listen_succeeded_alert successfully listening on [TCP] 0.0.0.0:6861 listen_succeeded_alert successfully listening on [UDP] 0.0.0.0:6861 stats_alert : [1000] 0 0 0 0 0 0 0 0 0 0 stats_alert : [1000] 0 0 0 0 0 0 0 0 0 0 stats_alert : [1000] 0 0 0 0 0 0 0 0 0 0 stats_alert : [1000] 0 0 0 0 0 0 0 0 0 0

after few seconds in the end i get Segmentation fault (core dumped)

ghost commented 6 years ago

The program looks like this:

import libtorrent as lt import time

session = lt.session(alert_mask=lt.alert.category_t.all_categories,flags=0) print('Session started: ', lt.version)

h = session.add_torrent({'ti': lt.torrent_info('/tmp/Downloads/test.torrent'), 'save_path': '/tmp/Downloads/'})

h.auto_managed(False)

session.listen_on(6861, 6861) proxy_settings = lt.proxy_settings() proxy_settings.type=lt.proxy_type.i2p_proxy proxy_settings.hostname = '127.0.0.1' proxy_settings.port = 7656 session.set_i2p_proxy(proxy_settings) s = h.status() s.num_peers time.sleep(4) alerts = session.pop_alerts() for alert in alerts: print(type(alert).name, alert.message())

Without h.auto_managed(False) i get the alerts above but the program crashes.

With h.auto_managed(False) the program doesnot crash and i get only this:

listen_succeeded_alert successfully listening on [TCP] [::]:6881 listen_succeeded_alert successfully listening on [TCP] 0.0.0.0:6881 listen_succeeded_alert successfully listening on [UDP] 0.0.0.0:6881 add_torrent_alert added torrent: test torrent_added_alert added listen_succeeded_alert successfully listening on [TCP] [::]:6861 listen_succeeded_alert successfully listening on [TCP] 0.0.0.0:6861 listen_succeeded_alert successfully listening on [UDP] 0.0.0.0:6861 state_changed_alert : state changed to: downloading torrent_checked_alert checked

ghost commented 6 years ago

I am still trying to find my mistake. I rewrote c++

{
  using namespace libtorrent;
  namespace lt = libtorrent;

  settings_pack sett;
  sett.set_str(settings_pack::listen_interfaces, "0.0.0.0:6881");
  sett.set_int(settings_pack::proxy_type, settings_pack::i2p_proxy);
  sett.set_int(settings_pack::i2p_port, 7656);
  sett.set_str(settings_pack::i2p_hostname, "0.0.0.0");
  sett.set_bool(settings_pack::force_proxy, true);
  sett.set_bool(settings_pack::enable_upnp, false);
  sett.set_bool(settings_pack::enable_natpmp, false);
  sett.set_bool(settings_pack::enable_dht, false);

  lt::session s(sett);
  s.set_alert_mask(lt::alert::all_categories);
  std::vector<libtorrent::alert*> alerts;
  add_torrent_params p;
  p.save_path = "./";
  error_code ec;
  p.ti = boost::make_shared<torrent_info>(std::string(argv[1]), boost::ref(ec), 0);
  if (ec)
  {
    fprintf(stderr, "%s\n", ec.message().c_str());
    return 1;
  }
  s.add_torrent(p, ec);
 if (ec)
  {
    fprintf(stderr, "%s\n", ec.message().c_str());
    return 1;
  }

usleep(60000000);
 s.pop_alerts(&alerts);
 for(libtorrent::alert const *a : alerts) {
            std::cout << a->message();
        printf("\n");
 }

In the result i get

successfully listening on [TCP] [::]:6881 successfully listening on [TCP] 0.0.0.0:6881 successfully listening on [UDP] 0.0.0.0:6881 added torrent: test added : state changed to: downloading checked resumed (http://tracker2.postman.i2p/announce.php) sending announce (started) : [1400] 0 0 0 0 0 0 0 0 0 0 (http://tracker2.postman.i2p/announce.php) (-1) "Waiting for i2p acceptor from SAM bridge" (1) (http://s5ikrdyjwbcgxmqetxb3nyheizftms7euacuub2hic7defkh3xhq.b32.i2p/a) sending announce (started) (http://s5ikrdyjwbcgxmqetxb3nyheizftms7euacuub2hic7defkh3xhq.b32.i2p/a) (-1) "Waiting for i2p acceptor from SAM bridge" (1) : [1000] 0 0 0 0 0 0 0 0 0 0 : [1000] 0 0 0 0 0 0 0 0 0 0 : [1000] 0 0 0 0 0 0 0 0 0 0 : [1000] 0 0 0 0 0 0 0 0 0 0 incoming connection from SOME IP (TCP) : [1000] 0 0 0 0 0 0 0 0 0 0 : [1000] 0 0 0 0 0 0 0 0 0 0 : [1000] 0 0 0 0 0 0 0 0 0 0 : [1000] 0 0 0 0 0 0 0 0 0 0 : [1000] 0 0 0 0 0 0 0 0 0 0 : [1000] 0 0 0 0 0 0 0 0 0 0 : [1000] 0 0 0 0 0 0 0 0 0 0 : [1000] 0 0 0 0 0 0 0 0 0 0 : [1000] 0 0 0 0 0 0 0 0 0 0 : [1000] 0 0 0 0 0 0 0 0 0 0 : [1000] 0 0 0 0 0 0 0 0 0 0 : [1000] 0 0 0 0 0 0 0 0 0 0 (http://tracker2.postman.i2p/announce.php) sending announce (started) (http://s5ikrdyjwbcgxmqetxb3nyheizftms7euacuub2hic7defkh3xhq.b32.i2p/a) sending announce (started) (http://tracker2.postman.i2p/announce.php) (-1) "Waiting for i2p acceptor from SAM bridge" (2) (http://s5ikrdyjwbcgxmqetxb3nyheizftms7euacuub2hic7defkh3xhq.b32.i2p/a) (-1) "Waiting for i2p acceptor from SAM bridge" (2) : [1000] 0 0 0 0 0 0 0 0 0 0 : [1000] 0 0 0 0 0 0 0 0 0 0 : [1000] 0 0 0 0 0 0 0 0 0 0 : [1000] 0 0 0 0 0 0 0 0 0 0 : [1000] 0 0 0 0 0 0 0 0 0 0 : [1000] 0 0 0 0 0 0 0 0 0 0 incoming connection from SOME IP (TCP) : [1000] 0 0 0 0 0 0 0 0 0 0 : [1000] 0 0 0 0 0 0 0 0 0 0 : [1000] 0 0 0 0 0 0 0 0 0 0 Segmentation fault (core dumped)

ghost commented 6 years ago

Ok, i build libtorrent with the debug option. It seems it is some kind of bug in the libtorrent. gdb shows the following

Starting program: /home/reich/TEMP/torrents/i2p_torrents /tmp/Downloads/test.torrent
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff5d6f700 (LWP 21680)]
[New Thread 0x7ffff556e700 (LWP 21681)]
[New Thread 0x7ffff4d6d700 (LWP 21682)]
[New Thread 0x7fffeffff700 (LWP 21683)]
[New Thread 0x7fffef7fe700 (LWP 21684)]
[New Thread 0x7fffeeffd700 (LWP 21685)]
start session
config: ipv6_deprecated_ version: 1.1.5.0 revision: 37ffe99a1
max connections: 200
max files: 1024
generated peer ID:
*** session thread init
session stats header: peer.error_peers, peer.disconnected_peers, peer.eof_peers, peer.connreset_peers, peer.connrefused_peers, peer.connaborted_peers, peer.notconnected_peers, peer.perm_peers, peer.buffer_peers, peer.unreachable_peers, peer.broken_pipe_peers, peer.addrinuse_peers, peer.no_access_peers, peer.invalid_arg_peers, peer.aborted_peers, peer.piece_requests, peer.max_piece_requests, peer.invalid_piece_requests, peer.choked_piece_requests, peer.cancelled_piece_requests, peer.piece_rejects, peer.error_incoming_peers, peer.error_outgoing_peers, peer.error_rc4_peers, peer.error_encrypted_peers, peer.error_tcp_peers, peer.error_utp_peers, picker.reject_piece_picks, picker.unchoke_piece_picks, picker.incoming_redundant_piece_picks, picker.incoming_piece_picks, picker.end_game_piece_picks, picker.snubbed_piece_picks, picker.interesting_piece_picks, picker.hash_fail_piece_picks, picker.piece_picker_partial_loops, picker.piece_picker_suggest_loops, picker.piece_picker_sequential_loops, picker.piece_picker_reverse_rare_loops, picker.piece_picker_rare_loops, picker.piece_picker_rand_start_loops, picker.piece_picker_rand_loops, picker.piece_picker_busy_loops, peer.connect_timeouts, peer.uninteresting_peers, peer.timeout_peers, peer.no_memory_peers, peer.too_many_peers, peer.transport_timeout_peers, peer.num_banned_peers, peer.banned_for_hash_failure, peer.connection_attempts, peer.connection_attempt_loops, peer.incoming_connections, net.on_read_counter, net.on_write_counter, net.on_tick_counter, net.on_lsd_counter, net.on_lsd_peer_counter, net.on_udp_counter, net.on_accept_counter, net.on_disk_queue_counter, net.on_disk_counter, ses.torrent_evicted_counter, ses.num_incoming_choke, ses.num_incoming_unchoke, ses.num_incoming_interested, ses.num_incoming_not_interested, ses.num_incoming_have, ses.num_incoming_bitfield, ses.num_incoming_request, ses.num_incoming_piece, ses.num_incoming_cancel, ses.num_incoming_dht_port, ses.num_incoming_suggest, ses.num_incoming_have_all, ses.num_incoming_have_none, ses.num_incoming_reject, ses.num_incoming_allowed_fast, ses.num_incoming_ext_handshake, ses.num_incoming_pex, ses.num_incoming_metadata, ses.num_incoming_extended, ses.num_outgoing_choke, ses.num_outgoing_unchoke, ses.num_outgoing_interested, ses.num_outgoing_not_interested, ses.num_outgoing_have, ses.num_outgoing_bitfield, ses.num_outgoing_request, ses.num_outgoing_piece, ses.num_outgoing_cancel, ses.num_outgoing_dht_port, ses.num_outgoing_suggest, ses.num_outgoing_have_all, ses.num_outgoing_have_none, ses.num_outgoing_reject, ses.num_outgoing_allowed_fast, ses.num_outgoing_ext_handshake, ses.num_outgoing_pex, ses.num_outgoing_metadata, ses.num_outgoing_extended, ses.num_piece_passed, ses.num_piece_failed, ses.num_have_pieces, ses.num_total_pieces_added, disk.num_blocks_written, disk.num_blocks_read, disk.num_blocks_hashed, disk.num_blocks_cache_hits, disk.num_write_ops, disk.num_read_ops, disk.num_read_back, disk.disk_read_time, disk.disk_write_time, disk.disk_hash_time, disk.disk_job_time, ses.waste_piece_timed_out, ses.waste_piece_cancelled, ses.waste_piece_unknown, ses.waste_piece_seed, ses.waste_piece_end_game, ses.waste_piece_closing, net.sent_payload_bytes, net.sent_bytes, net.sent_ip_overhead_bytes, net.sent_tracker_bytes, net.recv_payload_bytes, net.recv_bytes, net.recv_ip_overhead_bytes, net.recv_tracker_bytes, net.recv_failed_bytes, net.recv_redundant_bytes, dht.dht_messages_in, dht.dht_messages_out, dht.dht_messages_out_dropped, dht.dht_bytes_in, dht.dht_bytes_out, dht.dht_ping_in, dht.dht_ping_out, dht.dht_find_node_in, dht.dht_find_node_out, dht.dht_get_peers_in, dht.dht_get_peers_out, dht.dht_announce_peer_in, dht.dht_announce_peer_out, dht.dht_get_in, dht.dht_get_out, dht.dht_put_in, dht.dht_put_out, dht.dht_invalid_announce, dht.dht_invalid_get_peers, dht.dht_invalid_put, dht.dht_invalid_get, utp.utp_packet_loss, utp.utp_timeout, utp.utp_packets_in, utp.utp_packets_out, utp.utp_fast_retransmit, utp.utp_packet_resend, utp.utp_samples_above_target, utp.utp_samples_below_target, utp.utp_payload_pkts_in, utp.utp_payload_pkts_out, utp.utp_invalid_pkts_in, utp.utp_redundant_pkts_in, sock_bufs.socket_send_size3, sock_bufs.socket_send_size4, sock_bufs.socket_send_size5, sock_bufs.socket_send_size6, sock_bufs.socket_send_size7, sock_bufs.socket_send_size8, sock_bufs.socket_send_size9, sock_bufs.socket_send_size10, sock_bufs.socket_send_size11, sock_bufs.socket_send_size12, sock_bufs.socket_send_size13, sock_bufs.socket_send_size14, sock_bufs.socket_send_size15, sock_bufs.socket_send_size16, sock_bufs.socket_send_size17, sock_bufs.socket_send_size18, sock_bufs.socket_send_size19, sock_bufs.socket_send_size20, sock_bufs.socket_recv_size3, sock_bufs.socket_recv_size4, sock_bufs.socket_recv_size5, sock_bufs.socket_recv_size6, sock_bufs.socket_recv_size7, sock_bufs.socket_recv_size8, sock_bufs.socket_recv_size9, sock_bufs.socket_recv_size10, sock_bufs.socket_recv_size11, sock_bufs.socket_recv_size12, sock_bufs.socket_recv_size13, sock_bufs.socket_recv_size14, sock_bufs.socket_recv_size15, sock_bufs.socket_recv_size16, sock_bufs.socket_recv_size17, sock_bufs.socket_recv_size18, sock_bufs.socket_recv_size19, sock_bufs.socket_recv_size20, ses.num_checking_torrents, ses.num_stopped_torrents, ses.num_upload_only_torrents, ses.num_downloading_torrents, ses.num_seeding_torrents, ses.num_queued_seeding_torrents, ses.num_queued_download_torrents, ses.num_error_torrents, ses.non_filter_torrents, ses.num_loaded_torrents, ses.num_pinned_torrents, peer.num_tcp_peers, peer.num_socks5_peers, peer.num_http_proxy_peers, peer.num_utp_peers, peer.num_i2p_peers, peer.num_ssl_peers, peer.num_ssl_socks5_peers, peer.num_ssl_http_proxy_peers, peer.num_ssl_utp_peers, peer.num_peers_half_open, peer.num_peers_connected, peer.num_peers_up_interested, peer.num_peers_down_interested, peer.num_peers_up_unchoked_all, peer.num_peers_up_unchoked_optimistic, peer.num_peers_up_unchoked, peer.num_peers_down_unchoked, peer.num_peers_up_requests, peer.num_peers_down_requests, peer.num_peers_up_disk, peer.num_peers_down_disk, peer.num_peers_end_game, disk.write_cache_blocks, disk.read_cache_blocks, disk.request_latency, disk.pinned_blocks, disk.disk_blocks_in_use, disk.queued_disk_jobs, disk.num_running_disk_jobs, disk.num_read_jobs, disk.num_write_jobs, disk.num_jobs, disk.num_writing_threads, disk.num_running_threads, disk.blocked_disk_jobs, disk.queued_write_bytes, ses.num_unchoke_slots, disk.num_fenced_read, disk.num_fenced_write, disk.num_fenced_hash, disk.num_fenced_move_storage, disk.num_fenced_release_files, disk.num_fenced_delete_files, disk.num_fenced_check_fastresume, disk.num_fenced_save_resume_data, disk.num_fenced_rename_file, disk.num_fenced_stop_torrent, disk.num_fenced_cache_piece, disk.num_fenced_flush_piece, disk.num_fenced_flush_hashed, disk.num_fenced_flush_storage, disk.num_fenced_trim_cache, disk.num_fenced_file_priority, disk.num_fenced_load_torrent, disk.num_fenced_clear_piece, disk.num_fenced_tick_storage, disk.arc_mru_size, disk.arc_mru_ghost_size, disk.arc_mfu_size, disk.arc_mfu_ghost_size, disk.arc_write_size, disk.arc_volatile_size, dht.dht_nodes, dht.dht_node_cache, dht.dht_torrents, dht.dht_peers, dht.dht_immutable_data, dht.dht_mutable_data, dht.dht_allocated_observers, net.has_incoming_connections, net.limiter_up_queue, net.limiter_down_queue, net.limiter_up_bytes, net.limiter_down_bytes, utp.num_utp_idle, utp.num_utp_syn_sent, utp.num_utp_connected, utp.num_utp_fin_sent, utp.num_utp_close_wait, utp.num_utp_deleted
not starting DHT announce timer: m_dht == NULL
done starting session
update listen interfaces: 0.0.0.0:6881
open listen port
listening on: [::]:6881 external port: 6881
listening on: 0.0.0.0:6881 external port: 6881
successfully listening on [TCP] [::]:6881
successfully listening on [TCP] 0.0.0.0:6881
successfully listening on [UDP] 0.0.0.0:6881
>>> SET_TOS [ udp_socket tos: 20 e: Bad file descriptor ]
added torrent: Test.Torrent
Test.Torrent added
Test.Torrent: creating torrent: Test.Torrent max-uploads: -1 max-connections: -1 upload-limit: -1 download-limit: -1 flags: apply-ip-filter paused auto-managed update-subscribe save-path: /tmp/Downloads/
Test.Torrent: *** set-max-uploads: 16777215
Test.Torrent: *** set-max-connections: 16777215
Test.Torrent: *** UPDATE LIST [ torrent_want_scrape : 1 ]
Test.Torrent: init torrent: Test.Torrent
Test.Torrent: init, async_check_fastresume
Test.Torrent: fastresume data accepted
Test.Torrent: state changed to: downloading
Test.Torrent: set_state() 3
Test.Torrent: *** UPDATE LIST [ torrent_downloading_auto_managed : 1 ]
Test.Torrent checked
Test.Torrent: start_announcing(), paused
Test.Torrent: auto manager starting torrent
Test.Torrent: *** UPDATE LIST [ torrent_want_scrape : 0 ]
Test.Torrent resumed
Test.Torrent: *** UPDATE LIST [ torrent_want_tick : 1 ]
Test.Torrent: *** tracker: "http://tracker2.postman.i2p/announce.php" [ tiers: 0 trackers: 0 i->tier: 0 tier: 2147483647 working: 1 fails: 0 limit: 0 upd: 0 can: 1 sent: 0 ]
Test.Torrent: ==> TRACKER REQUEST "http://tracker2.postman.i2p/announce.php" event: started abort: 0 
Test.Torrent (http://tracker2.postman.i2p/announce.php) sending announce (started)
Test.Torrent: *** tracker: "http://tracker2.postman.i2p/announce.php" [ tiers: 0 trackers: 0 found: 0 i->tier: 0 tier: 2147483647 working: 1 fails: 0 limit: 0 upd: 1 ]
Test.Torrent: *** update tracker timer: next_announce < now 0 m_waiting_tracker: 0 next_announce_in: 877468233
Test.Torrent: [1402] 0 0 0 0 0 0 0 0 0 0
Test.Torrent: *** tracker error: (161)  Waiting for i2p acceptor from SAM bridge
Test.Torrent: *** increment tracker fail count [1]
Test.Torrent (http://tracker2.postman.i2p/announce.php) (-1)  "Waiting for i2p acceptor from SAM bridge" (1)
Test.Torrent: *** tracker: "http://tracker2.postman.i2p/announce.php" [ tiers: 0 trackers: 0 i->tier: 0 tier: 2147483647 working: 0 fails: 1 limit: 0 upd: 0 can: 0 sent: 0 ]
Test.Torrent: *** tracker: "http://s5ikrdyjwbcgxmqetxb3nyheizftms7euacuub2hic7defkh3xhq.b32.i2p/a" [ tiers: 0 trackers: 0 i->tier: 1 tier: 2147483647 working: 1 fails: 0 limit: 0 upd: 0 can: 1 sent: 0 ]
Test.Torrent: ==> TRACKER REQUEST "http://s5ikrdyjwbcgxmqetxb3nyheizftms7euacuub2hic7defkh3xhq.b32.i2p/a" event: started abort: 0
Test.Torrent (http://s5ikrdyjwbcgxmqetxb3nyheizftms7euacuub2hic7defkh3xhq.b32.i2p/a) sending announce (started)
Test.Torrent: *** tracker: "http://tracker2.postman.i2p/announce.php" [ tiers: 0 trackers: 0 found: 0 i->tier: 0 tier: 2147483647 working: 0 fails: 1 limit: 0 upd: 0 ]
Test.Torrent: *** tracker: "http://s5ikrdyjwbcgxmqetxb3nyheizftms7euacuub2hic7defkh3xhq.b32.i2p/a" [ tiers: 0 trackers: 0 found: 0 i->tier: 1 tier: 2147483647 working: 1 fails: 0 limit: 0 upd: 1 ]
Test.Torrent: *** update tracker timer: next_announce < now 0 m_waiting_tracker: 1 next_announce_in: -16
Test.Torrent: *** tracker: "http://tracker2.postman.i2p/announce.php" [ tiers: 0 trackers: 0 found: 0 i->tier: 0 tier: 2147483647 working: 0 fails: 1 limit: 0 upd: 0 ]
Test.Torrent: *** tracker: "http://s5ikrdyjwbcgxmqetxb3nyheizftms7euacuub2hic7defkh3xhq.b32.i2p/a" 
[ tiers: 0 trackers: 0 found: 0 i->tier: 1 tier: 2147483647 working: 1 fails: 0 limit: 0 upd: 1 ]
Test.Torrent: *** update tracker timer: next_announce < now 0 m_waiting_tracker: 1 next_announce_in: -16
Test.Torrent: *** tracker: "http://tracker2.postman.i2p/announce.php" [ tiers: 0 trackers: 0 found: 0 i->tier: 0 tier: 2147483647 working: 0 fails: 1 limit: 0 upd: 0 ]
Test.Torrent: *** tracker: "http://s5ikrdyjwbcgxmqetxb3nyheizftms7euacuub2hic7defkh3xhq.b32.i2p/a" [ tiers: 0 trackers: 0 found: 0 i->tier: 1 tier: 2147483647 working: 1 fails: 0 limit: 0 upd: 1 ]
Test.Torrent: *** update tracker timer: next_announce < now 0 m_waiting_tracker: 1 next_announce_in: -17
Test.Torrent: *** tracker error: (161)  Waiting for i2p acceptor from SAM bridge
Test.Torrent: *** increment tracker fail count [1]
Test.Torrent (http://s5ikrdyjwbcgxmqetxb3nyheizftms7euacuub2hic7defkh3xhq.b32.i2p/a) (-1)  "Waiting for i2p acceptor from SAM bridge" (1)
Test.Torrent: *** tracker: "http://tracker2.postman.i2p/announce.php" [ tiers: 0 trackers: 0 i->tier: 0 tier: 2147483647 working: 0 fails: 1 limit: 0 upd: 0 can: 0 sent: 0 ]
Test.Torrent: *** tracker: "http://s5ikrdyjwbcgxmqetxb3nyheizftms7euacuub2hic7defkh3xhq.b32.i2p/a" [ tiers: 0 trackers: 0 i->tier: 1 tier: 2147483647 working: 0 fails: 1 limit: 0 upd: 0 can: 0 sent: 0 ]
Test.Torrent: *** tracker: "http://tracker2.postman.i2p/announce.php" [ tiers: 0 trackers: 0 found: 0 i->tier: 0 tier: 2147483647 working: 0 fails: 1 limit: 0 upd: 0 ]
Test.Torrent: *** tracker: "http://s5ikrdyjwbcgxmqetxb3nyheizftms7euacuub2hic7defkh3xhq.b32.i2p/a" [ tiers: 0 trackers: 0 found: 0 i->tier: 1 tier: 2147483647 working: 0 fails: 1 limit: 0 upd: 0 ]
Test.Torrent: *** update tracker timer: next_announce < now 0 m_waiting_tracker: 1 next_announce_in: -16
Test.Torrent: *** tracker: "http://tracker2.postman.i2p/announce.php" [ tiers: 0 trackers: 0 found: 0 i->tier: 0 tier: 2147483647 working: 0 fails: 1 limit: 0 upd: 0 ]
Test.Torrent: *** tracker: "http://s5ikrdyjwbcgxmqetxb3nyheizftms7euacuub2hic7defkh3xhq.b32.i2p/a" [ tiers: 0 trackers: 0 found: 0 i->tier: 1 tier: 2147483647 working: 0 fails: 1 limit: 0 upd: 0 ]
Test.Torrent: *** update tracker timer: next_announce < now 0 m_waiting_tracker: 1 next_announce_in: -17
Test.Torrent: [1000] 0 0 0 0 0 0 0 0 0 0
Test.Torrent: [1000] 0 0 0 0 0 0 0 0 0 0
Test.Torrent: [1000] 0 0 0 0 0 0 0 0 0 0
Test.Torrent: [1000] 0 0 0 0 0 0 0 0 0 0
Test.Torrent: [1000] 0 0 0 0 0 0 0 0 0 0
Test.Torrent: [1000] 0 0 0 0 0 0 0 0 0 0
Test.Torrent: [1000] 0 0 0 0 0 0 0 0 0 0
Test.Torrent: *** tracker: "http://tracker2.postman.i2p/announce.php" [ tiers: 0 trackers: 0 i->tier: 0 tier: 2147483647 working: 0 fails: 1 limit: 0 upd: 0 can: 1 sent: 0 ]
Test.Torrent: ==> TRACKER REQUEST "http://tracker2.postman.i2p/announce.php" event: started abort: 0
Test.Torrent (http://tracker2.postman.i2p/announce.php) sending announce (started)
Test.Torrent: *** tracker: "http://s5ikrdyjwbcgxmqetxb3nyheizftms7euacuub2hic7defkh3xhq.b32.i2p/a" [ tiers: 0 trackers: 0 i->tier: 1 tier: 2147483647 working: 0 fails: 1 limit: 0 upd: 0 can: 1 sent: 1 ]
Test.Torrent: ==> TRACKER REQUEST "http://s5ikrdyjwbcgxmqetxb3nyheizftms7euacuub2hic7defkh3xhq.b32.i2p/a" event: started abort: 0
Test.Torrent (http://s5ikrdyjwbcgxmqetxb3nyheizftms7euacuub2hic7defkh3xhq.b32.i2p/a) sending announce (started)
Test.Torrent: *** tracker: "http://tracker2.postman.i2p/announce.php" [ tiers: 0 trackers: 0 found: 0 i->tier: 0 tier: 2147483647 working: 0 fails: 1 limit: 0 upd: 1 ]
Test.Torrent: *** update tracker timer: next_announce < now 0 m_waiting_tracker: 0 next_announce_in: 877468250
Test.Torrent: *** tracker error: (161)  Waiting for i2p acceptor from SAM bridge
Test.Torrent: *** increment tracker fail count [2]
Test.Torrent (http://tracker2.postman.i2p/announce.php) (-1)  "Waiting for i2p acceptor from SAM bridge" (2)
Test.Torrent: *** tracker: "http://tracker2.postman.i2p/announce.php" [ tiers: 0 trackers: 0 i->tier: 0 tier: 2147483647 working: 0 fails: 2 limit: 0 upd: 0 can: 0 sent: 0 ]
Test.Torrent: *** tracker: "http://s5ikrdyjwbcgxmqetxb3nyheizftms7euacuub2hic7defkh3xhq.b32.i2p/a" [ tiers: 0 trackers: 0 i->tier: 1 tier: 2147483647 working: 0 fails: 1 limit: 0 upd: 1 can: 0 sent: 0 ]
Test.Torrent: *** tracker: "http://tracker2.postman.i2p/announce.php" [ tiers: 0 trackers: 0 found: 0 i->tier: 0 tier: 2147483647 working: 0 fails: 2 limit: 0 upd: 0 ]
Test.Torrent: *** tracker: "http://s5ikrdyjwbcgxmqetxb3nyheizftms7euacuub2hic7defkh3xhq.b32.i2p/a" [ tiers: 0 trackers: 0 found: 0 i->tier: 1 tier: 2147483647 working: 0 fails: 1 limit: 0 upd: 1 ]
Test.Torrent: *** update tracker timer: next_announce < now 0 m_waiting_tracker: 1 next_announce_in: -54
Test.Torrent: *** tracker: "http://tracker2.postman.i2p/announce.php" [ tiers: 0 trackers: 0 found: 0 i->tier: 0 tier: 2147483647 working: 0 fails: 2 limit: 0 upd: 0 ]
Test.Torrent: *** tracker: "http://s5ikrdyjwbcgxmqetxb3nyheizftms7euacuub2hic7defkh3xhq.b32.i2p/a" 
[ tiers: 0 trackers: 0 found: 0 i->tier: 1 tier: 2147483647 working: 0 fails: 1 limit: 0 upd: 1 ]
Test.Torrent: *** update tracker timer: next_announce < now 0 m_waiting_tracker: 1 next_announce_in: -55
Test.Torrent: *** tracker error: (161)  Waiting for i2p acceptor from SAM bridge
Test.Torrent: *** increment tracker fail count [2]
Test.Torrent (http://s5ikrdyjwbcgxmqetxb3nyheizftms7euacuub2hic7defkh3xhq.b32.i2p/a) (-1)  "Waiting for i2p acceptor from SAM bridge" (2)
Test.Torrent: *** tracker: "http://tracker2.postman.i2p/announce.php" [ tiers: 0 trackers: 0 i->tier: 0 tier: 2147483647 working: 0 fails: 2 limit: 0 upd: 0 can: 0 sent: 0 ]
Test.Torrent: *** tracker: "http://s5ikrdyjwbcgxmqetxb3nyheizftms7euacuub2hic7defkh3xhq.b32.i2p/a" [ tiers: 0 trackers: 0 i->tier: 1 tier: 2147483647 working: 0 fails: 2 limit: 0 upd: 0 can: 0 sent: 0 ]
Test.Torrent: *** tracker: "http://tracker2.postman.i2p/announce.php" [ tiers: 0 trackers: 0 found: 0 i->tier: 0 tier: 2147483647 working: 0 fails: 2 limit: 0 upd: 0 ]
Test.Torrent: *** tracker: "http://s5ikrdyjwbcgxmqetxb3nyheizftms7euacuub2hic7defkh3xhq.b32.i2p/a" [ tiers: 0 trackers: 0 found: 0 i->tier: 1 tier: 2147483647 working: 0 fails: 2 limit: 0 upd: 0 ]
Test.Torrent: *** update tracker timer: next_announce < now 0 m_waiting_tracker: 1 next_announce_in: -54
Test.Torrent: *** tracker: "http://tracker2.postman.i2p/announce.php" [ tiers: 0 trackers: 0 found: 0 i->tier: 0 tier: 2147483647 working: 0 fails: 2 limit: 0 upd: 0 ]
Test.Torrent: *** tracker: "http://s5ikrdyjwbcgxmqetxb3nyheizftms7euacuub2hic7defkh3xhq.b32.i2p/a" [ tiers: 0 trackers: 0 found: 0 i->tier: 1 tier: 2147483647 working: 0 fails: 2 limit: 0 upd: 0 ]
Test.Torrent: *** update tracker timer: next_announce < now 0 m_waiting_tracker: 1 next_announce_in: -55
Test.Torrent: [1000] 0 0 0 0 0 0 0 0 0 0
Test.Torrent: [1000] 0 0 0 0 0 0 0 0 0 0
Test.Torrent: [1000] 0 0 0 0 0 0 0 0 0 0
Test.Torrent: [1000] 0 0 0 0 0 0 0 0 0 0
Test.Torrent: [1000] 0 0 0 0 0 0 0 0 0 0
Test.Torrent: [1000] 0 0 0 0 0 0 0 0 0 0
Test.Torrent: [1000] 0 0 0 0 0 0 0 0 0 0
Test.Torrent: [1000] 0 0 0 0 0 0 0 0 0 0
Test.Torrent: [1000] 0 0 0 0 0 0 0 0 0 0
Test.Torrent: [1000] 0 0 0 0 0 0 0 0 0 0
Test.Torrent: [1000] 0 0 0 0 0 0 0 0 0 0
Test.Torrent: [1000] 0 0 0 0 0 0 0 0 0 0
Test.Torrent: [1000] 0 0 0 0 0 0 0 0 0 0
Test.Torrent: [1000] 0 0 0 0 0 0 0 0 0 0
Test.Torrent: [1000] 0 0 0 0 0 0 0 0 0 0
Test.Torrent: [1000] 0 0 0 0 0 0 0 0 0 0
Test.Torrent: [1000] 0 0 0 0 0 0 0 0 0 0
assertion failed. Please file a bugreport at https://github.com/arvidn/libtorrent/issues
Please include the following information:

version: 1.1.5.0-37ffe99a1

file: 'http_connection.cpp'
line: 498
function: void libtorrent::http_connection::connect_i2p_tracker(const char*)
expression: m_sock.get<socket_type>()

stack:
1: assert_fail(char const*, int, char const*, char const*, char const*, int)
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13: clone

Thread 2 "i2p_torrents" received signal SIGABRT, Aborted.
[Switching to Thread 0x7ffff5d6f700 (LWP 21680)]
__GI_raise (sig=<optimized out>) at ../sysdeps/unix/sysv/linux/raise.c:51
51      ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb)
(gdb)
(gdb)
(gdb) quit
ghost commented 6 years ago

Also, i turned off the openssl. I get the error in the different place

Test.Torrent: [1000] 0 0 0 0 0 0 0 0 0 0 Test.Torrent: [1000] 0 0 0 0 0 0 0 0 0 0 assertion failed. Please file a bugreport at https://github.com/arvidn/libtorrent/issues Please include the following information:

version: 1.1.5.0-37ffe99a1

file: 'http_connection.cpp' line: 631 function: void libtorrent::http_connection::on_connect(const boost::system::error_code&) expression: m_connecting

stack: 1: assert_fail(char const, int, char const, char const, char const, int) 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: clone

arvidn commented 6 years ago

yeah, it seems like there's an issue with the i2p support in the http_connection or http_tracker_connection. The proper fix for this includes implementing a simple mock SAM server in the simulator, to be able to have tests. The reason I haven't done that yet is that I haven't really considered i2p support a critical (or particularly popular) feature.

arvidn commented 6 years ago

this error message: "*** tracker error: (161) Waiting for i2p acceptor from SAM bridge" suggests that the SAM connection isn't being established correctly. That's no excuse to assert or crash obviously, but it might be worth looking at what might be going on with the bridge if you want to get it to work.

specifically, it means the local i2p endpoint has not been looked up yet (which is done by the SAM name lookup of "ME"). It either means we haven't even connected yet, or the name lookup hasn't returned (which presumably means something is wrong)

arvidn commented 6 years ago

does this help any? https://github.com/arvidn/libtorrent/pull/2564

arvidn commented 6 years ago

@reichKV do you think you will have a chance to try that patch?

ghost commented 6 years ago

Sure i will try to do it

ghost commented 6 years ago

Sorry for the delay. I understand that i am probably the only one in the world who uses libtorrent in i2p. I need this for educational purposes. And I appreciate your help.

i used your pathes and with the test program, which i described above, i get the following

  1. No crashes.
  2. However the program starts and almost immediately stops. The alerts are:

added torrent: test.mkv test.mkv added test.mkv: creating torrent: test.mkv max-uploads: -1 max-connections: -1 upload-limit: -1 download-limit: -1 flags: apply-ip-filter paused auto-managed update-subscribe save-path: /tmp/ test.mkv: set-max-uploads: 16777215 test.mkv: set-max-connections: 16777215 test.mkv: UPDATE LIST [ torrent_want_scrape : 1 ] test.mkv: init torrent: test.mkv test.mkv: init, async_check_fastresume test.mkv: fastresume data accepted test.mkv: state changed to: downloading test.mkv: set_state() 3 test.mkv: UPDATE LIST [ torrent_downloading_auto_managed : 1 ] test.mkv checked test.mkv: start_announcing(), paused test.mkv: auto manager starting torrent test.mkv: UPDATE LIST [ torrent_want_scrape : 0 ] test.mkv resumed test.mkv: UPDATE LIST [ torrent_want_tick : 1 ] test.mkv: tracker: "http://tracker2.postman.i2p/announce.php" [ tiers: 0 trackers: 0 i->tier: 0 tier: 2147483647 working: 1 fails: 0 limit: 0 upd: 0 can: 1 sent: 0 ] test.mkv: ==> TRACKER REQUEST "http://tracker2.postman.i2p/announce.php" event: started abort: 0 test.mkv: QUEUE_TRACKER_REQUEST [ listen_port: 0 ] test.mkv (http://tracker2.postman.i2p/announce.php) sending announce (started) test.mkv: tracker: "http://tracker2.postman.i2p/announce.php" [ tiers: 0 trackers: 0 found: 0 i->tier: 0 tier: 2147483647 working: 1 fails: 0 limit: 0 upd: 1 ] test.mkv: update tracker timer: next_announce < now 0 m_waiting_tracker: 0 next_announce_in: 878891115 test.mkv: [1402] 0 0 0 0 0 0 0 0 0 0 test.mkv: tracker error: (161) Waiting for i2p acceptor from SAM bridge test.mkv: increment tracker fail count [1] test.mkv (http://tracker2.postman.i2p/announce.php) (-1) "Waiting for i2p acceptor from SAM bridge" (1) test.mkv: tracker: "http://tracker2.postman.i2p/announce.php" [ tiers: 0 trackers: 0 i->tier: 0 tier: 2147483647 working: 0 fails: 1 limit: 0 upd: 0 can: 0 sent: 0 ] test.mkv: tracker: "http://tracker2.postman.i2p/announce.php" [ tiers: 0 trackers: 0 found: 0 i->tier: 0 tier: 2147483647 working: 0 fails: 1 limit: 0 upd: 0 ] test.mkv: update tracker timer: next_announce < now 0 m_waiting_tracker: 1 next_announce_in: -17 test.mkv: tracker: "http://tracker2.postman.i2p/announce.php" [ tiers: 0 trackers: 0 found: 0 i->tier: 0 tier: 2147483647 working: 0 fails: 1 limit: 0 upd: 0 ] test.mkv: *** update tracker timer: next_announce < now 0 m_waiting_tracker: 1 next_announce_in: -17 test.mkv: [1000] 0 0 0 0 0 0 0 0 0 0 test.mkv: [1000] 0 0 0 0 0 0 0 0 0 0

In the i2pd console i see the following:

22:12:22@698/info - Clients: starting SAM bridge at 127.0.0.1:7656 22:13:04@115/debug - SAM: new connection from 127.0.0.1:53036 22:13:04@115/error - SAM: handshake read error: End of file 22:13:04@115/debug - SAMSocket::CloseStream, reason: SAM: handshake read error 22:13:04@115/debug - SAMSocket::CloseStream, reason: ~SAMSocket() 22:15:47@115/debug - SAM: new connection from 127.0.0.1:53206 22:15:47@115/debug - SAM: handshake HELLO VERSION MIN=3.0 MAX=3.0 22:15:47@115/error - SAM: read error: End of file 22:15:47@115/debug - SAMSocket::CloseStream, reason: SAM: read error 22:15:47@115/debug - SAMSocket::CloseStream, reason: ~SAMSocket() 22:15:58@115/debug - SAM: new connection from 127.0.0.1:53210 22:15:58@115/debug - SAM: handshake HELLO VERSION MIN=3.0 MAX=3.0 22:15:58@115/debug - SAM: session create: STYLE=STREAM ID=67c6697351ff4aec29cdbaabf2fbe3467cc254f8 DESTINATION=TRANSIENT 22:16:18@115/debug - SAMSocket::SendMessageReply, close=false reason: SESSION STATUS RESULT=OK DESTINATION=8CCWXo2kGoyBlNpzO-2ZE2worlht4qEkwhT-.................. 22:16:18@115/error - SAM: read error: End of file 22:16:18@115/debug - SAMSocket::CloseStream, reason: SAM: read error 22:16:18@115/debug - SAMSocket::CloseStream, reason: ~SAMSocket()

ghost commented 6 years ago

Previously i got the errors with the standard java i2p and c++ i2p. Right now i used c++ i2p. I can do the same with java i2p if you think the problem can be with the router

gitbugged commented 6 years ago

@ReichKV you're certainly not the only one, I just encountered the same bug. This is also a blocker for qBittorrent implementing it. With the death of Net Neutrality and more ISPs throttling/blocking torrents, I think this issue will begin to see more popularity. Hopefully it will get resolved soon so that we can get libtorrent-based torrent clients back on the network.

gitbugged commented 6 years ago

Possibly related:

I2P developers told me that the implementation of SAM control protocol in the official libtorrent is not complete. The b32 announce protocol was not implemented, and only b64 announce protocol was implemented, but it is not supported by postman.i2p tracker.

proninyaroslav commented 6 years ago

Is I2P ready for real use? I'm interested in the implementation of this functionality in my app, but as far as I understand this feature is still buggy.

arvidn commented 6 years ago

there's a bit of a chicken and egg-problem. i2p has definitely worked. Last time I looked at it I made some fixes and got it to work. The problem is that there are no unit tests to ensure that it keeps working, and nobody really seems to care (enough at least).

If you would want this to get into a reliable shape (for all I know it is in a good shape, just not reliable because there are no regression tests), please test it out and report errors. Or better yet, write some tests to demonstrate problems!

ghost commented 5 years ago

I would love to see libtorrent get fuller support for i2p, if possible. And, further, it would be nice if some standard could be drawn up to help humans know whether torrents are bridged between i2p and clearnet. For example, trackers might support a flag to indicate whether they have peers on either network, and a DHT node might return a flag to show they're bridging i2p and clearnet also. That might allow clearnet torrent trackers to start marking torrents as being "darknet enabled", helping to encourage more secure and private torrenting.

master255 commented 3 years ago

@arvidn If there is no i2p proxy support, why is it in the instructions and can be selected in the library? And even in Wikipedia? Or if there is support for i2p, where are the instructions, how to configure that it would work?

absolutep commented 2 years ago

Is there any update on this?

master255 commented 2 years ago

@absolutep The main problem with i2p is the low data transfer rate. Have they fixed that problem there yet?

master255 commented 2 years ago

And don't use gestures. If you have something to say, do it like civilized people - with words.

TomasGlgg commented 2 years ago

@absolutep The main problem with i2p is the low data transfer rate. Have they fixed that problem there yet?

Using I2Pd + BiglyBT, you can get a speed of almost 2 MB/s. I think this is an acceptable speed.

biglybt+i2pd

master255 commented 2 years ago

@TomasGlgg No. I don't think so. An acceptable speed is at least 100 Megabits. If it can be achieved, then torrents in i2p make sense.

proninyaroslav commented 2 years ago

@master255 In many countries of the world, this is an unattainable value, especially if you use mobile Internet.

ivan1986 commented 2 years ago

@master255 it's better that nothing, torrent client works on backgroud, if need download film need just wait some hours, some torrents may download week - speed not a issue.

master255 commented 2 years ago

@proninyaroslav Of course the speed of the Internet should be 100 Megabits +. This goes without saying.

master255 commented 2 years ago

@ivan1986 There is an alternative to i2p which is https url seeds. There is no speed limit and traffic is reliably encrypted.

TomasGlgg commented 2 years ago

@ivan1986 There is an alternative to i2p which is https url seeds. There is no speed limit and traffic is reliably encrypted.

Https url seeds is not an alternative to I2P. I2P is used for anonymity. You can read about how I2P works on http://geti2p.net/en/

ivan1986 commented 2 years ago

@master255 it's not alternative, it's one more support protocol i2p is perfect to hide users from lawers - it's a main issue of torrent protocol now - lawyers do not distinguish ubuntu torrent from a movie it's a most popular torrent library - if it will support i2p i2p net is grow very well

master255 commented 2 years ago

@TomasGlgg I know how i2p works. But how can anyone trace that you download a file if you download a torrent file over https protocol and then the file itself over https protocol? And url seeds can be obtained by a normal request in DHT or tracker.

TomasGlgg commented 2 years ago

I know how i2p works. But how can anyone trace that you download a file if you download a torrent file over https protocol and then the file itself over https protocol? And url seeds can be obtained by a normal request in DHT or tracker.

As far as I understand, the download comes directly from seeds and everyone will know your IP address.

master255 commented 2 years ago

@TomasGlgg But we can also know the ip address of those who spy on you. And block them. For example using country blocking.

ivan1986 commented 2 years ago

@master255 now lawers may connect to dht network and get ip adresses of users - url seeds not help to hide ip adress of user - in the current situation, an anonymous protocol is needed that would not reveal the participants in the exchange, since we have malicious participants - existing solutions at the moment are i2p or tor. We need a protocol with which you can safely distribute and download torrents in countries with very inadequate legislation in this matter - the usa, england, germany. Block ip will not help, this can be you ISP

TomasGlgg commented 2 years ago

But we can also know the ip address of those who spy on you. And block them. For example using country blocking.

This is no longer anonymity :D. How do we know who's spying on us?

master255 commented 2 years ago

@TomasGlgg To give you an example. You live in England. Block England and they won't know what you're downloading in England because you won't be downloading from England peers. And your ip will not be recorded anywhere, because downloading from Web seeds is not related to torrent protocol and all methods of distribution of peers. You get complete anonymity.

TomasGlgg commented 2 years ago

@master255 It won't help. Read the post by @ivan1986.

master255 commented 2 years ago

@ivan1986 There are no fines for requesting and receiving data in DHT. Fines come for downloading data. If fines came for requests, you could make 10,000 requests per second and get billions of fines. That, of course, is not the case. Blocking ip addresses includes blocking the internet provider as well.

TomasGlgg commented 2 years ago

There are no fines for requesting and receiving data in DHT.

We are not talking about fines now, but about anonymity.

Blocking ip addresses includes blocking the internet provider as well.

How do you block an ISP if it works from any IP address?

master255 commented 2 years ago

@TomasGlgg

We are not talking about fines now, but about anonymity.

Anonymity for what?

How do you block an ISP if it works from any IP address?

How could it be? White ip addresses are tied to the country. No one can have an ip address from another country. And how will the ISP even know you're using torrents? To him it will look like you are downloading 2 encrypted files via https protocol.

ghost commented 2 years ago

I can get an IP from another country pretty easily, actually... Quite a few, in fact

master255 commented 2 years ago

@cathalgarvey 1. How?

  1. And can you have many ip addresses at once?
  2. And how do you know which countries I will block?
TomasGlgg commented 2 years ago

@master255

Anonymity for what?

You can ask this question to the developers of I2P and its community, but not here.

How could it be?

This is not the place to explain how internet work.

ivan1986 commented 2 years ago

There are no fines for requesting and receiving data in DHT. Fines come for downloading data.

And what for we need dht requests without the download data? We still show our ip to other peer, which may seed torrent for log ip's of peers and use it for send fines.

It may be from another country, blocking any range will not help, you just need your own address that cannot be associated with you personally and your location.

This is how it usually happens now - copyright holders download the file, record all IP addresses in the swarm and then send notifications to providers. From this protection option is only vpn at the moment.

At the moment, torrent users use mostly paid vpn to avoid this, we are asked to support a free anonymous network.

ghost commented 2 years ago

Also, ISP can easily just offer a webseed for any torrent in the world. Just 404 when someone connects to the URL (no need to have the file), after logging their IP and correlating with the peer you gave the webseed to. Pretty simple attack, I reckon.

I2P isn't complex and slow because its developers are too dumb to use HTTPS. It's complex and slow because that's a requirement for meaningful anonymity and security.

It would be cool if libtorrent supported torrents through i2p because it would make it easier and safer for people to seed rare torrents that could act as reliable reseeds for clearnet torrenters.

This isn't about being as fast as clearnet - it's about keeping valuable torrents alive, safely. Think investigative journalism archives or insurance files or large leaks from somewhere like Saudi, or Russia. Webseeds are not the answer to keeping this stuff safely online. i2p torrents could be.

ghost commented 2 years ago

@oleg - VPNs, or VPSes running daemonised torrent clients. This is not complicated, it's pretty routine, esoecially for bittorrent. Serious bittorrent users rarely use their own IP address - they use a VPN for their own machine, or they rent or set up a seedbox (a VPS with bittorrent on it).

IP addresses are not rare, or magic, or hard to get. You can trivially avoid geoblocks if you're an attacker.