Commit Graph

256 Commits

Author SHA1 Message Date
arvidn 5a251a1684 undeprecate the upnp_ignore_nonrouters setting with a slightly different meaning. still default to false and make it mean to ignore routers outside of the local subnet 2020-04-30 23:18:21 +02:00
Arvid Norberg e2501c061d fix setting lease duration to 0 2020-04-27 09:42:40 +02:00
arvidn c537f6277f make upnp lease duration configurable on the fly 2020-04-23 19:06:37 +02:00
arvidn 2d9513deb0 fix out-of-bound access in upnp unmap 2020-04-02 12:09:24 -07:00
Arvid Norberg 2964cbc1c6 fix upnp assert 2020-03-29 06:02:26 -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 67b99b28cb fix UPnP expiration logic 2020-03-19 16:12:11 -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 6d5bdbdb1a fix recent clang warnings 2020-02-08 13:58:04 +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 fa79697f45 deprecate (and remove) upnp_ignore_nonrouters setting 2020-01-16 10:35:50 +01:00
arvidn a81bf1f1d7 make the buffers to print SOAP messages into a bit smaller, to silence a GCC warning 2019-11-29 12:57:43 +01:00
arvidn 592544f30f fix some PVS studio warnings 2019-11-07 16:38:08 +00:00
Arvid Norberg 76c2794923
fix build with boost-1.70 (#3788)
fix build with boost 1.70.0 Fix #3683
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2019-04-19 20:56:19 +02:00
Amir Abrams 97c23366f3 Remove duplicate word in comments like "the the" 2019-02-24 12:28:17 +01:00
Alden Torres f23daa8262 marked final error category classes, avoid -Wnon-virtual-dtor 2019-01-20 00:38:25 +01:00
arvidn 35ad3bb499 fix %u -> %d format codes 2018-12-12 18:07:06 +01:00
arvidn 0808b96ec7 correct %u format code for pieces in printf() calls 2018-11-27 12:26:25 +01:00
arvidn 5383854768 make span's and sha1_hash's index and size types signed (instead of unsigned). Specifically std::ptrdiff_t. In line with the direction of gsl span and reduce signed->unsigned casts 2018-11-16 14:06:22 +01:00
arvidn 69485558ef factor out duplicate code in piece_picker, upnp and lazy_bdecode 2018-11-10 15:17:57 +01:00
arvidn a0fa0b14bb merged RC_1_1 into master 2018-11-04 19:12:22 +01:00
Arvid Norberg 939b380fda fix build against boost-1.69 2018-11-02 11:10:26 +01:00
arvidn 3fb05d77d8 fix warnings 2018-10-20 20:56:26 +02:00
arvidn f0227451a6 merged RC_1_1 into master 2018-04-13 01:47:41 +02:00
arvidn aaf9304a3b update year in copyright header 2018-04-09 09:04:33 +02:00
arvidn a01274ce2c broadcast socket handler take a span 2018-01-14 20:21:42 -05:00
arvidn 65fef972a2 apply some c++11 modernization 2018-01-11 04:51:39 -05:00
Alden Torres 98ade28237 using make_address instead of deprecated from_string when boost>=1.66 (#2659)
using make_address instead of deprecated from_string when boost>=1.66
2018-01-04 04:48:22 -05:00
arvidn d4864b8b18 some noexcept fixes 2017-11-10 09:05:15 +01:00
Alden Torres b380bf8059 minor and general code cleanup/refactor 2017-10-25 09:58:47 +02:00
Alden Torres 174a2ca65f add limit of max 50 upnp mappings and recover free global mappings (#2470) 2017-10-24 16:16:22 +02:00
pavel.pimenov 989a65f18e upnp: reduce size NewPortMappingDescription 2017-10-24 12:27:46 +02:00
Alden Torres 74ecf63906 close connection in upnp::on_upnp_xml and added abort/closing returns 2017-10-20 11:46:41 +02:00
Alden Torres 8083a6c2bd some code indentation, one more use of nullptr and constexpr 2017-10-15 04:30:10 +02:00
Arvid Norberg 60b74d2616 merged RC_1_1 into master 2017-10-10 14:25:12 +02:00
Arvid Norberg 830ef0bedd prevent dependency on openssl from leaking outside of libtorrent (libssl and libcrypto should not be a usage requirement). This cleans up most tests to build without having to also link against openssl 2017-10-09 17:15:35 +02:00
Alden Torres 53ab7684fd minor code refactor and cleanup in port mapping code 2017-09-28 01:17:21 -07:00
arvidn 95c8c3018a use span in gzip, http_parser and http_connection 2017-09-04 22:33:38 +02:00
arvidn 11f008e90e use a strong typedef for port mapping id 2017-09-02 07:02:07 +02:00
Arvid Norberg f734ad067b straighten out some type-safety in port mapping enums (#2285) 2017-08-30 20:47:49 +02:00
Alden Torres 8ed17ab311 minor code refactor, more use of nullptr, typos 2017-08-07 21:15:14 +02:00
arvidn 6b1037eff5 convert enum values that are just used as constants, to actual constants with the correct type 2017-08-04 15:23:20 +02:00
Alden Torres 687e0ea4b4 added consts and minor auto refactor in upnp.cpp 2017-06-20 17:59:05 -04:00
Alden Torres 18eef80676 avoid runtime fail with wrong arguments in upnp::update_map (#2094) 2017-06-20 15:06:14 -04:00
Pavel Pimenov 4cee8104d7 add base_mapping_t (#2025)
factor out parts of mapping struct from NATPMP and UPnP
2017-05-27 20:26:47 -04:00
arvidn e0fa1cd247 merged RC_1_1 into master 2017-05-12 21:46:45 -04:00
arvidn ff63557f58 bind upnp requests to correct local address 2017-05-12 18:17:38 -04:00
arvidn 480bde9333 change formatting of namespace declarations 2017-04-12 14:26:35 -04:00
Arvid Norberg 5f69e8217c clean up xml parser, to use string_view (#1731)
clean up xml parser, to use string_view
2017-02-19 07:34:55 -05:00