Skip to content

mjl-/httptun

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

# status

works in theory, but not that useful since _sending_ requests with
chunked bodies seems to be unimplemented by populair proxies...


# intro

tunnel a tcp connection through http.

the idea is to run a special httpd on a machine that has normal
internet access.  a http client will connect to that httpd, perhaps
from behind a firewall.  the client will make a POST request in
"chunked" transfer-encoding mode, a header "destination" indicates
the address the special httpd should connect the client to.  whenever
the clients tcp connection sends data, a chunk with that data is
sent over the chunked POST connection.  the remote server does the
same, so responds in "chunked" transfer-encoding.  keep-alive
messages are sent by both ends to make sure proxies do not think
the connections are idle and shut them down.  keep-alive messages
are 1-byte chunks (content ignored), for all other chunks the first
byte is the same as for a keep-alive message and must be ignored.

this scheme works when there is no proxy forwarding the http
request/response.  a chunked post seems legitimate when reading the
rfc.  however, it seems the proxies tested (squid, polipo, tinyproxy)
cannot handle chunked posts.  i see no reason why they shouldn't.


# download

get the latest version at:

	http://www.ueber.net/code/r/httptun


# install

first, make sure you have "web" installed, see
http://www.ueber.net/code/r/web.

make sure you have $ROOT set, then run "mk" to compile and
"mk install" to install the files.

when building from within inferno, insert SYSHOST=Inferno and ROOT=
in the mk invocations to override the values in the mkconfig.


# example

example usage:

on a server:
	listen -A net!*!8888 httpsrv.dis

on a client;
	mount -A {httpdial net!remoteserver!8888 net!remote!styx} /n/remote


# licence & author

this code is in the public domain, written by mechiel lukkien,
reachable at mechiel@ueber.net or mechiel@xs4all.nl.

About

http-based tunnel, limbo, from mercurial

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published