mirror of
https://github.com/karen07/openwrt-mesh-builder.git
synced 2026-10-19 07:23:32 +00:00
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:
parent
539c83bf9e
commit
0952173594
2 changed files with 3 additions and 3 deletions
|
|
@ -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 только если итоговый список изменился.
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue