psocks/README.md
2026-03-22 12:43:37 +02:00

41 lines
No EOL
1.2 KiB
Markdown

# psocks
Experimental async SOCKS5 (TCP/UDP) proxy server based on [fast-socks5](https://github.com/dizda/fast-socks5/blob/master/examples/server.rs), featuring allowlist access control (drop everything but allowed by user) with JSON/API based on [Rocket](https://rocket.rs) framework.
## Roadmap
* [x] Web JSON/API
* [x] Block stats
* [x] In-memory list update (without server restart)
* [x] Persist changes option (see `-c`, `--cache`)
* [ ] Web UI
* [ ] Performance optimization
## Usage
``` bash
RUST_LOG=psocks=trace cargo run -- -a=http://localhost/allow.txt \
-a=/path/to/allow.txt \
-c=/path/to/cache.txt \
no-auth
```
* set `socks5://127.0.0.1:1080` proxy in your application
* open http://127.0.0.1:8010 in browser for global stats:
* `/allow/domain.com` - add rule to the current session
* `/block/domain.com` - delete rule from the current session
### Allow list example
``` /path/to/allow.txt
# /path/to/allow.txt
// exact match
duckduckgo.com
// google.com with subdomains
.google.com
// IP resolved
1.2.3.4
```
* see also: [my personal asset](https://codeberg.org/postscriptum/psocks-list)