Giter Club home page Giter Club logo

samplehttpproxy's Introduction

Introduce

计网课设,功能比较简单。

支持以下功能:

报文缓存:存储在当前路径的Cache下,会在目的服务的304情况下发送给客户端。

用户过滤:打开ipFilter.f文件,一行一个ip,会吞掉来自该ip的所有请求并拒绝发送。

网站过滤:打开hostFilter.f文件,一行一个host,访问该host,会让客户端转向一个静态网页

多线程:每一次与客户端建立连接时,添加一个任务线程,线程中会根据请求头是否为长连接而持续通信,否则仅来回一次。

Existing problems

1.有些时候会莫名其妙的被结束进程,但是命令行并没有core dump等提示。

2.访问某些可能同时又多个http请求的网页,如果数量很大很快,会导致SIGABRT中断。

3.访问一些以拥有缓存的网页,第一次访问大概率出现400,重新刷新访问即可。

Install

Download

git clone [email protected]:ConfuseL/SampleHttpProxy.git

Quick compile install

cd SampleHttpProxy/
make
make install

How to set proxy

windows

  1. 打开代理设置:

    Internet属性->连接->局域网设置->勾选为LAN使用代理服务器。

    输入使用该程序的公网ip以及端口16924。

linux

  1. 通过Super键(win键)打开搜索面板。
  2. 搜索代理或者proxy
  3. 进入网络设置
  4. 进入网络代理选项卡,设置为手动代理,设置ip和端口16924

How to use

在项目目录下运行可执行文件

./sampleHttpProxy 

执行ctrl+c可以关闭程序,以捕获终端信号,程序会在退出前关闭套接字。

samplehttpproxy's People

Contributors

confusel 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.