GithubHelp home page GithubHelp logo

http_rtunnel's Introduction

http_rtunnel

http反向隧道中间件,类似ssh反向隧道,但ssh反向隧道,一个隧道就要占用一个服务器端口,在同时需要大量隧道的情况下不合适, 此中间件服务器占用2个端口(http/https)。

原理:
1 当客户端启动后,初始化请求连接消息,消息中包含JR-SID头来标识隧道,建立与服务器的长连接,隧道建立
2 服务器接收到http请求后,如果请求头中包含JR-SID字段,查找匹配的隧道,并向此隧道转发http请求
3 客户端收到请求后转发到设置的http端口,等待响应
4 客户端收到响应后,回转服务器
5 服务器返回http响应

限制:
1 只适用于http/https1.1协议
2 通过在http头中加一个JR-SID字段来区分不同隧道

包含:
1 http反向隧道服务端
2 http/https反向隧道客户端类
3 http/https反向隧道压力测试客户端

特点:
1 基于asio无栈协程
2 反向隧道客户端类支持自动重连
3 反向隧道客户端支持可选验证证书合法性,可部署私有ssl证书
4 隧道支持并发http请求,一个隧道可同时传输多个http请求
5 中间件服务端支持http请求超时
6 隧道可选ssl加密

构建命令
cmake -S . -B build
cmake --build build -j 1 -v

http_rtunnel's People

Contributors

jxfwinter avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.