From 6bb9dc42a18b21364e7a86cbedc7e01c93791130 Mon Sep 17 00:00:00 2001 From: Rongrong Date: Mon, 28 Oct 2024 00:46:46 +0800 Subject: [PATCH] chore(env): include repo link in the default UA Signed-off-by: Rongrong --- .env.sample | 2 +- docker-compose.yml.sample | 2 +- docs/advanced-settings.md | 28 ++++++++++++++-------------- src/env.py | 2 +- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.env.sample b/.env.sample index 9622d52b59..6a092733bc 100644 --- a/.env.sample +++ b/.env.sample @@ -25,7 +25,7 @@ TELEGRAPH_TOKEN=" #API_HASH=452b0359b988148995f22ff0f4229750 # get it from https://core.telegram.org/api/obtaining_api_id #IMG_RELAY_SERVER=https://wsrv.nl/?url= # default: https://rsstt-img-relay.rongrong.workers.dev/ #IMAGES_WESERV_NL=https://t0.nl/ # default: https://wsrv.nl/ -#USER_AGENT=Mozilla/5.0 (Android 12; Mobile; rv:68.0) Gecko/68.0 Firefox/96.0 # default: RSStT/2.x RSS Reader +#USER_AGENT=Mozilla/5.0 # default: RSStT/* RSS Reader (+https://git.io/RSStT) #IPV6_PRIOR=1 # default: 0 #VERIFY_TLS=0 # default: 1 #T_PROXY=socks5://172.17.0.1:1080 # Proxy used to connect to the Telegram API diff --git a/docker-compose.yml.sample b/docker-compose.yml.sample index e8a3dfff56..17e6912ee3 100644 --- a/docker-compose.yml.sample +++ b/docker-compose.yml.sample @@ -35,7 +35,7 @@ services: #- API_HASH=452b0359b988148995f22ff0f4229750 # get it from https://core.telegram.org/api/obtaining_api_id #- IMG_RELAY_SERVER=https://wsrv.nl/?url= # default: https://rsstt-img-relay.rongrong.workers.dev/ #- IMAGES_WESERV_NL=https://t0.nl/ # default: https://wsrv.nl/ - #- USER_AGENT=Mozilla/5.0 (Android 12; Mobile; rv:68.0) Gecko/68.0 Firefox/96.0 # default: RSStT/2.x RSS Reader + #- USER_AGENT=Mozilla/5.0 # default: RSStT/* RSS Reader (+https://git.io/RSStT) #- IPV6_PRIOR=1 # default: 0 #- VERIFY_TLS=0 # default: 1 #- T_PROXY=socks5://172.17.0.1:1080 # Proxy used to connect to the Telegram API diff --git a/docs/advanced-settings.md b/docs/advanced-settings.md index 63531223ef..cd255a5b4b 100644 --- a/docs/advanced-settings.md +++ b/docs/advanced-settings.md @@ -27,20 +27,20 @@ ### Network settings -| Key | Description | Example | Default | -|-----------------------------|-------------------------------------------------------|--------------------------------|-----------------------------| -| `T_PROXY` | Proxy used to connect to the Telegram API [^3] | `socks5://172.17.0.1:1080` | | -| `R_PROXY` | Proxy used to fetch feeds [^3] | `socks5://172.17.0.1:1080` | | -| `PROXY_BYPASS_PRIVATE` | Bypass proxy for private IPs or not? | `1` | `0` | -| `PROXY_BYPASS_DOMAINS` | Bypass proxy for listed domains | `example.com;example.net` [^1] | | -| `USER_AGENT` | User-Agent | `Mozilla/5.0` | `RSStT/$VERSION RSS Reader` | -| `IPV6_PRIOR` | Enforce fetching feeds over IPv6 firstly or not? [^4] | `1` | `0` | -| `VERIFY_TLS` | Verify TLS certificate or not? | `0` | `1` | -| `TRAFFIC_SAVING` | Enable network traffic saving mode or not? [^5] | `1` | `0` | -| `LAZY_MEDIA_VALIDATION` | Let Telegram DC to validate media or not? [^6] | `1` | `0` | -| `HTTP_TIMEOUT` | HTTP request timeout in seconds | `60` | `12` | -| `HTTP_CONCURRENCY` | HTTP request concurrency overall (0=unlimited) | `0` | `1024` | -| `HTTP_CONCURRENCY_PER_HOST` | HTTP request concurrency per host (0=unlimited) | `0` | `16` | +| Key | Description | Example | Default | +|-----------------------------|-------------------------------------------------------|--------------------------------|-----------------------------------------------------| +| `T_PROXY` | Proxy used to connect to the Telegram API [^3] | `socks5://172.17.0.1:1080` | | +| `R_PROXY` | Proxy used to fetch feeds [^3] | `socks5://172.17.0.1:1080` | | +| `PROXY_BYPASS_PRIVATE` | Bypass proxy for private IPs or not? | `1` | `0` | +| `PROXY_BYPASS_DOMAINS` | Bypass proxy for listed domains | `example.com;example.net` [^1] | | +| `USER_AGENT` | User-Agent | `Mozilla/5.0` | `RSStT/$VERSION RSS Reader (+https://git.io/RSStT)` | +| `IPV6_PRIOR` | Enforce fetching feeds over IPv6 firstly or not? [^4] | `1` | `0` | +| `VERIFY_TLS` | Verify TLS certificate or not? | `0` | `1` | +| `TRAFFIC_SAVING` | Enable network traffic saving mode or not? [^5] | `1` | `0` | +| `LAZY_MEDIA_VALIDATION` | Let Telegram DC to validate media or not? [^6] | `1` | `0` | +| `HTTP_TIMEOUT` | HTTP request timeout in seconds | `60` | `12` | +| `HTTP_CONCURRENCY` | HTTP request concurrency overall (0=unlimited) | `0` | `1024` | +| `HTTP_CONCURRENCY_PER_HOST` | HTTP request concurrency per host (0=unlimited) | `0` | `16` | ### Misc settings diff --git a/src/env.py b/src/env.py index 257185b646..dfcd3c8fa9 100644 --- a/src/env.py +++ b/src/env.py @@ -291,7 +291,7 @@ def __get_version(): PROXY_BYPASS_PRIVATE: Final = __bool_parser(os.environ.get('PROXY_BYPASS_PRIVATE')) PROXY_BYPASS_DOMAINS: Final = __list_parser(os.environ.get('PROXY_BYPASS_DOMAINS')) -USER_AGENT: Final = os.environ.get('USER_AGENT') or f'RSStT/{__version__} RSS Reader' +USER_AGENT: Final = os.environ.get('USER_AGENT') or f'RSStT/{__version__} RSS Reader (+https://git.io/RSStT)' IPV6_PRIOR: Final = __bool_parser(os.environ.get('IPV6_PRIOR')) VERIFY_TLS: Final = __bool_parser(os.environ.get('VERIFY_TLS'), default_value=True)