/ README.md
README.md
1 # Pxls IPv6 Proxy 2 3 <sub>(better name pending)</sub> 4 5 ## About the project 6 7 This is a reverse proxy that redirects incoming requests to a given upstream through a given IPv6 subnet. 8 The outgoing local IP address is bound according to a hash of the incoming remote IP address. 9 This allows all clients to have a stable, unique outgoing IP address within the IPv6 prefix. 10 The hash is truncated to match the prefix, so the prefix must be large enough to avoid hash collisions. 11 12 No guarantees of stability are made, breaking changes may be made at any time. 13 14 ## Getting started 15 16 ### Prerequisites 17 18 - Linux 19 - Rust & Cargo (latest stable) 20 - OpenSSL 21 22 ### Build 23 24 ```bash 25 cargo build --release 26 ``` 27 28 ### Usage 29 You first need a local Any-IP route for a sufficiently large IPv6 prefix. 30 31 ```bash 32 ip route add local 2001:db8::/32 dev lo 33 34 ``` 35 36 You can then run the proxy with your prefix and a target upstream to connect to. 37 38 > [!IMPORTANT] 39 > The proxy trusts the `X-Forwarded-For` header by default. 40 > You very likely want to run another reverse proxy in front of this. 41 42 ```bash 43 pxls-proxy --src-prefix 2001:db8::/32 --target-name pxls.space --target-port 443 --target-tls true 44 ```