Giter Site home page Giter Site logo

zerochl / httpproxy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sakeven/httpproxy

0.0 1.0 0.0 122 KB

基于 Golang 开发,支持 http/1.1 以上版本的 HTTP 代理。(Why not see see Mika?)

License: GNU General Public License v2.0

Go 61.62% Roff 0.78% CSS 7.20% JavaScript 12.04% Smarty 18.35%

httpproxy's Introduction

httpproxy

  • 基于golang开发,支持http/1.1以上版本的http代理。

细节功能:

  • 支持内容缓存和重校验
  • 支持GET\POST\CONNECT等方法
  • 支持账号登入与验证
  • 支持配置文件
  • 提供web版管理和调试界面
  • 支持反向代理

正在进行中

  • 资源限定(各种超时,最大文件大小,最大缓存大小,最大头大小等,最大并发量,最大请求速度,最大传输速度等)

配置

配置文件在config目录,采用json格式,包含

  • port:代理服务器工作端口
  • webport:代理服务器web管理端口
  • reverse:设置反向代理,值为true或者false
  • proxy_pass:反向代理目标服务器地址,如"127.0.0.1:80"
  • auth:开启代理认证,值为true或者false
  • cache:开启缓存,值为true或者false
  • cache_timeout:缓存更新时间,单位分钟
  • log:值为1时输出Debug调试信息,为0时输出普通监控信息
  • gfwlist:网站屏蔽列表,如["baidu.com","google.com"]
  • admin:web管理用户
  • user:代理服务器普通用户

一个简单配置演示如下

{
    "port":":8080",
    "webport":":6060",
    "reverse":true,
    "proxy_pass":"127.0.0.1:80",
    "auth":true,
    "cache":false,
    "cache_timeout":30,
    "log":1,
    "gfwlist":["baidu.com","google.com"],
    "admin":{"Admin":"prxy"},
    "user":{"proxy":"proxy"}
}


/*this is a configure for proxy server. log: 1 for Information, 0 for DebugInfor*/

Build

  • 在$GOPATH/src目录

      $ git clone git://code.csdn.net/sakeven/httpproxy.git
    
  • 安装go-logging

      $ go get github.com/op/go-logging
    
  • 打开$GOPATH/src/httpproxy目录,并编译

      $ cd $GOPATH/src/httpporxy
      $ go build
    
  • 运行

      $ ./httpproxy
    

Bug

Contact with the author [email protected]

httpproxy's People

Contributors

sakeven avatar

Watchers

 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.