{"id":75,"date":"2014-04-20T15:08:55","date_gmt":"2014-04-20T14:08:55","guid":{"rendered":"http:\/\/code.sualdea.com\/?p=75"},"modified":"2014-11-03T19:41:43","modified_gmt":"2014-11-03T18:41:43","slug":"httptunnel","status":"publish","type":"post","link":"https:\/\/code.sualdea.com\/?p=75","title":{"rendered":"httptunnel"},"content":{"rendered":"<h1>What is it<\/h1>\n<p>It creates tunnels using http protocol. It is useful to bypass restrictive firewalls or proxies. It uses two techniques, the well known <a href=\"http:\/\/en.wikipedia.org\/wiki\/HTTP_tunnel\">CONNECT technique<\/a> as well as a <a href=\"http:\/\/en.wikipedia.org\/wiki\/BOSH\">BOSH<\/a>-like implementation. It bypass most firewalls (as requests are valid HTTP requests)\u00a0 and proxies in their most secure configurations.<\/p>\n<h1>How to run<\/h1>\n<p>To create a tunnel a user can run httptunnel_server at server where tunnelized service is started and httptunnel_client where the client of the service is used. The client must connect to port where httptunnel_client is started in order to use a tunnelized connection.<\/p>\n<p>[cc lang=&#8221;bash]httptunnel_client -port <local_port> -http_host <http_host> -http_port <http_port> [-proxy_host <proxy_host> -proxy_port <proxy_port>] [-proxy_user  <proxy_user> -proxy_pass <proxy_pass>]<br \/>\n[\/cc]<\/p>\n<p><strong>port<\/strong>: where the httptunnel client will listen for tunnelled connections<br \/>\n<strong>http_host: <\/strong>the hostname or ip where httptunnel_tunnel is running<br \/>\n<strong>http_port: <\/strong>the port where httptunnel_tunnel is running<br \/>\n<strong>proxy_host: <\/strong>the proxy host in case of necessary<br \/>\n<strong>proxy_port:<\/strong> the proxy port in case of necessary<br \/>\n<strong>proxy_user:<\/strong>\u00a0 the proxy username in case of proxy authentication<br \/>\n<strong>proxy_pass:<\/strong> the proxy password in case of proxy authentication<\/p>\n<p>[cc lang=&#8221;bash]httptunnel_server -http_port <http_port> -client_port <client_port> -client_host <client_host>[\/cc]<\/p>\n<p><strong>http_port:<\/strong> the port where httptunnel_server listens<br \/>\n<strong>client_port:<\/strong> the port where destination service is bound<br \/>\n<strong>client_host:<\/strong> the hostname or ip where destination service is running<\/p>\n<h2>Example:<strong> Tunnel a ssh connection<\/strong><\/h2>\n<p>Configuration at host (server.com):<br \/>\n<code>httptunnel_server -http_port 80 -client_port 22 -client_host 127.0.0.1<\/code><\/p>\n<p>Configuration at client:<br \/>\n<code>httptunnel_client -port 22 -http_host server.com -http_port 80 -proxy_host proxy.mynet.com -proxy_port 3128<\/code><\/p>\n<p>&#8211; to start a ssh connection will run at client:<br \/>\n<code>ssh 127.0.0.1<\/code><\/p>\n<p>which will start a tunneled ssh connection at server.com<\/p>\n<h1>Build<\/h1>\n<p>At this moment only windows compile system is provided (VS2008) but linux\/unix<br \/>\ncompile system will be available soon.<\/p>\n<h2>Windows<\/h2>\n<p>A solution &#8216;httptunnel.sln&#8217; is provided.<br \/>\n<a href=\"http:\/\/pocoproject.org\/\">Portable Components C++ library<\/a> is a prerequisite.<br \/>\nIt must be installed at same directory where httptunel is located in and it must be named as &#8216;poco&#8217;.<br \/>\n|<br \/>\n+ &#8211; httptunnel<br \/>\n+ &#8211; poco<\/p>\n<h1>Download<\/h1>\n<p><a href=\"https:\/\/sourceforge.net\/projects\/diggertunnel\/\">http:\/\/diggertunnel.sourceforge.net\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>What is it It creates tunnels using http protocol. It is useful to bypass restrictive firewalls or proxies. It uses two techniques, the well known CONNECT technique as well as a BOSH-like implementation. It bypass most firewalls (as requests are valid HTTP requests)\u00a0 and proxies in their most secure configurations. How to run To create &hellip; <a href=\"https:\/\/code.sualdea.com\/?p=75\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">httptunnel<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[7,10,6,9,5],"class_list":["post-75","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-c","tag-http","tag-linux","tag-tunnel","tag-windows"],"_links":{"self":[{"href":"https:\/\/code.sualdea.com\/index.php?rest_route=\/wp\/v2\/posts\/75","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/code.sualdea.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/code.sualdea.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/code.sualdea.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/code.sualdea.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=75"}],"version-history":[{"count":15,"href":"https:\/\/code.sualdea.com\/index.php?rest_route=\/wp\/v2\/posts\/75\/revisions"}],"predecessor-version":[{"id":141,"href":"https:\/\/code.sualdea.com\/index.php?rest_route=\/wp\/v2\/posts\/75\/revisions\/141"}],"wp:attachment":[{"href":"https:\/\/code.sualdea.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=75"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/code.sualdea.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=75"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/code.sualdea.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=75"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}