Code Monkey home page Code Monkey logo

proxy's Introduction

Proxy

Architecture

arch

  • Access Server:
    • as an access point, it:
      • implements TCP/UDP listeners, so that it can direct traffic from a process that does not understand the proxy protocol to the proxy
      • pre-defines the proxy chain, so that the downstream process does not need to know the proxy chain
  • Proxy Client:
    • as a start of the proxy chain, it:
      • implements the proxy protocol, so that it can direct traffic to the proxy
      • defines the proxy chain, so that the client user can dynamically change the proxy chain without re-configuring those proxies
  • Proxy Server:
    • as an traffic proxy, it:
      • is only responsible to a fragment of the stream (TCP) or a datagram (UDP), so that those responsibilities can be stacked and form a proxy chain

Protocol

TCP variant

protocol

  • Request header includes the address to the next hop, so that the Proxy Server can connect to the next hop on the fly
  • Response header includes the ok/error message from the proxy that creates this response
  • Steps to fill the stream:
    1. Proxy Client writes all the request headers to the stream
    2. Each Proxy Server consumes the responsible request header and writes the response header to the stream
    3. Proxy Client consumes all the response headers
    4. If no error, Proxy Client reads/writes the payload from/to the stream

UDP variant

Instead of directly operating a stream, UDP client treats each UDP datagram as a stream and follows the same steps as TCP variant.

proxy's People

Contributors

banyc avatar

Stargazers

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

Watchers

 avatar  avatar

Forkers

enp6 egida

proxy's Issues

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.