summaryrefslogtreecommitdiff
path: root/lib/socks.c
Commit message (Collapse)AuthorAgeFilesLines
* build: make use of 76 lib/*.h renamed filesYang Tse2012-12-281-9/+9
| | | | | | 76 private header files renamed to use our standard naming scheme. This change affects 322 files in libcurl's source tree.
* setup_once.h: refactor inclusion of <unistd.h> and <sys/socket.h>Yang Tse2012-12-141-4/+1
| | | | Inclusion of top two most included header files now done in setup_once.h
* lib/socks.c: Merged two size variables into oneMarc Hoersken2012-10-041-16/+15
|
* lib/socks.c: Avoid type conversions where possibleMarc Hoersken2012-10-041-16/+15
| | | | | Streamlined variable names and types to avoid type conversions that may result in data being lost on non 32-bit systems.
* socks.c: Fixed warning: conversion to 'int' from 'long unsigned int'Marc Hoersken2012-09-141-1/+1
|
* socks.c: Check that IPv6 is enabled before using it's featuresMarc Hoersken2012-09-141-0/+4
|
* checksrc: Fixed line length and comment indentationMarc Hoersken2012-09-141-3/+3
|
* socks.c: Updated error messages to handle hostname and IPv6Marc Hoersken2012-09-141-1/+25
|
* socks.c: Added support for IPv6 connections through SOCKSv5 proxyMarc Hoersken2012-09-141-31/+34
|
* SOCKS: truly disable it if CURL_DISABLE_PROXY is definedDaniel Stenberg2012-09-061-1/+1
| | | | | | Bug: http://curl.haxx.se/bug/view.cgi?id=3561305 Patch by: Marcel Raad
* fix bool variables checking and assignmentYang Tse2011-09-051-1/+1
|
* Curl_SOCKS4: minor code compressionDaniel Stenberg2011-08-181-4/+1
|
* SOCKS: fix the connect timeoutDaniel Stenberg2011-08-081-24/+11
| | | | | | | The connect timeout logic when using SOCKS was done wrong Bug: http://curl.haxx.se/mail/lib-2011-07/0177.html Reported by: "Spoon Man"
* stdio.h, stdlib.h, string.h, stdarg.h and ctype.h inclusion done in setup_once.hYang Tse2011-07-261-4/+0
|
* Curl_socket_ready: make timeout a 'long'Daniel Stenberg2011-06-041-3/+3
| | | | | It was mostly typecasted to int all over the code so switching to long instead all over should be a net gain.
* socks: fix unaligned memory accessYang Tse2011-05-261-9/+13
|
* proxy: allow socks:// prefix in proxy stringDaniel Stenberg2011-04-281-1/+1
| | | | Inspired by a patch from OB.Conseil. Added test case 708 to verify.
* source cleanup: unify look, style and indent levelsDaniel Stenberg2011-04-271-12/+13
| | | | | By the use of a the new lib/checksrc.pl script that checks that our basic source style rules are followed.
* async resolvers: further cleanupsDaniel Stenberg2011-04-251-2/+2
| | | | | | | | asyn-ares.c and asyn-thread.c are two separate backends that implement the same (internal) async resolver API for libcurl to use. Backend is specified at build time. The internal resolver API is defined in asyn.h for asynch resolvers.
* Fix a couple of spelling errors in lib/Fabian Keil2011-04-211-2/+2
| | | | Found with codespell.
* Curl_timeleft: s/conn/data in first argumentDaniel Stenberg2011-01-041-3/+3
| | | | | As the function doesn't really use the connectdata struct but only the SessionHanadle struct I modified what argument it wants.
* fix compiler warning: enumerated type mixed with another typeYang Tse2010-05-311-3/+3
|
* sendrecv: split the I/O handling into private handlerHoward Chu2010-05-071-2/+4
| | | | | | | | | | | | | | Howard Chu brought the bulk work of this patch that properly moves out the sending and recving of data to the parts of the code that are properly responsible for the various ways of doing so. Daniel Stenberg assisted with polishing a few bits and fixed some minor flaws in the original patch. Another upside of this patch is that we now abuse CURLcodes less with the "magic" -1 return codes and instead use CURLE_AGAIN more consistently.
* socks5: please static code analyzerDaniel Stenberg2010-04-241-4/+6
| | | | | | | | | | | Make sure we don't call memcpy() if the argument is NULL even though we also passed a zero length then, as the clang analyzer whined and we want to limit warnings (even false positives) when they're this easy to fix. The change of (char) to (unsigned char) will fix long user names and passwords on systems that have the char type signed by default.
* SOCKS4: Value stored to 'rc' is never readDaniel Stenberg2010-04-161-2/+2
|
* SOCKS5: when name resolves fail return immediatelyDaniel Stenberg2010-04-161-1/+4
| | | | | This makes the code flow more obvious and reacts on the return code properly, even if the code acted the same way before.
* remove the CVSish $Id$ linesDaniel Stenberg2010-03-241-1/+0
|
* fix printf-style format stringsYang Tse2010-02-041-2/+2
|
* Fix compiler warning: conditional expression is constantYang Tse2010-02-021-2/+2
|
* removed obsolete casts.Gunter Knauf2009-08-291-2/+2
|
* add casts to silent compiler warnings with 64bit systems.Gunter Knauf2009-08-291-2/+2
|
* - Eric Wong introduced curlx_nonblock() that the curl tool now (re-)uses forDaniel Stenberg2009-07-091-7/+7
| | | | | setting a file descriptor non-blocking. Used by the functionality Eric himself brough on June 15th.
* Moved potential inclusion of system's malloc.h and memory.h header files toYang Tse2009-04-211-3/+0
| | | | | setup_once.h. Inclusion of each header file is based on the definition of NEED_MALLOC_H and NEED_MEMORY_H respectively.
* If CURL_DISABLE_PROXY is defined, we must allow socks_sspi.c to callGisle Vanem2009-03-151-1/+1
| | | | Curl_blockread_all(). It is needed in code inside USE_WINDOWS_SSPI.
* - Markus Moeller introduced two new options to libcurl:Daniel Stenberg2009-01-281-20/+58
| | | | | | | CURLOPT_SOCKS5_GSSAPI_SERVICE and CURLOPT_SOCKS5_GSSAPI_NEC to allow libcurl to do GSS-style authentication with SOCKS5 proxies. The curl tool got the options called --socks5-gssapi-service and --socks5-gssapi-nec to enable these.
* - Daniel Egger provided a patch that allows you to disable proxy support inDaniel Stenberg2008-09-291-0/+4
| | | | | libcurl to somewhat reduce the size of the binary. Run configure --disable-proxy.
* - Made the SOCKS code use the new Curl_read_plain() function to fix the bugDaniel Stenberg2008-09-221-1/+1
| | | | | | | | Markus Moeller reported: http://curl.haxx.se/mail/archive-2008-09/0016.html - recv() errors other than those equal to EAGAIN now cause proper CURLE_RECV_ERROR to get returned. This made test case 160 fail so I've now disabled it until we can figure out another way to exercise that logic.
* - Hans-Jurgen May pointed out that trying SCP or SFTP over a SOCKS proxyDaniel Stenberg2008-06-201-7/+9
| | | | | | | | crashed libcurl. This is now addressed by making sure we use "plain send" internally when doing the socks handshake instead of the Curl_write() function which is designed to use the "target" protocol. That's then SCP or SFTP in this case. I also took the opportunity and cleaned up some ssh- related #ifdefs in the code for readability.
* Yang Tse pointed out a few remaining quirks from my timeout refactoring fromDaniel Stenberg2008-02-111-0/+12
| | | | | Feb 7 that didn't abort properly on timeouts. These are actually old problems but now they should be fixed.
* - Refactored a lot of timeout code into a few functions in an attempt to makeDaniel Stenberg2008-02-071-24/+2
| | | | | them all use the same (hopefully correct) logic to make it less error-prone and easier to introduce library-wide where it should be used.
* fix compiler warningYang Tse2008-01-141-1/+1
|
* fix compiler warningYang Tse2008-01-131-1/+1
|
* fix compiler warningYang Tse2008-01-091-3/+3
|
* Based on further discussion on curl-library, I reverted yesterday's SOCKS5Daniel Stenberg2008-01-051-1/+1
| | | | | | | | | | | code to instead introduce support for a new proxy type called CURLPROXY_SOCKS5_HOSTNAME that is used to send the host name to the proxy instead of IP address and there's thus no longer any need for a new curl_easy_setopt() option. The default SOCKS5 proxy is again back to sending the IP address to the proxy. The new curl command line option for enabling sending host name to a SOCKS5 proxy is now --socks5-hostname.
* Based on Maxim Perenesenko's patch, we now do SOCKS5 operations and let theDaniel Stenberg2008-01-041-25/+85
| | | | | | proxy do the host name resolving and only if --socks5ip (or CURLOPT_SOCKS5_RESOLVE_LOCAL) is used we resolve the host name locally and pass on the IP address only to the proxy.
* Richard Atterer brought a patch that added support for SOCKS4a proxies, whichDaniel Stenberg2008-01-021-9/+40
| | | | | | | is an inofficial PROXY4 variant that sends the hostname to the proxy instead of the resolved address (which is already supported by SOCKS5). --socks4a is the curl command line option for it and CURLOPT_PROXYTYPE can now be set to CURLPROXY_SOCKS4A as well.
* removed space after if and while before the parenthesis for better source codeDaniel Stenberg2007-11-051-23/+23
| | | | consistency
* Fixed some minor type mismatches and missing consts mainly found by splint.Dan Fandrich2007-08-271-2/+2
|
* if we read zero bytes from the proxy, the connection is broken and we needDaniel Stenberg2007-06-051-0/+5
| | | | to bail out
* - Robert Iakobashvil added curl_multi_socket_action() to libcurl, which is aDaniel Stenberg2007-04-161-2/+2
| | | | | | | | function that deprecates the curl_multi_socket() function. Using the new function the application tell libcurl what action that was found in the socket that it passes in. This gives a significant performance boost as it allows libcurl to avoid a call to poll()/select() for every call to curl_multi_socket*().