Coder Social home page Coder Social logo

qw2283345 / httpproxy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yryz/httpproxy

0.0 1.0 0.0 11 KB

一个轻量级HTTP代理,支持shadowsocks服务,方便命令行、开发环境使用。

License: Apache License 2.0

Shell 10.93% Go 89.07%

httpproxy's Introduction

Build Status

使用Golang实现的HTTP代理转shadowsocks,主要为命令行下go getdocker pullnpm installpip installgem installcurl等程序提供HTTP代理服务,解决安装总是失败的问题。这些服务不支持shadowsocks,但对http代理都有支持。

原理

应用 <-------HTTP/1.1-------> httpproxy <-------加密-------> 你的shadowsocks服务器

使用

安装

go get github.com/yryz/httpproxy

或者

curl -L https://github.com/yryz/httpproxy/releases/download/v1.1/httpproxy-linux64.tar.gz | tar -xz -C /usr/local/bin

配置文件 ~/.httpproxy/config.json(这里是默认配置,也可以通过 httpproxy -c config.json 来指定)

{
        "listen": "127.0.0.1:6666",
        "ss_server": "ip:port",
        "ss_cipher": "aes-128-cfb",
        "ss_password": "your password"
}

启动 httpproxy

使用代理

如果想命令行一直走代理,下面配置加入到 ~/.bash_profile

http_proxy=http://127.0.0.1:6666
https_proxy=http://127.0.0.1:6666

如果只是想临时使用,可以手动设置http_proxy环境变量或者 使用httpproxy set 快速就地设置(不影响全局,推荐!)。 推荐方式二:修改~/.bash_profile设置别名alias proxy="http_proxy=http://127.0.0.1:6666",使用时可以 proxy curl ip.cn

特点

  • 支持与shadowsocks服务桥接
  • 支持CONNECT,支持HTTPS、HTTP2代理
  • 简单易用、命令行友好

TODO

  • 抓包分析、支持HTTPS
  • 支持代理开关,不用每次手动设置代理地址
  • 支持自定义白名单
  • 增加私有IP、主机的过滤
  • 增加授权机制:用户名验证或IP白名单

httpproxy's People

Contributors

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