Ben Schwartz ae4edfbf3e Implement optional support for SOCKS5-UDP
This change adds a new option, --socks5-udp.  If this option is
present, and no UDP gateway is specified, UDP packets will no
longer be dropped.  Instead, the client will use the SOCKS5
UDP ASSOCIATE command to route UDP packets through the proxy
server.

This implementation is intended for use with any UDP data, and it
includes an optimization for packets containing DNS queries.
However, this implementation is currently limited to localhost
SOCKS5 servers. SOCKS5-UDP does not perform well over actual
network links, as it requires several roundtrips to the server and
is not compatible with NAT.

This implementation is currently in use in a fork of tun2socks used
by Outline (https://getoutline.org) and Intra (https://getintra.org).

Fixes https://github.com/ambrop72/badvpn/issues/56
2020-02-01 15:02:11 -08:00
..
arp_proto.h convert some packed structs to use the macros from misc/packed.h 2012-12-31 01:03:52 +00:00
array_length.h misc: add array_length.h 2012-08-04 12:04:18 +00:00
ascii_utils.h ncd: modules: basic_functions: Add tolower, toupper. 2014-11-15 20:19:32 +01:00
balign.h switch to using the New BSD License 2012-01-27 13:24:37 +00:00
balloc.h misc/balloc.h: add BRealloc() 2012-10-31 18:29:09 +00:00
blimits.h switch to using the New BSD License 2012-01-27 13:24:37 +00:00
BRefTarget.h rename NCDRefTarget --> BRefTarget 2013-01-28 13:06:59 +00:00
bsize.h bsize.h: simplify 2012-11-29 02:41:29 +00:00
bsort.h switch to using the New BSD License 2012-01-27 13:24:37 +00:00
bstring.h switch to using the New BSD License 2012-01-27 13:24:37 +00:00
byteorder.h switch to using the New BSD License 2012-01-27 13:24:37 +00:00
cmdline.h Refactoring using MemRef. 2014-11-25 22:30:11 +01:00
compare.h misc/compare.h: add B_COMPARE2() macro 2013-03-15 02:40:25 +00:00
concat_strings.h Fix some MSVC build errors. 2013-08-30 16:43:52 +00:00
dead.h misc/dead.h: fix name conflicts with Android toolchain 2013-02-06 17:26:17 +00:00
debug.h misc/debug.h: add B_ASSERT_USE 2013-01-19 20:00:18 +00:00
debugcounter.h Fixes for Visual Studio 2017. 2018-12-30 15:51:55 +01:00
debugerror.h Fixes for Visual Studio 2017. 2018-12-30 15:51:55 +01:00
dhcp_proto.h convert some packed structs to use the macros from misc/packed.h 2012-12-31 01:03:52 +00:00
ethernet_proto.h port to compile with MSVC 2012-07-24 10:26:30 +00:00
exparray.h switch to using the New BSD License 2012-01-27 13:24:37 +00:00
expstring.h Refactoring using MemRef. 2014-11-26 00:23:24 +01:00
find_char.h misc: add find_char.h 2012-08-23 10:22:59 +00:00
find_program.h Fix some variable shadowing (no bugs). 2014-11-12 21:52:49 +01:00
get_iface_info.h misc/get_iface_info.h: fix incorrect error check 2013-03-18 20:45:25 +00:00
grow_array.h misc/grow_array.h: allow passing zero capacity to GrowArray_Init(). 2013-03-25 23:57:28 +00:00
hashfun.h misc/hashfun.h: add badvpn_djb2_hash_bin() 2012-10-09 19:47:55 +00:00
igmp_proto.h port to compile with MSVC 2012-07-24 10:26:30 +00:00
ipaddr6.h Refactoring using MemRef. 2014-11-26 19:15:26 +01:00
ipaddr.h Refactoring using MemRef. 2014-11-26 19:15:26 +01:00
ipv4_proto.h fix many potential aliasing issues 2012-12-30 03:20:36 +00:00
ipv6_proto.h tun2socks: IPv6 support. Includes updated lwIP version and udpgw program. 2013-04-22 16:16:03 +00:00
loggers_string.h switch to using the New BSD License 2012-01-27 13:24:37 +00:00
loglevel.h misc/loglevel.h: fix overflow 2012-08-12 15:26:21 +00:00
maxalign.h misc: add maxalign 2012-06-13 11:54:01 +00:00
memref.h Refactoring using MemRef. 2014-11-26 18:38:36 +01:00
merge.h misc: add merge.h 2012-05-30 21:42:13 +00:00
minmax.h switch to using the New BSD License 2012-01-27 13:24:37 +00:00
modadd.h switch to using the New BSD License 2012-01-27 13:24:37 +00:00
mswsock.h replace shipped custom mswsock.h with a good one from MinGW 2011-05-22 11:50:14 +00:00
nonblocking.h switch to using the New BSD License 2012-01-27 13:24:37 +00:00
nsskey.h Assume that NSS headers are under nss/. 2018-12-30 15:51:55 +01:00
offset.h misc/offset.h: in UPPER_OBJECT, cast to char * not to uint8_t * 2012-10-07 10:55:05 +00:00
open_standard_streams.h switch to using the New BSD License 2012-01-27 13:24:37 +00:00
overflow.h switch to using the New BSD License 2012-01-27 13:24:37 +00:00
packed.h Workaround issue with structure packing not working on gcc/windows. 2016-11-13 16:52:10 +01:00
parse_number.h Refactoring using MemRef. 2014-11-26 19:15:26 +01:00
print_macros.h Fixes for Visual Studio 2017. 2018-12-30 15:51:55 +01:00
read_file.h fix some pointer casts which are invalid in C++, to get compiling with MSVC working again 2013-01-23 00:21:35 +00:00
read_write_int.h fix some pointer casts which are invalid in C++, to get compiling with MSVC working again 2013-01-23 00:21:35 +00:00
socks_proto.h Implement optional support for SOCKS5-UDP 2020-02-01 15:02:11 -08:00
sslsocket.h switch to using the New BSD License 2012-01-27 13:24:37 +00:00
stdbuf_cmdline.h ncd/modules/net_backend_wpa_supplicant.c: Don't hardcode 2014-02-12 17:50:28 +00:00
strdup.h port to compile with MSVC 2012-07-24 10:26:30 +00:00
string_begins_with.h misc/string_begins_with.h: add data_begins_with_bin() 2012-11-09 15:18:52 +00:00
substring.h misc/substring.h: Refactor with MemRef. 2014-12-02 20:41:45 +01:00
udp_proto.h Fix bug UDP checksum calculation. 2017-03-12 12:02:02 +01:00
unicode_funcs.h switch to using the New BSD License 2012-01-27 13:24:37 +00:00
Utf8Decoder.h switch to using the New BSD License 2012-01-27 13:24:37 +00:00
Utf8Encoder.h switch to using the New BSD License 2012-01-27 13:24:37 +00:00
Utf16Decoder.h switch to using the New BSD License 2012-01-27 13:24:37 +00:00
Utf16Encoder.h switch to using the New BSD License 2012-01-27 13:24:37 +00:00
version.h version 1.999.130 2015-04-09 12:31:55 +02:00
write_file.h Refactoring using MemRef. 2014-11-26 22:15:56 +01:00