From ce13580bd4be5d14b949c3b4bf4cb7714b8a3f4b Mon Sep 17 00:00:00 2001 From: nex Date: Sat, 24 Feb 2024 15:20:22 +0000 Subject: [PATCH] Add SOCKS support --- README.md | 3 ++- requirements.txt | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ed87233..b1ecbb6 100644 --- a/README.md +++ b/README.md @@ -38,4 +38,5 @@ volumes: | `PREVIEW_HOMESERVER` | The homeserver to use for the previews. | `https://matrix.nexy7574.co.uk` | The host name of the request URL. | | `PREVIEW_HOST` | The host IP/Name to listen to. | `192.168.0.2` | `0.0.0.0` | | `PREVIEW_PORT` | The port to listen to. | `8080` | `2226` | -| `FORWARDED_ALLOW_IPS` | The list of reverse proxy IPs to trust. See [Uvicorn docs](https://www.uvicorn.org/settings/#http) | `*` | `127.0.0.1` | +| `PREVIEW_PROXY` | A HTTP/HTTPS/SOCKS4/SOCKS5 proxy to use for all network requests. +| `FORWARDED_ALLOW_IPS` | The list of reverse proxy IPs to trust. See [Uvicorn docs](https://www.uvicorn.org/settings/#http) | * | `127.0.0.1` | diff --git a/requirements.txt b/requirements.txt index 916e3c1..42b5b14 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ rich~=13.7 uvicorn~=0.27 fastapi~=0.109 -httpx~=0.26 +httpx[socks]~=0.26 beautifulsoup4~=4.12 appdirs~=1.4