Chisel is a fast TCP/UDP tunnel, transported over HTTP, secured via SSH. Single executable including both client and server. Written in Go (golang). Chisel is mainly useful for passing through firewalls, though it can also be used to provide a secure endpoint into your network.
# listen on 80, forward to localhost:80./chiselclient{serverip}:9090R:80:127.0.0.1:80# listen on 3000, forward to 172.17.0.1:3000./chiselclient{serverip}:9090R:3000:172.17.0.1:3000# listen on 4242, forward to 172.17.0.1:3000./chiselclient{serverip}:9090R:4242:172.17.0.1:3000# create SOCKS5 listener on default port (1080), proxy through client./chiselclient{serverip}:9090R:socks
# ./chisel server --helpUsage:chiselserver [options]Options: [...]
Client
--help flag:
# ./chisel client --helpUsage:chiselclient [options] <server><remote> [remote] [remote] ...<server> istheURLtothechiselserver.<remote>sareremoteconnectionstunneledthroughtheserver,eachofwhichcomeintheform:<local-host>:<local-port>:<remote-host>:<remote-port>/<protocol>■local-hostdefaultsto0.0.0.0 (all interfaces).■local-portdefaultstoremote-port.■remote-portisrequired*.■remote-hostdefaultsto0.0.0.0 (server localhost).■protocoldefaultstotcp.whichshares<remote-host>:<remote-port>fromtheservertotheclientas<local-host>:<local-port>,or:R:<local-interface>:<local-port>:<remote-host>:<remote-port>/<protocol>whichdoesreverseportforwarding,sharing<remote-host>:<remote-port>fromtheclienttotheserver's <local-interface>:<local-port>. example remotes 3000 example.com:3000 3000:google.com:80 192.168.0.5:3000:google.com:80 socks 5000:socks R:2222:localhost:22 R:socks R:5000:socks stdio:example.com:22 1.1.1.1:53/udp When the chisel server has --socks5 enabled, remotes can specify "socks" in place of remote-host and remote-port. The default local host and port for a "socks" remote is 127.0.0.1:1080. Connections to this remote will terminate at the server'sinternalSOCKS5proxy.Whenthechiselserverhas--reverseenabled,remotescanbeprefixedwithRtodenotethattheyarereversed.Thatis,theserverwilllistenandacceptconnections,andtheywillbeproxiedthroughtheclientwhichspecifiedtheremote.Reverseremotesspecifying"R:socks"willlistenontheserver's default socks port (1080) and terminate the connection at the client'sinternalSOCKS5proxy.Whenstdioisusedaslocal-host,thetunnelwillconnectstandardinput/outputofthisprogramwiththeremote.ThisisusefulwhencombinedwithsshProxyCommand.Youcanusessh-oProxyCommand='chisel client chiselserver stdio:%h:%p' \[email protected]toconnecttoanSSHserverthroughthetunnel.Options: [...]