mirror of
https://github.com/Horizontal42/netsleuth.git
synced 2026-11-11 01:02:10 +03:00
keep fastcom probe working by default, just make the token overridable
This commit is contained in:
parent
9f1831005f
commit
d4228ab167
2 changed files with 1 additions and 3 deletions
|
|
@ -78,7 +78,7 @@ class Speedtest(BaseModel):
|
|||
upload_sizes_bytes: list[int] = Field(default_factory=lambda: [1_000_000, 5_000_000])
|
||||
cloudflare_base_url: str = "https://speed.cloudflare.com"
|
||||
fastcom_api_url: str = "https://api.fast.com/netflix/speedtest/v2"
|
||||
fastcom_api_token: str | None = None
|
||||
fastcom_api_token: str = "YXNkZmFzZGxmbnNkYWZoYXNkZmhrYWxm"
|
||||
ndt7_locate_url: str = "https://locate.measurementlab.net/v2/nearest/ndt/ndt7"
|
||||
bufferbloat_probe_interval_seconds: float = 0.2
|
||||
|
||||
|
|
|
|||
|
|
@ -174,8 +174,6 @@ async def tier_cloudflare(client: httpx.AsyncClient, cfg: Speedtest, timeout: fl
|
|||
|
||||
|
||||
async def tier_fastcom(client: httpx.AsyncClient, cfg: Speedtest, timeout: float) -> SpeedResult:
|
||||
if not cfg.fastcom_api_token:
|
||||
raise RuntimeError("Fast.com API token not configured")
|
||||
response = await client.get(
|
||||
cfg.fastcom_api_url,
|
||||
params={"https": "true", "token": cfg.fastcom_api_token, "urlCount": "3"},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue