• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

sakshamsharma/HTTP-Over-Protocol: HOP: A proxy server to enable arbitrary protoc ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

sakshamsharma/HTTP-Over-Protocol

开源软件地址:

https://github.com/sakshamsharma/HTTP-Over-Protocol

开源编程语言:

C++ 97.0%

开源软件介绍:

HTTP-Over-Protocol (HOP)

  _   _  ___  ____  
 | | | |/ _ \|  _ \
 | |_| | | | | |_) |
 |  _  | |_| |  __/
 |_| |_|\___/|_|

NOTE Have a look at go-hop for an under-development version in Golang.

Introduction

A friend once told me that his university has an HTTP(S)-only proxy, and thus he is unable to SSH to hosts outside. 5 hours of intensive coding later using code borrowed from my course assignment, here's HOP.

HOP is a tool meant to tunnel any sort of traffic over a standard HTTP channel.

Useful for scenarios where there's a proxy filtering all traffic except standard HTTP(S) traffic. Unlike other tools which either require you to be behind a proxy which let's you pass arbitrary traffic (possibly after an initial CONNECT request), or tools which work only for SSH, this imposes no such restrictions.

Working

Assuming you want to use SSH to connect to a remote machine where you don't have root privileges.

There will be 7 entities:

  1. Client (Your computer, behind the proxy)
  2. Proxy (Evil)
  3. Target Server (The remote machine you want to SSH to, from Client)
  4. Client HOP process
  5. Target HOP process
  6. Client SSH process
  7. Target SSH process

If there was no proxy, the communication would be something like:

Client -> Client SSH process -> Target Server -> Target SSH process

In this scenario, here's the proposed method:

Client -> Client SSH process -> Client HOP process -> Proxy -> Target HOP process -> Target SSH process -> Target Server

HOP simply wraps all the data in HTTP packets, and buffers them accordingly.

Another even more complicated scenario would be if you have an external utility server, and need to access another server's resources from behind a proxy. In this case, hop will still run on your external server, but instead of using localhost in the second command (Usage section), use the hostname of the target machine which has the host.

Usage

On the client machine:

./hop <client-hop-port> <server-host-name> <server-hop-port>

On the target machine:

./hop <server-hop-port> localhost <target-port> SERVER

(Note the keyword SERVER at the end)

In case of SSH, the target-port would be 22. Now once these 2 are running, to SSH you would run the following:

ssh <target-machine-username>@localhost -p <client-hop-port>

Note: The keyword server tells hop which side of the connection has to be over HTTP.

Contributing

Pull Requests are more than welcome!


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap