summaryrefslogtreecommitdiff
path: root/src/SocketCore.cc
Commit message (Collapse)AuthorAgeFilesLines
* fix readDataFromHanjie Wu2023-12-181-1/+1
|
* add uTP support for outbound connectionsHanjie Wu2023-12-161-40/+43
|
* clang-formatTatsuhiro Tsujikawa2023-11-021-27/+28
|
* Drop SSLv3.0 and TLSv1.0 and add TLSv1.3Tatsuhiro Tsujikawa2019-04-071-10/+16
| | | | TLSv1.3 support is added for GNUTLS and OpenSSL.
* Enable IndentPPDirectivesTatsuhiro Tsujikawa2018-06-091-37/+37
|
* Fix compile error with toolchain which lacks IPV6_TCLASSTatsuhiro Tsujikawa2017-05-081-2/+2
|
* Increase backlog to 1024Tatsuhiro Tsujikawa2017-03-021-1/+1
|
* Fix compile error without TLS supportTatsuhiro Tsujikawa2016-02-231-0/+4
|
* Don't inherit file descriptor to child processTatsuhiro Tsujikawa2016-02-081-0/+3
| | | | | | For non-Mingw32 build, set FD_CLOEXEC to file descriptors which live beyond function scope. For Mingw32 build, just pass false to bInheritHandles parameter of CreateProcessW.
* WinTLS: Fix hang because of buffered received dataTatsuhiro Tsujikawa2016-01-301-0/+9
| | | | | | | | | | | | | WinTLSSession buffers received decrypted data into its own buffer. If read is requested, it copies the data from its buffer. But if requested buffer size is less than decrypted buffer, some of the data is left in the buffer. Previously, we had no facility to check the existence of this pending data. If this data is the last requested data from remote server, we may end up waiting for read event even if we have already data in our buffer, which may cause hang. This commit fixes this issue by introducing function to return the buffered length in TLSSession. SocketCore also provides the same function, which delegates to TLSSession object.
* mingw: Add formatLastError as wrapper function for FormatMessageTatsuhiro Tsujikawa2016-01-281-6/+5
|
* Fix compile errorTatsuhiro Tsujikawa2016-01-161-0/+1
|
* Refactor SocketCore::getPeerInfo, getAddrInfo to return Endpoint objectTatsuhiro Tsujikawa2016-01-091-12/+7
|
* Define SockAddr and use it instead of raw std::pairTatsuhiro Tsujikawa2016-01-091-31/+25
|
* Try all found address set to bind sockets with --multiple-interfaceTatsuhiro Tsujikawa2016-01-091-18/+25
| | | | Fixes GH-523
* make clang-format using clang-format-3.6Tatsuhiro Tsujikawa2015-12-271-421/+421
|
* Add --socket-recv-buffer-size optionTatsuhiro Tsujikawa2015-11-281-0/+41
| | | | | | | | Set the maximum socket receive buffer in bytes. Specifing 0 will disable this option. This value will be set to socket file descriptor using SO_RCVBUF socket option with setsockopt() call. See GH-487 about the usecase of this option
* Use user-defined literal for k, m, and g (powers of 1024)Tatsuhiro Tsujikawa2015-06-211-1/+1
|
* Use std::make_sharedTatsuhiro Tsujikawa2015-06-111-1/+1
|
* Arrange #ifdef guard so that formatter does not get fooledTatsuhiro Tsujikawa2015-05-161-27/+28
|
* Add --ssh-host-key-md optionTatsuhiro Tsujikawa2015-05-161-1/+15
| | | | | | | | | Set checksum for SSH host public key. Use same syntax with --checksum option. TYPE is hash type. The supported hash type is sha-1 or md5. DIGEST is hex digest. For example: sha-1=b030503d4de4539dc7885e6f0f5e256704edf4c3. This option can be used to validate server's public key when SFTP is used. If this option is not set, which is default, no validation takes place.
* fix build error without libssh2multisnow2015-05-141-2/+4
|
* sftp: Seek to the correct position to resume, fix slow start of transferTatsuhiro Tsujikawa2015-05-121-0/+7
|
* sftp: basic download worksTatsuhiro Tsujikawa2015-05-121-0/+40
| | | | | | This commits implements basic downloading feature for sftp URI. This includes segmented downloads, and connection (sftp session) pooling. Download via HTTP proxy has not been implemented yet.
* Add basic ssh/sftp code to SocketCore and introduce SSHSessionTatsuhiro Tsujikawa2015-05-101-1/+120
| | | | | | | | | | We use libssh2 to implement sftp feature. SSHSession is closely designed to TLSSession, but it differs in several aspects. In this code, we only implements read part of sftp, since aria2 won't offer uploading feature. Adding SSH/sftp to SocketCore is a bit bloat. But by doing this we can reuse DownloadCommand, without mostly no modification. We can just create SSHDownloadCommand by inheriting it, just like existing ftp.
* multiple interface support for link aggregationSarim Khan2015-04-211-0/+42
| | | | fix: wrong variable
* Fixed some typos in code commentsDan Fandrich2015-01-161-1/+1
|
* Fix SSLv3 warnings being issued on connection reuse.Nils Maier2014-12-301-41/+73
| | | | | And also improve tlsHandshake code a bit in the process, mostly by being more explicit about error conditions.
* Refine messages to include peer infoNils Maier2014-12-141-2/+15
|
* Move warn logic into SocketCoreNils Maier2014-12-141-2/+15
| | | | | Also fiddle a bit with the WinTLS implementation, forcing "strong" crypto only for > SSLv3.
* Use std::make_shared and make_unique where possible, part 2Tatsuhiro Tsujikawa2014-09-131-1/+1
|
* Ignore error when setting DSCP valueTatsuhiro Tsujikawa2014-03-301-6/+14
| | | | | | Setting DSCP is additional feature and failure to enable it should not abort download entirely. This change fixes the bug that windows build does not perform bittorrent downloads.
* Added DSCP support for IPv6 socketsAlexander Amanuel2014-03-121-1/+9
|
* Refactored DSCP-related code a bitAlexander Amanuel2014-01-281-2/+3
|
* Added DSCP supportAlexander Amanuel2014-01-281-0/+5
|
* Remove log message "TLS else" as this function called repeatedlyTatsuhiro Tsujikawa2013-10-081-1/+0
|
* Don't log "TLS Handshaking" twice or moreTatsuhiro Tsujikawa2013-10-071-1/+1
|
* Implement WinTLSNils Maier2013-09-301-1/+4
|
* More auto-converts by cpp11-migrateNils Maier2013-09-201-5/+5
|
* More code cleanupsNils Maier2013-08-211-173/+156
|
* Convert to autos and ranged loopsNils Maier2013-08-211-4/+2
|
* Convert most 0/NULL pointers to nullptrNils Maier2013-08-201-16/+16
| | | | Courtesy of llvm cpp11-migrate 3.3
* Remove auto_delete in favor of std::unique_ptrTatsuhiro Tsujikawa2013-06-221-7/+14
|
* Require -std=c++11 and use std::shared_ptr instead of SharedHandleTatsuhiro Tsujikawa2013-06-221-6/+6
|
* Merge branch 'libuv-eventpoll' of https://github.com/nmaier/aria2 into ↵Tatsuhiro Tsujikawa2013-04-301-1/+1
|\ | | | | | | nmaier-libuv-eventpoll
| * LibUV: Implement LibuvEventPollNils Maier2013-04-101-1/+1
| | | | | | | | | | | | | | | | | | LibUV event will use the best available polling method on a system, kind of like aria2 does already with the different *EventPoll implementations. However, libuv may support different/newer polling mechanisms; for example on Windows it will use IO Completion Ports which are superior to select() ;)
* | Fix compile error without SSL/TLS libTatsuhiro Tsujikawa2013-04-141-0/+6
|/
* AppleTLS: Implement AppleTLS and Apple Message DigestNils Maier2013-04-051-1/+1
|
* Abstract TLS session implementationTatsuhiro Tsujikawa2013-04-031-406/+59
| | | | | Now TLS session object is abstracted as TLSSession class. Currently, we have GNUTLS and OpenSSL implementations.
* mingw: Ignore tunnel interface and address in 169.254.*Tatsuhiro Tsujikawa2013-03-311-2/+17
|