Code Monkey home page Code Monkey logo

rust-miniproxy's Introduction

miniproxy

1.39 stable终于发布啦!

使用Rust 1.39.0实现的简易代理,同时支持HTTP,HTTPS和SOCKS5协议。本项目仅用于学习交流。

如何编译

首先安装Rust,如何安装请移步官网 注意由于需要使用async/await,所以需要指定rust版本为1.39(stable)

cargo build --release

默认开启TCP加速,使用gkd-rs提供加速功能。 可在编译时使用--no-default-features关闭加速功能。

二进制文件会在项目目录的target/release文件夹下,找到两个名为minilocalminiserver的二进制文件即可。关于如何交叉编译,请自行搜索。不过我自己在macbook上交叉编译就没成功过。

如何使用

本代理分为两部分:minilocalminiserverminiserver运行于网络服务器上,minilocal运行于本地。

a. 先在服务器上部署miniserver,启动的时候会随机产生一个base64编码的密码

RUST_LOG=mini=info ./miniserver -h 0.0.0.0 -p 59999 -d

b. 然后在本地启动minilocal,需要指定server的通讯密码

RUST_LOG=mini=info ./minilocal -s "xxx.xx.xx.xx:59999" -p 9998 -P xxxxxx

c. 进行系统代理设定,代理地址为127.0.0.0:9998,或者也可以设置自动代理,PAC文件地址为http://127.0.0.1:9998/pac。本代理同时支持HTTP,HTTPS和SOCKS5协议

原理及教程

尚在编写中,文档可见docs

rust-miniproxy's People

Contributors

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