Socks proxy support for OpenVPN 1.5.0
Hi,
I have added support for Socks5 proxies to OpenVPN 1.5.0. It should work for TCP and UDP client modes (but I have only tested it in UDP client mode yet, because that's what I plan to use).
I hope you find the patch useful and can integrate it in an upcoming OpenVPN release.
bye, Christof
Signature · 2 lines
http://cmeerw.org JID: [email protected]... mailto cmeerw at web.de
Quoted 3 lines · Christof Meerwald
I have added support for Socks5 proxies to OpenVPN 1.5.0. It should work for TCP and UDP client modes (but I have only tested it in UDP client mode yet, because that's what I plan to use).
I have now also tested the Socks support in TCP client mode and it seems to work, but I have discovered a problem in the Socks support for UDP.
UDP packets might be truncated because the Socks server adds a 10-byte header to them - here is a patch (against 1.6 beta5) to fix it.
bye, Christof
Signature · 2 lines
http://cmeerw.org JID: [email protected]... mailto cmeerw at web.de
Quoted 6 lines · Christof Meerwald
Quoted 3 lines · Christof Meerwald
I have added support for Socks5 proxies to OpenVPN 1.5.0. It should work for TCP and UDP client modes (but I have only tested it in UDP client mode yet, because that's what I plan to use).
UDP packets might be truncated because the Socks server adds a 10-byte header to them - here is a patch (against 1.6 beta5) to fix it.
And here is the fix for the Win32 version:
socket.c +3 -0
@@ -1364,6 +1364,9 @@ wsabuf[0 ].len = maxsize ? maxsize :BLEN (&sock->reads.buf);ASSERT (wsabuf[0 ].len <=BLEN (&sock->reads.buf)); +if (sock->proto == PROTO_UDPv4 && sock->socks_proxy) + wsabuf[0 ].len +=10 ; +/* the overlapped read will signal this event on I/O completion */ ASSERT (ResetEvent (sock->reads.overlapped.hEvent)); sock->reads.flags =0 ;
bye, Christof
Signature · 2 lines
http://cmeerw.org JID: [email protected]... mailto cmeerw at web.de
Christof,
Thanks for the patch.
I've merged it in 1.6-beta5, though I haven't tested it yet.
James
Quoted 16 lines · Christof Meerwald
Hi,
I have added support for Socks5 proxies to OpenVPN 1.5.0. It should work for TCP and UDP client modes (but I have only tested it in UDP client mode yet, because that's what I plan to use).
I hope you find the patch useful and can integrate it in an upcoming OpenVPN release.
bye, Christof
Signature · 2 lines
http://cmeerw.org JID: [email protected]... mailto cmeerw at web.de