Increase download timeout and update direct ASN example

- Increase default download timeout from 5 to 15 minutes
- Apply the longer timeout to optional downloads as well
- Add Alibaba / AliExpress ASN45102 to the documented direct ASN list
This commit is contained in:
Karen Khachatryan 2026-09-28 23:12:34 +03:00
parent 539c83bf9e
commit 0952173594
2 changed files with 3 additions and 3 deletions

View file

@ -821,7 +821,7 @@ Direct lists собираются из нескольких источников
```sh
DIRECT_COUNTRIES='ru cn by'
DIRECT_ASNS='32590'
DIRECT_ASNS='32590 45102'
```
`update-ipsets.sh` читает `/etc/ipsets/direct-static.txt`, добавляет country/ASN lists, атомарно обновляет `/etc/ipsets/direct.txt` и перезагружает firewall только если итоговый список изменился.

View file

@ -28,7 +28,7 @@ def download_file(
url: str,
dst: Path,
*,
max_time: int = 300,
max_time: int = 900,
show_progress: bool = False,
) -> None:
tmp = dst.with_suffix(dst.suffix + ".tmp")
@ -54,7 +54,7 @@ def download_file(
tmp.replace(dst)
def try_download_file(url: str, dst: Path, *, max_time: int = 300) -> bool:
def try_download_file(url: str, dst: Path, *, max_time: int = 900) -> bool:
tmp = dst.with_suffix(dst.suffix + ".tmp")
tmp.unlink(missing_ok=True)
dst.parent.mkdir(parents=True, exist_ok=True)