Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/banyc/proxy
A client defined dynamic forward proxy chain. Client or Access Server <=> n Proxy Servers <=> Origin Server
https://github.com/banyc/proxy
forward-proxy http-tunnel layer4 privacy proxy tcp udp
Last synced: about 1 month ago
JSON representation
A client defined dynamic forward proxy chain. Client or Access Server <=> n Proxy Servers <=> Origin Server
- Host: GitHub
- URL: https://github.com/banyc/proxy
- Owner: Banyc
- Created: 2023-03-13T14:59:00.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-05-19T12:09:07.000Z (8 months ago)
- Last Synced: 2024-05-19T13:28:55.167Z (8 months ago)
- Topics: forward-proxy, http-tunnel, layer4, privacy, proxy, tcp, udp
- Language: Rust
- Homepage:
- Size: 1.31 MB
- Stars: 11
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Proxy
## Architecture
![arch](img/arch.drawio.png)- 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](img/protocol.tcp.drawio.png)- 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
1. Each Proxy Server consumes the responsible request header and writes the response header to the stream
1. Proxy Client consumes all the response headers
1. 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.