OpenBSD CVS

CVS log for src/usr.bin/nc/socks.c


[BACK] Up to [local] / src / usr.bin / nc

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.31 / (download) - annotate - [select for diffs], Wed Jun 8 20:20:26 2022 UTC (23 months, 1 week ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, HEAD
Changes since 1.30: +2 -2 lines
Diff to previous 1.30 (colored)

do not refuse valid IPv6 addresses in -X connect (HTTP CONNECT proxy)
support. Identified by Wilmer van der Gaast, ok millert@

Revision 1.30 / (download) - annotate - [select for diffs], Mon Nov 4 17:33:28 2019 UTC (4 years, 6 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.29: +3 -3 lines
Diff to previous 1.29 (colored)

Fix an out of bound read/write when using a proxy.
From Lucas AT sexy DOT is.  OK job@ kn@

Revision 1.29 / (download) - annotate - [select for diffs], Mon Jul 29 15:19:03 2019 UTC (4 years, 9 months ago) by benno
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.28: +3 -2 lines
Diff to previous 1.28 (colored)

Make proxy auth work with http 1.1 speaking webservers.
Diff from Alexander Koeppe format_c -AT- online -DOT- de, thanks.
ok deraadt@

Revision 1.28 / (download) - annotate - [select for diffs], Wed Jul 3 03:24:02 2019 UTC (4 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.27: +3 -3 lines
Diff to previous 1.27 (colored)

snprintf/vsnprintf return < 0 on error, rather than -1.

Revision 1.27 / (download) - annotate - [select for diffs], Thu Jan 10 12:44:54 2019 UTC (5 years, 4 months ago) by mestre
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.26: +2 -3 lines
Diff to previous 1.26 (colored)

Revert back previous commit and stop including strings.h

Use memset(3) instead of bzero(3) since POSIX recommends using the former and
because it's also more portable (conforms to ANSI C standard)

OK tedu@ tb@

Revision 1.26 / (download) - annotate - [select for diffs], Wed Jan 9 12:58:18 2019 UTC (5 years, 4 months ago) by inoguchi
Branch: MAIN
Changes since 1.25: +2 -1 lines
Diff to previous 1.25 (colored)

Include strings.h for bzero in usr.bin/nc

bzero is defined in strings.h.

ok deraadt@

Revision 1.25 / (download) - annotate - [select for diffs], Tue Mar 27 16:31:10 2018 UTC (6 years, 1 month ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.24: +11 -8 lines
Diff to previous 1.24 (colored)

Clear password buffers in non-terminating cases
ok tobias

Revision 1.24 / (download) - annotate - [select for diffs], Mon Jun 27 14:43:04 2016 UTC (7 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.23: +2 -2 lines
Diff to previous 1.23 (colored)

whitespace

Revision 1.23 / (download) - annotate - [select for diffs], Thu Dec 10 18:31:52 2015 UTC (8 years, 5 months ago) by mmcc
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.22: +3 -3 lines
Diff to previous 1.22 (colored)

Specify SOCKS version in error messages. ok deraadt@

Revision 1.22 / (download) - annotate - [select for diffs], Thu Dec 10 16:49:28 2015 UTC (8 years, 5 months ago) by mmcc
Branch: MAIN
Changes since 1.21: +61 -5 lines
Diff to previous 1.21 (colored)

Map SOCKS error codes to error strings. With input from deraadt@

Revision 1.21 / (download) - annotate - [select for diffs], Thu Mar 26 21:19:51 2015 UTC (9 years, 1 month ago) by tobias
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.20: +3 -3 lines
Diff to previous 1.20 (colored)

Fix error message in case of write failure.

ok djm

Revision 1.20 / (download) - annotate - [select for diffs], Thu Mar 8 09:56:28 2012 UTC (12 years, 2 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7, OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2
Changes since 1.19: +3 -3 lines
Diff to previous 1.19 (colored)

fix format strings for size_t
ok okan@

Revision 1.19 / (download) - annotate - [select for diffs], Sat Feb 12 15:54:18 2011 UTC (13 years, 3 months ago) by okan
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.18: +18 -4 lines
Diff to previous 1.18 (colored)

fix from pr 6207.  a bit more of an explanation: we write the correct
number of bits when connecting via a SOCKS 5 proxy over ipv6, but we
also need to read the same number depending on the received address
type.  this issue is not noticeable with ssh's SOCKS 5 support since it
always set the address type as ipv4.  this fixes connections via SOCKS 5
proxies which set their address type as ipv6 when using ipv6.

after review with, and ok, nicm@

Revision 1.18 / (download) - annotate - [select for diffs], Tue Apr 20 07:26:35 2010 UTC (14 years, 1 month ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.17: +9 -9 lines
Diff to previous 1.17 (colored)

Allocate the port number properly (don't allocate space then ignore it),
and use %zu for size_t.

ok djm

Revision 1.17 / (download) - annotate - [select for diffs], Mon Sep 25 04:51:20 2006 UTC (17 years, 7 months ago) by ray
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7, OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3, OPENBSD_4_2_BASE, OPENBSD_4_2, OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.16: +3 -2 lines
Diff to previous 1.16 (colored)

Also accept "HTTP/1.1 200" as a success response.

OK djm@.

Revision 1.16 / (download) - annotate - [select for diffs], Wed Jan 25 23:21:37 2006 UTC (18 years, 3 months ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE, OPENBSD_4_0, OPENBSD_3_9_BASE, OPENBSD_3_9
Changes since 1.15: +72 -17 lines
Diff to previous 1.15 (colored)

implement HTTP proxy authentication support, very useful in a ssh_config
ProxyCommand; ok beck@

Revision 1.15 / (download) - annotate - [select for diffs], Tue May 24 20:13:28 2005 UTC (18 years, 11 months ago) by avsm
Branch: MAIN
CVS Tags: OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.14: +20 -34 lines
Diff to previous 1.14 (colored)

Switch atomicio to a simpler interface which returns size_t and uses
0 to signal errors.  should be no functional change in nc apart from
different error messages.

"groovy", said deraadt@

Revision 1.14 / (download) - annotate - [select for diffs], Fri May 20 22:46:08 2005 UTC (19 years ago) by djm
Branch: MAIN
Changes since 1.13: +101 -55 lines
Diff to previous 1.13 (colored)

Teach the SOCKS5 code more of the protocol, so it can send domain names
to the proxy instead of resolving them locally and sending IPv4 addresses.
This improves privacy, e.g. when using nc with OpenSSH DynamicForward tunnels,
and gives us better IPv6 support; ok beck@

Revision 1.13 / (download) - annotate - [select for diffs], Fri May 20 11:06:58 2005 UTC (19 years ago) by djm
Branch: MAIN
Changes since 1.12: +4 -2 lines
Diff to previous 1.12 (colored)

HTTP proxy doesn't need an address lookup - saves some time and avoids a
spurious error if the lookup fails. from Ray; ok markus@

Revision 1.12 / (download) - annotate - [select for diffs], Thu May 19 08:40:59 2005 UTC (19 years ago) by djm
Branch: MAIN
Changes since 1.11: +2 -2 lines
Diff to previous 1.11 (colored)

fix SOCKS5 code for case where data comes in the same packet as the response;
ok dtucker@ markus@

Revision 1.11 / (download) - annotate - [select for diffs], Thu May 19 04:29:46 2005 UTC (19 years ago) by djm
Branch: MAIN
Changes since 1.10: +44 -44 lines
Diff to previous 1.10 (colored)

KNF, no binary change; ok jaredy@

Revision 1.10 / (download) - annotate - [select for diffs], Tue Feb 8 15:26:23 2005 UTC (19 years, 3 months ago) by otto
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7
Changes since 1.9: +8 -7 lines
Diff to previous 1.9 (colored)

Some extra strict warning cleanup. From Xin Li <delphij at FreeBSD
dot ORG> with a twist from myself. No binary change. ok djm@

Revision 1.9 / (download) - annotate - [select for diffs], Sun Oct 17 03:13:55 2004 UTC (19 years, 7 months ago) by djm
Branch: MAIN
Changes since 1.8: +76 -10 lines
Diff to previous 1.8 (colored)

http proxy CONNECT support; ok beck@

Revision 1.8 / (download) - annotate - [select for diffs], Mon Jul 7 21:36:23 2003 UTC (20 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_6_BASE, OPENBSD_3_6, OPENBSD_3_5_BASE, OPENBSD_3_5, OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.7: +7 -4 lines
Diff to previous 1.7 (colored)

protos

Revision 1.7 / (download) - annotate - [select for diffs], Tue Jun 3 20:49:29 2003 UTC (20 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.6: +1 -6 lines
Diff to previous 1.6 (colored)

fix various 3/4 licenses according to "terms" file

Revision 1.6 / (download) - annotate - [select for diffs], Mon Dec 30 17:55:25 2002 UTC (21 years, 4 months ago) by stevesk
Branch: MAIN
CVS Tags: OPENBSD_3_3_BASE, OPENBSD_3_3
Changes since 1.5: +2 -2 lines
Diff to previous 1.5 (colored)

correct return code check; from Owl.  ok fgsch@

Revision 1.5 / (download) - annotate - [select for diffs], Thu Feb 28 18:05:36 2002 UTC (22 years, 2 months ago) by markus
Branch: MAIN
CVS Tags: OPENBSD_3_2_BASE, OPENBSD_3_2, OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.4: +66 -40 lines
Diff to previous 1.4 (colored)

add support for SOCKS4 with option -X socks_version, default is 5; ok ericj@

Revision 1.4 / (download) - annotate - [select for diffs], Tue Feb 19 22:42:04 2002 UTC (22 years, 3 months ago) by ericj
Branch: MAIN
Changes since 1.3: +3 -1 lines
Diff to previous 1.3 (colored)


-Wall cleanup.
from Kevin Steves <stevesk@pobox.com>

Revision 1.3 / (download) - annotate - [select for diffs], Sun Oct 28 19:46:12 2001 UTC (22 years, 6 months ago) by jakob
Branch: MAIN
Changes since 1.2: +1 -1 lines
Diff to previous 1.2 (colored)

fix stupid typo

Revision 1.2 / (download) - annotate - [select for diffs], Sun Oct 28 19:45:17 2001 UTC (22 years, 6 months ago) by jakob
Branch: MAIN
Changes since 1.1: +1 -2 lines
Diff to previous 1.1 (colored)

remove unused variable

Revision 1.1 / (download) - annotate - [select for diffs], Sun Sep 2 18:45:41 2001 UTC (22 years, 8 months ago) by jakob
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE, OPENBSD_3_0

add very basic proxy support using socks5 client code from niklas@.
ok ericj@.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.