descriptionLwIP based SOCKS proxy for OpenConnect.
homepage URLhttp://dme.org/ocproxy
ownerdme@dme.org
last changeThu, 22 May 2014 11:07:34 +0000 (22 12:07 +0100)
content tags
add:
README
ocproxy is a user-level SOCKS and port forwarding proxy for OpenConnect
based on lwIP.  When using ocproxy, OpenConnect only handles network
activity that the user specifically asks to proxy, so the VPN interface
no longer "hijacks" all network traffic on the host.

Commonly used options include:

  -D port                   Set up a SOCKS5 server on PORT
  -L lport:rhost:rport      Connections to localhost:LPORT will be redirected
                            over the VPN to RHOST:RPORT
  -g                        Allow non-local clients.
  -k interval               Send TCP keepalive every INTERVAL seconds, to
                            prevent connection timeouts


Dependencies:

libevent >= 2.0 - *.so library and headers


Building:

cd contrib/ports/unix/proj/ocproxy
make


Sample usage:

openconnect --script-tun --script \
    "./ocproxy -L 2222:unix-host:22 -L 3389:win-host:3389 -D 11080" \
    vpn.example.com

ssh -p2222 localhost
rdesktop localhost
socksify ssh unix-host
tsocks ssh 172.16.1.2
...

OpenConnect can (and should) be run as a non-root user when using ocproxy.


Sample tsocks.conf (no DNS):

server = 127.0.0.1
server_type = 5
server_port = 11080


Sample socks.conf for Dante (DNS lookups via SOCKS5 "DOMAIN" addresses):

resolveprotocol: fake
route {
        from: 0.0.0.0/0 to: 0.0.0.0/0 via: 127.0.0.1 port = 11080
        command: connect
        proxyprotocol: socks_v5
}


FoxyProxy can be used to tunnel Firefox browsing through the SOCKS5 server.
This will send DNS queries through the VPN connection, and unqualified
hostnames (e.g. http://intranet/) should work.


dme@dme.org, 2012-11-14
shortlog
2014-05-22 David EdmondsonMakefile: Always link with libpthread.master
2012-11-26 David Edmondsonocproxy: Remove unnecessary LWIP components.
2012-11-26 David Edmondsonocproxy/Makefile: Cleanup.
2012-11-26 David EdmondsonMakefile: Use $(MAKE) rather than make.
2012-11-26 David EdmondsonMakefile: Add a rule to build TAGS.
2012-11-26 Kevin CernekeeMinor Makefile cleanups; install man page during "make...
2012-11-26 Kevin CernekeeSimplify the code that binds to the local SOCKS port
2012-11-26 Kevin CernekeeBind local ports after all command line options have...
2012-11-26 Kevin CernekeeAdd more details to man page
2012-11-26 Kevin CernekeeCopy man page over from ocproxy-debian.git
2012-11-26 Kevin CernekeeBump up MAX_IOVEC to 64
2012-11-26 Kevin CernekeeDon't croak if the lwIP TCP queue gets too long
2012-11-26 Kevin CernekeeREADME: Add note on Firefox / FoxyProxy
2012-11-26 Kevin CernekeeDNS: Try FQDN if initial lookup fails
2012-11-26 Kevin CernekeeBump MAX_CONN to 128
2012-11-26 Kevin CernekeeUse an enum for the connection state constants
...
tags
11 years ago 1.20121120160713
heads
9 years ago master