Commit Graph

429 Commits

Author SHA1 Message Date
arvidn 9ca12d6db5 restore aspects of the previous behavior of force-proxy. Instead of not opening any TCP listen sockets at all, open them but reject any incoming connection. This is because in RC_1_1, the UDP and TCP sockets are tied in subtle and unintuitive ways. This is much cleaner in the next major release and this patch will not need to be merged 2018-05-13 12:31:00 +02:00
Arvid Norberg 4523e05527 fix uTP and SOCKS5 simulations and update libsimulator 2018-05-13 12:10:34 +02:00
Arvid Norberg c98b700d4f merged RC_1_1 2018-05-10 22:48:39 +02:00
arvidn 299a545648 add test for suggests- and seed mode combined 2018-05-10 17:40:23 +02:00
arvidn fe25b50b1a update libsimulator with a fix for boost-1.66 2018-05-10 14:04:10 +02:00
Steven Siloti 96d215a32a only allow pinged nodes into the routing table (#3006)
This is an attempt to prevent bogus nodes entering the routing table and
being propogated to other nodes.
2018-05-08 12:47:29 +02:00
arvidn 8621477239 merged RC_1_1 into master 2018-04-28 14:36:24 +02:00
Alden Torres 9b1e79660f removed unnecessary parentheses around min/max, added some const modifier (#2926) 2018-04-11 15:19:00 +02:00
arvidn a7406de2b8 remove the global cache of the current time, just use clock::now() instead 2018-04-07 21:43:18 +02:00
Arvid Norberg 6efff919cd deprecated alert::progress_notification alert category, split into finer grained categories 2018-04-05 16:27:28 +02:00
Arvid Norberg 16f1deb3ec merged RC_1_1 into master 2018-04-04 15:28:33 +02:00
Alden Torres 5b922072e9 avoid calls to .address() when looking for endpoint protocol (#2892)
using is_v4 and is_v6 where possible
2018-04-01 13:48:17 +02:00
d_komarov 1c867a5026 Changing file priorities while checking interrupts checking.
Also, if the last file has zero priority, checking is interrupted prematurely.
2018-03-26 02:59:10 +02:00
arvidn 0fa24faec4 merged RC_1_1 into master 2018-03-25 22:06:41 +02:00
arvidn 02a01fa22e fix issue where the current tracker would be skipped for the next tracker in the same tier 2018-03-25 14:40:38 +02:00
arvidn 5c1b65e9b8 merged RC_1_1 into master 2018-03-12 02:32:12 +01:00
arvidn a06e4f696b track whether a file is eligible for using the partfile on a per-file basis. This is intended to improve backwards compatibility, to better support resuming files downloaded with older versions of libtorrent 2018-03-11 12:52:56 +01:00
arvidn 9696082355 merged RC_1_1 into master 2018-02-25 09:36:12 +01:00
arvidn 1ede34da8a undo the patch to restore incoming TCP connections over SOCKS5 2018-02-19 00:01:42 +01:00
arvidn f8fb5c2294 merged RC_1_1 into master 2018-02-10 22:52:12 +01:00
arvidn a1860426b8 defer truncating existing files until the first time we write to them 2018-02-10 18:33:41 +01:00
arvidn 308cbfe097 merged RC_1_1 into master 2018-01-27 02:36:55 +01:00
arvidn bc4d53c71f restore support for incoming connections over SOCKS5 (disabled by default) 2018-01-25 09:14:14 +01:00
arvidn 3a9861e237 complete the error handling test and make it part of the default simulation test suite. It will run a file transfer between two clients repeatedly, each time cause another memory allocation fail, until every single memory allocation has failed once. Any invariant check failure, assertion or signal will cause the test to fail 2018-01-08 04:44:52 -05:00
arvidn 98419aee12 disable debug iterators in simulations on windows, since exception safety is compromised 2018-01-05 10:55:12 -05:00
arvidn f80cd8ad1b update libsimulator and set default build to be static for sims 2018-01-04 07:28:53 -05:00
arvidn 70448a2c3a update libsimulator submodule 2018-01-02 18:42:01 -05:00
arvidn 7141542591 update libsimulator with boost-1.66 fix 2018-01-01 20:23:59 -05:00
arvidn 96bf0ad5de fix reopening of listen sockets when disabling force-proxy 2017-12-17 08:25:51 +01:00
arvidn 55babc57e6 merged RC_1_1 into master 2017-12-15 17:18:27 +01:00
arvidn d1a63cd781 fix build against boost-1.66, specifically the boost.asio changes 2017-12-15 11:29:53 +01:00
arvidn a6656aeb93 generate random keys for use in tracker announces. keys are unique for each torrent and the listen interface they announce via 2017-11-29 00:10:35 +01:00
arvidn 9d37fbd1f7 disable tests requiring logging when building with logging disabled 2017-11-24 07:50:06 +01:00
arvidn 4bc93cff38 merge RC_1_1 into master 2017-11-23 18:01:32 +01:00
arvidn 5e7666526e fix IPv6 tracker announce issue 2017-11-23 10:11:59 +01:00
Alden Torres f73473a6ec don't early move shared_ptr plugin in torrent::add_extension_fun, added test for it 2017-11-23 08:00:08 +01:00
arvidn a57ad00e15 fix force-proxy regression (udp sockets would not be opened) 2017-11-21 08:54:16 +01:00
arvidn c6f0c9c206 fix build 2017-11-21 08:22:02 +01:00
arvidn 22f8bdfebc merge RC_1_1 into master 2017-11-21 00:50:02 +01:00
Arvid Norberg c734f42ac3
make tracker announces happen even if there are no open listen sockets (#2529)
support announcing to IPv6 trackers and running an IPv6 DHT when not listening for incoming connections
2017-11-20 23:42:22 +01:00
arvidn 096ce54fae fix issue where new listen sockets would not be opened when leaving force_proxy mode 2017-11-14 12:38:22 +01:00
arvidn 381db57b42 improve simulations by reseeding the random number generator. also erase all output in between iterations in test_error_handling 2017-11-09 17:59:13 +01:00
Alden Torres 5480c08184 enable/disable the internal ip notifier with new setting (#2487) 2017-11-01 10:51:51 +01:00
arvidn a6c85496b5 make parse_magnet_uri return the add_torrent_params instead of of taking an in-out parameter 2017-10-15 04:29:53 +02:00
arvidn 9111d5977e make the variables holding the source of external IPs type-safe 2017-10-10 22:38:36 +02:00
Steven Siloti 8648de3706 DHT nodes should only handle requests on their socket (#2355) 2017-09-21 21:00:38 -07:00
arvidn 6b55096ebd switch some using declarations to new-style typedefs. remove some redundant parenthesis 2017-09-18 09:38:51 +02:00
arvidn bb51dcdbb9 move dht_settings into its own header cpp file-pair and dht_settings into the dht namespace 2017-09-04 22:38:16 +02:00
arvidn 95c8c3018a use span in gzip, http_parser and http_connection 2017-09-04 22:33:38 +02:00
arvidn 58f91e67fb merged RC_1_1 into master 2017-08-19 23:30:13 +02:00
arvidn fe37884bc6 fix IPv6 tracker support by performing the second announce in more cases 2017-08-19 18:56:51 +02:00
arvidn 5bf28e37b8 make create_torrent flags type-safe 2017-08-04 21:23:42 +02:00
arvidn 69bd2986de convert a few more torrent_handle flags to type safe types 2017-07-27 13:16:23 -07:00
arvidn 8d0f38930e make udp send flags type safe 2017-07-26 18:09:17 -07:00
arvidn e19736f925 fix simulation tests to make them not use deprecated functions 2017-07-26 18:00:03 -07:00
arvidn c4eb4c8b5f use span in torrent_info constructors and deprecate the redundant flags argument 2017-07-22 00:00:44 -07:00
Steven Siloti 5eba09fce7 changes based on review feedback 2017-07-21 19:18:44 -07:00
Steven Siloti f0ae2145ea use a handle class for listen sockets instead of raw pointers
Listen socket handles need to be week_ptr so that they can detect when a listen
socket is removed in the middle of a tracker announce on it. Use a wrapper class
to enforce that no one outside of session_impl can hold ownership of the socket
across event boundaries.

To support unit tests, listen_socket_t is also split into a base class which
holds the members needed to support the public listen socket API.
2017-07-21 19:18:44 -07:00
toinetoine b1c3e12cd0 added block_uploaded_alert to allow client to track upload activity 2017-07-16 11:04:03 -07:00
arvidn c4afb5e949 use a dedicated class template for flags types instead of enum class. It's more backwards compatible and improves ergonomics 2017-07-15 01:15:57 -07:00
Steven Siloti 2e79c5e648 fix handling of SSL listen sockets 2017-07-10 21:41:39 -07:00
Alden Torres 80036f0377 avoid executing timed async task if the dht node is already removed (#2133) 2017-07-08 08:32:24 -07:00
Arvid Norberg b13ac50f4e update libsimulator (#2107)
use move in simulations. don't pretend io_service to be movable
2017-06-28 11:00:14 -04:00
arvidn ff454a92d4 unify some operation-enums and strings to use operation_t 2017-06-18 07:31:45 -04:00
arvidn 3f09d16e3c defer reconnecting peers to after the second_tick loop (to avoid mutating m_connections while iterating over it) 2017-06-14 10:35:50 -04:00
arvidn f3d319b677 fix internal use of deprecated function identify_client 2017-06-10 08:16:23 +02:00
arvidn afce0d3a86 make resolver_flags use enum class for improved type-safety 2017-05-29 18:38:59 -04:00
arvidn 680ca6ea2b merged RC_1_1 into master 2017-05-21 21:02:09 -04:00
arvidn acd98d5c40 delay 5 seconds before reconnecting socks5 proxy for UDP ASSOCIATE 2017-05-21 08:53:29 -04:00
arvidn e0fa1cd247 merged RC_1_1 into master 2017-05-12 21:46:45 -04:00
Jan Berkel b3815c5533 HTTP proxy: avoid connecting to itself (#1978) 2017-05-08 11:04:17 -04:00
arvidn b1b4360df6 merged RC_1_1 into master 2017-05-08 07:48:42 -04:00
Jan Berkel fe9f877087 Set connection timeout when next endpoint is tried (#1952) 2017-05-04 17:32:47 -04:00
Steven Siloti fd50630020 announce to trackers for all listen interfaces 2017-04-30 08:11:56 -04:00
arvidn d138f02424 introduce lt namespace alias 2017-04-23 23:43:58 -04:00
Steven Siloti bcfaf9621a fixes from review 2017-04-23 19:49:49 -04:00
Steven Siloti cdd50be859 create a separate DHT node for each listen socket 2017-04-23 19:49:49 -04:00
arvidn 04c76249b6 merged RC_1_1 into master 2017-04-21 01:21:31 -04:00
arvidn 645d658214 merged RC_1_1 into master 2017-04-13 07:42:32 -07:00
arvidn 79d7ae3638 separate path and filesystem functions out into its own translation unit/header file pair, separating it from the file and directory class 2017-04-11 18:07:55 -04:00
Arvid Norberg 13b16a63a3 use unsigned type for file flags. make file_pool private to disk_io_thread (#1894)
use unsigned type for file flags. make file_pool private to disk_io_thread. move close_file_interval logic to the disk thread. don't expose file in public interface, and make pool_file_status properly public (not part of file_pool and renamed to open_file_status), this is exposed in public interface via torrent_handle::file_status()
2017-04-08 18:24:50 -04:00
arvidn 8267d05139 restore libsimulator submodule 2017-04-04 23:37:55 -04:00
arvidn 7c35c2270f improve client_test 2017-04-04 18:22:10 -04:00
arvidn b367a0cd50 fix simulator build warnings 2017-04-02 20:48:36 -04:00
Arvid Norberg 64ad4f5c96 enable warnings when building tests (#1880) 2017-04-02 14:22:17 -04:00
arvidn 0b6fe4d0bd merged RC_1_1 into master 2017-03-30 18:07:24 -04:00
Arvid Norberg 8ebbad19d4 deprecate add_torrent_params::url field. use parse_magnet_uri instead (#1864)
deprecate add_torrent_params::url field. use parse_magnet_uri instead
2017-03-29 02:16:07 -04:00
arvidn 02bb1251d2 removed (broken) support for incoming connections over socks5 2017-03-29 02:15:43 -04:00
arvidn 86786770b7 merged RC_1_1 into master 2017-03-27 01:24:43 -04:00
arvidn 910ccc528f deprecate torrent_added_alert in favor of add_torrent_alert 2017-03-26 22:48:17 -04:00
arvidn 6cdd598e7c make add_torrent_params movable and have add_torrent/async_add_torrent take it by value 2017-03-26 16:48:57 -04:00
arvidn cb867a6edc fix build of simulations without deprecated functions 2017-03-25 23:44:31 -04:00
arvidn 1dd0e9b280 use string_view instead of strcmp 2017-03-18 15:54:38 -04:00
Arvid Norberg 642cfa387d add limit for number of web seed connections (#1817)
add limit for number of web seed connections
2017-03-18 15:53:07 -04:00
Alden Torres a7934594fe fix memory corruption during DHT simulation tests 2017-03-15 23:02:40 -04:00
arvidn 9995e25be7 fix typo 2017-03-15 07:30:30 -04:00
Arvid Norberg 827372f9ab fix master build after merge (#1813)
fix master build after merge
2017-03-15 07:15:36 -04:00
arvidn 3a1379ef1e merged RC_1_1 into master 2017-03-14 12:55:13 -04:00
arvidn e37e4bfe8a include user-agent in tracker announces in anonymous_mode for private torrents 2017-03-12 21:10:00 -04:00
arvidn 4ded26de33 fix issue with load/unload torrents 2017-03-11 19:59:53 -05:00