Commit Graph

1553 Commits

Author SHA1 Message Date
arvidn 232b2e0758 tweak rate based choker to increase rate threashold by 2 kiB/s. Improve documentation 2020-05-10 10:56:01 +02:00
arvidn 5b58dc0d38 fix assert when changing the unchoke slots limit 2020-04-26 21:18:59 +02:00
Steven Siloti d67d6c635f check flags when matching listen sockets
If the flags change the socket needs to be re-opened. This is
particularly important when the local_network flag changes so that
the socket will correctly be treated as global even if the gateway
was not configured when the address was first detected.

Don't just modify the flags of the existing listen socket because
some flags may influence how the socket is opened. Such flags could
be special cased, but it doesn't seem worth the trouble.
2020-04-18 10:57:40 +02:00
arvidn ebc2bfc4dd fix UDP ASSOCIATE SOCKS5 connection retry 2020-04-15 15:32:17 +02:00
arvidn 05e6501f16 setting a proxy overrides listen_interfaces 2020-04-15 15:32:17 +02:00
arvidn ce57c2d5af support boost version older than 1.64 by falling back to tlsv12_client (instead of tls_client) 2020-04-14 20:19:45 +02:00
arvidn fdbffda157 fix issues when configured to use a non-default choking algorithm 2020-04-14 10:36:59 +02:00
arvidn 85e3b64f98 update libsimulator 2020-04-13 14:37:58 +02:00
arvidn c825320df8 fix issue in reading resume data 2020-04-11 15:04:39 +02:00
arvidn c4a3937ac9 don't open any listen sockets if listen_interfaces is empty or misconfigured 2020-04-07 05:57:32 -07:00
Arvid Norberg e9a30a34f2 make sure attempting to bind to an unknown device fails (on MacOS/BSD) 2020-03-31 05:05:55 -07:00
Arvid Norberg 9ac4e6eed8 fix double call to bind() when setting outgoing_interfaces 2020-03-29 12:50:11 -07:00
arvidn a871668397 TLS version should not be configurable. it's deprecated in openssl 2020-03-29 06:41:51 -07:00
arvidn 10559ed524 add setting to enable certificates of HTTPS trackers 2020-03-21 12:28:49 -07:00
arvidn 4fd6136b2a improve support for SSL connections. make passing in the SSL context into the http_connection mandatory (simplifying it, so it doesn't have to create its own). Sepaate the SSL context used for trackers and SSL torrents, so normal trackers can be validated, without interfering with the special SNI callback used for SSL torrents 2020-03-21 12:28:49 -07:00
arvidn 61a923e9b8 make UPnP port-mapping lease duration configurable, and default to 1 hour leases 2020-03-19 16:12:11 -07:00
arvidn ce9be0c83f deprecate bittyrant choking algorithm 2020-03-15 12:24:36 -07:00
arvidn eaa18ff7a1 announce port=1 instead of port=0, when there is no listen port 2020-03-07 17:11:03 -08:00
arvidn 9469913cb2 fix typo in lsd::start 2020-03-07 08:21:30 -08:00
Arvid Norberg 6480b9df8c minor tweak to set_queue_position to ensure trigger_auto_managed() is always called 2020-03-07 07:08:02 -08:00
Arvid Norberg 9bfb108b4f enable all disabled trackers when listen sockets are re-opened 2020-03-07 07:07:32 -08:00
arvidn 14d5c99a18 expanding a device does not look for a default route 2020-03-03 11:43:52 +01:00
arvidn 1e4083b3fb rely less on the ability to enumerate the routing table reliably. Any IP address
explicitly specified is assumed to represent an externally available IP, unless
marked with the l-flag. If a device name or an unspecified address is used, they
are expanded and only for such expanded entries is there a heuristic to
determine which addresses are externally available and which are local. The
default is to assume it's local only, unless it has a globally routable IP
address or a default route can be found for the device.
2020-03-03 11:43:52 +01:00
arvidn cc792d8638 improve error messages and error reporting of failing enum_routes() 2020-02-26 17:48:12 +01:00
arvidn c299004abf undeprecate settings_pack::dht_upload_rate_limit. Make sure it doesn't overflow if set too high 2020-02-20 09:25:15 +01:00
arvidn 14f1266199 fix strncpy() warnings and ensure C strings are 0-terminated 2020-02-18 20:36:01 +01:00
arvidn 3092b7ca44 fix binding TCP and UDP sockets to the same port, when specifying port 0 2020-02-07 01:27:09 +01:00
arvidn b4cda2989e fix announcing port=0 when configured with no listen interfaces 2020-02-06 22:21:42 +01:00
arvidn bc0274ed6a limit the number of DHT nodes to run 2020-01-21 12:04:22 +01:00
arvidn 2c8cf4834b simplify the local service discovery logic to only deal with a single network. Instantiate LSD once per listen_socket_t instead of just once 2020-01-20 22:14:21 +01:00
arvidn f94c09c95d use our local address correctly for user port-mapping requests 2020-01-20 14:27:16 +01:00
arvidn b5ea5bb82c move upnp mapper to have one per listen_socket_t. simplify the upnp logic to only deal with a single network. 2020-01-20 14:27:16 +01:00
arvidn b8726bd4f6 refactor discover_device() away from upnp 2020-01-20 14:27:16 +01:00
arvidn f5ebd4e354 simplify natpmp by requiring it to be tied to a specific network, and use get_gateway() and remove unused get_default_route() functions 2020-01-20 01:24:22 +01:00
arvidn a53d3a8746 factor out get_gateway function and add unit tests. IPv6 gateways are not addressed in the same network, so we can't use match_addr_mask(). Assume all local IPv6 addresses do not have a gateway 2020-01-19 08:27:33 +01:00
arvidn a1d78aa60e only start natpmp on listen sockets that have a router (since NATPMP needs one) 2020-01-19 08:27:33 +01:00
arvidn 88d9c05e3c expand IPv4 in expand_unspecified_address 2020-01-19 08:27:33 +01:00
arvidn 0961427b50 expand unspecified to loopback as well 2020-01-19 08:27:33 +01:00
arvidn 8be7ab559a remove outgoing udp sockets and replace with listen_socket_t 2020-01-19 08:27:33 +01:00
arvidn 4ceb2ea467 limit tracker announces and SOCKS5 connection attempts to listen_socket_t that actually can reach the target 2020-01-19 08:27:33 +01:00
arvidn 82d4d1927d restrict DHT nodes to the network they are associated with (multi-homed) 2020-01-17 00:01:10 +01:00
arvidn df85b31490 deprecate and remvoe broadcast_lsd setting 2020-01-16 16:02:00 +01:00
arvidn fa79697f45 deprecate (and remove) upnp_ignore_nonrouters setting 2020-01-16 10:35:50 +01:00
arvidn bd43c9b83f remove unused overload of set_external_address 2020-01-15 19:53:52 +01:00
arvidn e18366bb6b make sure &key= stays consistent between different source IPs (as mandated by BEP7) 2020-01-11 11:37:54 +01:00
arvidn 2e15b3edfa use span in expand_unspecified_address 2020-01-08 10:24:54 +01:00
arvidn f508a433a4 fix binding of outgoing interface, when configured 2020-01-08 10:21:41 +01:00
arvidn af3d084092 convert the duplex enum into a flags field, on listen_socket_t and listen_endpoint 2020-01-06 20:22:55 +01:00
Arvid Norberg 0675bd263f add new socks5_alert to trouble shoot SOCKS5 proxies 2019-12-28 17:57:44 +01:00
arvidn 69d85ed110 replace use of deprecated shared_ptr<>::unique with shared_ptr<>::use_count 2019-12-12 19:40:39 +01:00