remove cache feature

This commit is contained in:
yggverse 2026-03-27 11:24:32 +02:00
parent c821fa7492
commit bbf7e73f11
5 changed files with 17 additions and 158 deletions

View file

@ -18,15 +18,13 @@ Filtering asynchronous SOCKS5 (TCP/UDP) proxy server based on [fast-socks5](http
``` bash
RUST_LOG=trace cargo run -- --allow=http://localhost/allow.txt \
--allow=/path/to/allow.txt \
--cache=/path/to/cache.txt \
no-auth
```
* set `socks5://127.0.0.1:1080` proxy in your application
* use http://127.0.0.1:8010 for API:
* `/api/allow/{domain.com}` - add rule to the current session (and `--cache` if defined)
* `/api/block/{domain.com}` - delete rule from the current session (and `--cache` if defined)
* `/api/allow/{domain.com}` - add rule to the current session
* `/api/block/{domain.com}` - delete rule from the current session
* `/api/rules` - return active rules (from server memory)
* `/api/cache/clean` - clean the `--cache` file (returns deleted rules or `null` if not enabled)
### Allow list example
@ -69,8 +67,7 @@ Group=psocks
WorkingDirectory=/var/lib/psocks
ExecStart=/usr/local/bin/psocks \
-a=https://codeberg.org/postscriptum/psocks-list/raw/branch/main/allow/internet.txt \
-c=/var/lib/psocks/cache.txt \
-a=http://localhost/allow.txt \
no-auth
Restart=always