History log of /curl/lib/socks.c (Results 51 – 75 of 180)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# e7416cfd 06-Jul-2021 Daniel Stenberg

infof: remove newline from format strings, always append it

- the data needs to be "line-based" anyway since it's also passed to the
debug callback/application

- it makes info

infof: remove newline from format strings, always append it

- the data needs to be "line-based" anyway since it's also passed to the
debug callback/application

- it makes infof() work like failf() and consistency is good

- there's an assert that triggers on newlines in the format string

- Also removes a few instances of "..."

- Removes the code that would append "..." to the end of the data *iff*
it was truncated in infof()

Closes #7357

show more ...


# cffbccd0 05-Jul-2021 Daniel Stenberg

socks4: scan for the IPv4 address in resolve results

Follow-up to 84d2839740 which changed the resolving to always resolve
both address families, but since SOCKS4 only supports IPv4 it s

socks4: scan for the IPv4 address in resolve results

Follow-up to 84d2839740 which changed the resolving to always resolve
both address families, but since SOCKS4 only supports IPv4 it should
scan for and use the first available IPv4 address.

Reported-by: shithappens2016 on github
Fixes #7345
Closes #7346

show more ...


# 063d3f3b 19-Apr-2021 Daniel Stenberg

tidy-up: make conditional checks more consistent

... remove '== NULL' and '!= 0'

Closes #6912


Revision tags: curl-7_76_1, curl-7_76_0, curl-7_75_0
# 1dc8aa87 24-Jan-2021 Daniel Stenberg

hostip/proxy: remove conn->data use

Closes #6513


# 8335c641 20-Jan-2021 Daniel Stenberg

hostip: remove conn->data from resolver functions

This also moves the 'async' struct from the connectdata struct into the
Curl_easy struct, which seems like a better home for it.

hostip: remove conn->data from resolver functions

This also moves the 'async' struct from the connectdata struct into the
Curl_easy struct, which seems like a better home for it.

Closes #6497

show more ...


# d0688dcb 19-Jan-2021 Daniel Stenberg

socks: use the download buffer instead

The SOCKS code now uses the generic download buffer for temporary
storage during the connection procedure, instead of having its own
private 60

socks: use the download buffer instead

The SOCKS code now uses the generic download buffer for temporary
storage during the connection procedure, instead of having its own
private 600 byte buffer that adds to the connectdata struct size. This
works fine because this point the buffer is allocated but is not use for
download yet since the connection hasn't completed.

This reduces the connection struct size by 22% on a 64bit arch!

The SOCKS buffer needs to be at least 600 bytes, and the download buffer
is guaranteed to never be smaller than 1000 bytes.

Closes #6491

show more ...


# a3040516 18-Jan-2021 Daniel Stenberg

lib: more conn->data cleanups

Closes #6479


# 215db086 08-Jan-2021 Daniel Stenberg

lib: pass in 'struct Curl_easy *' to most functions

... in most cases instead of 'struct connectdata *' but in some cases in
addition to.

- We mostly operate on transfers and no

lib: pass in 'struct Curl_easy *' to most functions

... in most cases instead of 'struct connectdata *' but in some cases in
addition to.

- We mostly operate on transfers and not connections.

- We need the transfer handle to log, store data and more. Everything in
libcurl is driven by a transfer (the CURL * in the public API).

- This work clarifies and separates the transfers from the connections
better.

- We should avoid "conn->data". Since individual connections can be used
by many transfers when multiplexing, making sure that conn->data
points to the current and correct transfer at all times is difficult
and has been notoriously error-prone over the years. The goal is to
ultimately remove the conn->data pointer for this reason.

Closes #6425

show more ...


# aba01da6 23-Dec-2020 Daniel Stenberg

failf: remove newline from formatting strings

... as failf adds one itself.

Also: add an assert() to failf() that triggers on a newline in the
format string!

Closes #63

failf: remove newline from formatting strings

... as failf adds one itself.

Also: add an assert() to failf() that triggers on a newline in the
format string!

Closes #6365

show more ...


Revision tags: curl-7_74_0
# 0b60d368 26-Nov-2020 Daniel Stenberg

socks: check for DNS entries with the right port number

The resolve call is done with the right port number, but the subsequent
check used the wrong one, which then could find a previous

socks: check for DNS entries with the right port number

The resolve call is done with the right port number, but the subsequent
check used the wrong one, which then could find a previous resolve which
would return and leave the fresh resolve "incomplete" and leaking
memory.

Fixes #6247
Closes #6253

show more ...


# 4d2f8006 04-Nov-2020 Daniel Stenberg

curl.se: new home

Closes #6172


Revision tags: curl-7_73_0, tiny-curl-7_72_0
# 88b1ca7c 24-Aug-2020 Daniel Stenberg

CURLE_PROXY: new error code

Failures clearly returned from a (SOCKS) proxy now causes this return
code. Previously the situation was not very clear as what would be
returned and when

CURLE_PROXY: new error code

Failures clearly returned from a (SOCKS) proxy now causes this return
code. Previously the situation was not very clear as what would be
returned and when.

In addition: when this error code is returned, an application can use
CURLINFO_PROXY_ERROR to query libcurl for the detailed error, which then
returns a value from the new 'CURLproxycode' enum.

Closes #5770

show more ...


Revision tags: curl-7_72_0
# 60aa9612 05-Jul-2020 ihsinme <61293369+ihsinme@users.noreply.github.com>

socks: use size_t for size variable

Use the unsigned type (size_t) in the arithmetic of pointers. In this
context, the signed type (ssize_t) is used unnecessarily.

Authored-by:

socks: use size_t for size variable

Use the unsigned type (size_t) in the arithmetic of pointers. In this
context, the signed type (ssize_t) is used unnecessarily.

Authored-by: ihsinme on github
Closes #5654

show more ...


Revision tags: curl-7_71_1, curl-7_71_0
# 2a41e236 08-Jun-2020 Daniel Stenberg

socks: detect connection close during handshake

The SOCKS4/5 state machines weren't properly terminated when the proxy
connection got closed, leading to a busy-loop.

Reported-By

socks: detect connection close during handshake

The SOCKS4/5 state machines weren't properly terminated when the proxy
connection got closed, leading to a busy-loop.

Reported-By: zloi-user on github
Fixes #5532
Closes #5542

show more ...


# b950120b 08-Jun-2020 xquery

socks: remove unreachable breaks in socks.c and mime.c

Closes #5537


# 3186f500 01-Jun-2020 Marc Hoersken

timeouts: move ms timeouts to timediff_t from int and long

Now that all functions in select.[ch] take timediff_t instead
of the limited int or long, we can remove type conversions
an

timeouts: move ms timeouts to timediff_t from int and long

Now that all functions in select.[ch] take timediff_t instead
of the limited int or long, we can remove type conversions
and related preprocessor checks to silence compiler warnings.

Avoiding conversions from time_t was already done in 842f73de.

Based upon #5262
Supersedes #5214, #5220 and #5221
Follow up to #5343 and #5479
Closes #5490

show more ...


# e980cbb8 05-Jun-2020 Cherish98 <66007047+Cherish98@users.noreply.github.com>

socks: fix expected length of SOCKS5 reply

Commit 4a4b63d forgot to set the expected SOCKS5 reply length when the
reply ATYP is X'01'. This resulted in erroneously expecting more bytes

socks: fix expected length of SOCKS5 reply

Commit 4a4b63d forgot to set the expected SOCKS5 reply length when the
reply ATYP is X'01'. This resulted in erroneously expecting more bytes
when the request length is greater than the reply length (e.g., when
remotely resolving the hostname).

Closes #5527

show more ...


# 67521b5e 18-May-2020 Daniel Stenberg

hostip: make Curl_printable_address not return anything

It was not used much anyway and instead we let it store a blank buffer
in case of failure.

Reported-by: MonocleAI
Fix

hostip: make Curl_printable_address not return anything

It was not used much anyway and instead we let it store a blank buffer
in case of failure.

Reported-by: MonocleAI
Fixes #5411
Closes #5418

show more ...


# 8df45547 13-May-2020 Daniel Stenberg

source cleanup: remove all custom typedef structs

- Stick to a single unified way to use structs
- Make checksrc complain on 'typedef struct {'
- Allow them in tests, public heade

source cleanup: remove all custom typedef structs

- Stick to a single unified way to use structs
- Make checksrc complain on 'typedef struct {'
- Allow them in tests, public headers and examples

- Let MD4_CTX, MD5_CTX, and SHA256_CTX typedefs remain as they actually
typedef different types/structs depending on build conditions.

Closes #5338

show more ...


Revision tags: curl-7_70_0
# a96c7529 15-Apr-2020 Daniel Stenberg

select: make Curl_socket_check take timediff_t timeout

Coverity found CID 1461718:

Integer handling issues (CONSTANT_EXPRESSION_RESULT) "timeout_ms >
9223372036854775807L" is al

select: make Curl_socket_check take timediff_t timeout

Coverity found CID 1461718:

Integer handling issues (CONSTANT_EXPRESSION_RESULT) "timeout_ms >
9223372036854775807L" is always false regardless of the values of its
operands. This occurs as the logical second operand of "||".

Closes #5240

show more ...


# 0510cce8 12-Apr-2020 Jay Satiro

socks: Fix blocking timeout logic

- Document in Curl_timeleft's comment block that returning 0 signals no
timeout (ie there's infinite time left).

- Fix SOCKS' Curl_blockread_

socks: Fix blocking timeout logic

- Document in Curl_timeleft's comment block that returning 0 signals no
timeout (ie there's infinite time left).

- Fix SOCKS' Curl_blockread_all for the case when no timeout was set.

Prior to this change if the timeout had a value of 0 and that was passed
to SOCKET_READABLE it would return right away instead of blocking. That
was likely because it was not well understood that when Curl_timeleft
returns 0 it is not a timeout of 0 ms but actually means no timeout.

Ref: https://github.com/curl/curl/pull/5214#issuecomment-612512360

Closes https://github.com/curl/curl/pull/5220

show more ...


# 53f40708 07-Apr-2020 Jay Satiro

lib: fix conversion warnings for SOCKET_WRITABLE/READABLE

- If loss of data may occur converting a timediff_t to time_t and
the time value is > TIME_T_MAX then treat it as TIME_T_MAX.

lib: fix conversion warnings for SOCKET_WRITABLE/READABLE

- If loss of data may occur converting a timediff_t to time_t and
the time value is > TIME_T_MAX then treat it as TIME_T_MAX.

This is a follow-up to 8843678 which removed the (time_t) typecast
from the macros so that conversion warnings could be identified.

Closes https://github.com/curl/curl/pull/5199

show more ...


Revision tags: curl-7_69_1
# f0e81605 08-Mar-2020 Daniel Stenberg

socks4: fix host resolve regression

1. The socks4 state machine was broken in the host resolving phase

2. The code now insists on IPv4-only when using SOCKS4 as the protocol
onl

socks4: fix host resolve regression

1. The socks4 state machine was broken in the host resolving phase

2. The code now insists on IPv4-only when using SOCKS4 as the protocol
only supports that.

Regression from #4907 and 4a4b63d, shipped in 7.69.0

Reported-by: amishmm on github
Bug: https://github.com/curl/curl/issues/5053#issuecomment-596191594
Closes #5061

show more ...


# 4b786abc 06-Mar-2020 Daniel Stenberg

socks5: switch state properly when the resolve is done

Regression from 4a4b63d (and #4907)
Reported-by: vitaha85 on github
Fixes #5053
Closes #5056


Revision tags: curl-7_69_0
# 3735107d 18-Feb-2020 Daniel Stenberg

SOCKS: fix typo in printf formatting

Follow-up to 4a4b63daa

Reported-by: Peter Piekarski
Bug: https://github.com/curl/curl/commit/4a4b63daaa01ef59b131d91e8e6e6dfe275c0f08#r37351

SOCKS: fix typo in printf formatting

Follow-up to 4a4b63daa

Reported-by: Peter Piekarski
Bug: https://github.com/curl/curl/commit/4a4b63daaa01ef59b131d91e8e6e6dfe275c0f08#r37351330

show more ...


12345678