freebsd-dev/lib
Kyle Evans c44be5aa0a fetch(3): Add SOCKS5 support
This change adds SOCKS5 support to the library fetch(3) and updates the man
page.

Details: Within the fetch_connect() function, fetch(3) checks if the
SOCKS5_PROXY environment variable is set. If so, it connects to this host
rather than the end-host. It then initializes the SOCKS5 connection in
accordance with RFC 1928 and returns the resulting conn_t (file descriptor)
for usage by the regular FTP/HTTP handlers.

Design Decision: This change defaults all DNS resolutions through the proxy
by sending all IPs as hostnames. Going forward, another feature might be to
create another environmental variable to toggle resolutions through the
proxy or not..

One may set the SOCKS5_PROXY environment variable in any of the formats:

SOCKS5_PROXY=proxy.example.com
SOCKS5_PROXY=proxy.example.com:1080
SOCKS5_PROXY=192.0.2.0
SOCKS5_PROXY=198.51.100.0:1080
SOCKS5_PROXY=[2001:db8::1]
SOCKS5_PROXY=[2001:db8::2]:1080

Then perform a request with fetch(1).

(note by kevans)
I've since been informed that Void Linux/xbps has a fork of libfetch that
also implements SOCKS5. I may compare/contrast the two in the mid-to-near
future.

Submitted by:	Farhan Khan <farhan farhan codes>
Differential Revision:	https://reviews.freebsd.org/D18908
2020-02-15 18:03:16 +00:00
..
atf Update Makefile.depend files 2019-12-11 17:37:53 +00:00
clang [PowerPC] Fix libllvmminimal build when building from powerpc64 ELFv1. 2020-01-07 22:45:02 +00:00
csu retire BSD_CRTBEGIN option 2020-01-31 18:04:04 +00:00
geom Add some missing articles. 2020-01-28 15:34:00 +00:00
googletest Another round of attempting to squelch -Wdeprecated-declarations, which 2019-09-17 06:07:08 +00:00
lib80211 Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libalias Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libarchive Remove sparc64 specific warning suppression. 2020-02-12 06:54:34 +00:00
libauditd pkgbase: Create a FreeBSD-utilities package and make it the default one 2019-09-05 14:15:47 +00:00
libbe Drop "All Rights Reserved" from all libbe/bectl files 2020-01-24 02:18:09 +00:00
libbearssl Add libbearssl 2019-02-26 05:59:22 +00:00
libbegemot Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libblacklist Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libblocksruntime Move all sources from the llvm project into contrib/llvm-project. 2019-12-20 19:53:05 +00:00
libbluetooth Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libbsdstat Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libbsm Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libbsnmp Update dirdeps.mk and gendirdeps.mk 2019-12-11 17:38:15 +00:00
libbz2 Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libc Add AT_BSDFLAGS support to _elf_aux_info(3). 2020-02-09 12:12:03 +00:00
libc_nonshared lib: further adoption of SPDX licensing ID tags. 2017-11-26 02:00:33 +00:00
libc++ Revert r353140: Re-add ALLOW_MIPS_SHARED_TEXTREL, sprinkle it around 2020-01-14 17:50:13 +00:00
libc++experimental Move all sources from the llvm project into contrib/llvm-project. 2019-12-20 19:53:05 +00:00
libcalendar Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libcam Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libcapsicum capsicum_helpers: split stream cap bits out of caph_limit_stream() 2020-01-02 23:07:45 +00:00
libcasper Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libclang_rt Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp 2019-12-22 11:50:44 +00:00
libcom_err Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libcompat ftime appeared in 7th Edition Unix to replace gtime. 2018-10-28 02:58:15 +00:00
libcompiler_rt Remove sparc64 specific inclusion of bswap32 built-ins. 2020-02-12 06:56:04 +00:00
libcrypt Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libcuse Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libcxxrt Revert r353140: Re-add ALLOW_MIPS_SHARED_TEXTREL, sprinkle it around 2020-01-14 17:50:13 +00:00
libdevctl Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libdevdctl libdevdctl: g++9 avoid Wdeprecated-copy 2019-12-21 02:44:26 +00:00
libdevinfo Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libdevstat Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libdl Add libdl to clibs package 2018-03-29 19:43:29 +00:00
libdpv Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libdwarf Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libedit Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libefivar Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libelf Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libelftc Update ELF Tool Chain to upstream r3769 2019-12-05 13:20:15 +00:00
libevent Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libexecinfo Move all sources from the llvm project into contrib/llvm-project. 2019-12-20 19:53:05 +00:00
libexpat Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libfetch fetch(3): Add SOCKS5 support 2020-02-15 18:03:16 +00:00
libfigpar Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libgcc_eh Revert r353140: Re-add ALLOW_MIPS_SHARED_TEXTREL, sprinkle it around 2020-01-14 17:50:13 +00:00
libgcc_s Fix LLVM libunwnwind _Unwind_Backtrace symbol version for ARM. 2019-12-16 14:08:49 +00:00
libgeom Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libgpio Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libgssapi Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libiconv_modules libiconv: correct undefined behavior. 2018-07-08 23:22:04 +00:00
libifconfig Make libifconfig INTERNALLIB 2019-02-25 18:22:20 +00:00
libipsec Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libipt Update Intel Processor Trace decoder library. 2019-10-10 12:46:34 +00:00
libjail libjail: Handle an error from reallocarray() when trimming the buffer. 2020-01-07 21:44:27 +00:00
libkiconv pkgbase: Put a lot of binaries and lib in FreeBSD-runtime 2019-09-05 14:13:08 +00:00
libkvm Remove sparc64 files 2020-02-12 06:53:29 +00:00
libldns Update Makefile.depend files 2019-12-11 17:37:53 +00:00
liblzma Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libmagic MFV r357712: file 5.38. 2020-02-11 07:02:48 +00:00
libmd Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libmemstat libmemstat: Catch up with r357776. 2020-02-11 20:15:49 +00:00
libmilter Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libmp Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libmt Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libnetbsd Make timespecadd(3) and friends public 2018-07-30 15:46:40 +00:00
libnetgraph Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libngatm Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libnv Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libomp Move all sources from the llvm project into contrib/llvm-project. 2019-12-20 19:53:05 +00:00
libopenbsd Allow bootstrapping libopenbsd on Linux 2018-12-05 10:58:02 +00:00
libopencsd Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libopie Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libpam Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libpathconv
libpcap MFV r353141 (by phillip): 2019-12-21 21:01:03 +00:00
libpe
libpjdlog pkgbase: Create a FreeBSD-utilities package and make it the default one 2019-09-05 14:15:47 +00:00
libpmc pmc: Add Hygon Dhyana support. 2020-02-07 22:28:04 +00:00
libpmcstat pmc(3)/hwpmc(4): update supported Intel processors to rely fully on the 2018-05-26 19:29:19 +00:00
libproc Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libprocstat procstat: read lo_name instead of now removed v_tag 2020-01-07 05:33:33 +00:00
libradius libradius: Rip out dubious use of srandomdev(3)+random(3) 2019-12-13 04:55:17 +00:00
libregex Further normalize copyright notices 2019-09-26 16:19:22 +00:00
librpcsec_gss lib: further adoption of SPDX licensing ID tags. 2017-11-26 02:00:33 +00:00
librpcsvc Update Makefile.depend files 2019-12-11 17:37:53 +00:00
librss Update Makefile.depend files 2019-12-11 17:37:53 +00:00
librt pkgbase: Create a FreeBSD-utilities package and make it the default one 2019-09-05 14:15:47 +00:00
librtld_db Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libsbuf Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libsdp Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libsecureboot Avoid unused vars when VE_ECDSA_HASH_AGAIN undefined 2019-12-20 21:56:28 +00:00
libsm
libsmb Move nsmb.conf to lib/libsmb/ 2018-09-20 09:31:27 +00:00
libsmdb
libsmutil
libsqlite3 Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libssp libssp: fix FORTIFY_SOURCE stub declarations 2020-01-04 22:05:00 +00:00
libssp_nonshared Provide libssp based on libc 2020-01-04 20:19:25 +00:00
libstats Make use of the stats(3) framework in the TCP stack. 2019-12-02 20:58:04 +00:00
libstdbuf lib: further adoption of SPDX licensing ID tags. 2017-11-26 02:00:33 +00:00
libstdthreads Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libsysdecode Update libssp paths in various Makefile.depend* files 2020-01-06 18:15:55 +00:00
libtacplus libtacplus: Remove bogus srandomdev+random 2019-12-13 05:11:34 +00:00
libtelnet
libthr Return success, instead of ESRCH, from pthread_cancel(3) applied to the 2020-02-13 23:22:12 +00:00
libthread_db Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libucl Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libufs Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libugidfw Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libulog Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libunbound Unbound's config.h is manually maintained, using a ./configure produced 2020-01-13 06:55:31 +00:00
libusb Add missing mutex unlock in failure case. 2020-01-30 17:30:04 +00:00
libusbhid Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libutil login.conf(5): split MAIL env var out into a "mail" capability 2020-02-05 04:17:14 +00:00
libveriexec Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libvgl Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libvmmapi Forgotten to remove the previous if statement in commit r355838. 2019-12-17 01:37:02 +00:00
libwrap Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libxo Import libxo-1.4.0: 2020-01-25 21:16:45 +00:00
liby liby: rewrite yyerror.h 2018-06-17 18:05:27 +00:00
libypclnt Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libz Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libzstd Update Makefile.depend files 2019-12-11 17:37:53 +00:00
msun [PowerPC] Fix feholdexcept() on powerpc referencing the wrong struct member 2020-02-02 19:16:52 +00:00
ncurses Update Makefile.depend files 2019-12-11 17:37:53 +00:00
ofed Update Makefile.depend files 2019-12-11 17:37:53 +00:00
tests
Makefile Remove excluding libproc and librtld_db on sparc64. 2020-02-12 06:54:28 +00:00
Makefile.inc