Giter Club home page Giter Club logo

erlang-proxy's Introduction

Socks5 proxy written in Erlang

Intro

This project can take you through a Firewall via Socks5 proxy.

Features

with the great erlang, the project has the following features:

  • Robustness. never down.

  • Scalable. handle thousands requests at the same time easily.

  • Fast.

  • Lightweight. only needs at most 30MB memories.

Running status

In my daily use,

  • When server is idle, It only takes about 10MB memories.

  • Play a youtube 1080P video, and load some other websites at the same time, It only takes 20MB ~ 30MB memories.

    Below is the system status when play a youtube 1080P video. Notice the beam.smp process below of mysqld.

    Linode 4 cpus, 512 RAM VPS.

    system status

Illustrate

+-----------+            +--------------+   encrypt
| local app |  <=======> | proxy client |  <#######
+-----------+   decrypt  +--------------+         #
                                                  #
                                                  #
                                                  # encrypted data
                                                  #
                                                  #
+-------------+            +--------------+       #
| target host |  <=======> | proxy server |  <#####
+-------------+   decrypt  +--------------+  encrypt
  1. proxy client is running at your local computer.

    It receive your app (like browser) request, encrypt the data, send to proxy server

  2. proxy server receive the request from proxy client, decrypt it, and sent to the target host.

  3. proxy server got the response from target host, and encrypt response, send back to proxy client.

  4. proxy client decrypt response received from proxy server, and send to local app.

  5. the circle done.

Usage

Server side

  1. git clone https://github.com/yueyoum/make-proxy.git or directly download.

  2. cp src/config.hrl.example src/config.hrl

    You need to define the REMOTEIP and REMOTEPORT.

    REMOTEPORT is which port proxy_server will listen on.

  3. ./start_server.sh or ./start_server.sh -d will run the server in backend.

Local side

  1. same as the Server side, checkout the code, and do the difinition AS SAME AS the server side

  2. ./start_client.sh

Now, you can set your apps (e.g. Browser) Using socks5 proxy.

IP = 127.0.0.1

PORT = 7070 (if not changed in the src/config.hrl)

TODO

  1. change the encrypt/decrypt method, now is just every byte do bxor with 2#01111001

erlang-proxy's People

Contributors

andelf avatar yueyoum avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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