Optionally show ISP info for private LAN clients using the server's public IP
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 72/100
- Issue 类型
- 功能
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- docker, php
- 领域
- backend, networking
调研方向
Read backend/getIP_ipInfo_apikey.php and backend/getIP_serverPublicIp.php, then trace how getIP.php handles private client addresses and calls the existing ipinfo API and offline database fallback. Check the option and its Docker environment variable, plus the documentation in doc.md and doc_docker.md. Done means private LAN clients can optionally see the server public IP's ISP while keeping their own IP displayed, with the existing behavior preserved when disabled or lookup fails.
由索引模型根据 Issue 内容生成。
描述
Closes #862
Before: when a client on the same LAN as the server opens the speed test (e.g. 192.168.1.23), getIP.php sees a private IP and skips ISP detection, so it only shows "Private IPv4 access".
After: if $USE_SERVER_PUBLIC_IP_FOR_PRIVATE_CLIENTS = true; is set in backend/getIP_ipInfo_apikey.php (or USE_SERVER_PUBLIC_IP_FOR_PRIVATE_CLIENTS=true in Docker), private clients get the ISP info of the server's public IP, shown with their own IP. It's off by default, so nothing changes unless you turn it on.
How: the server gets its public IP from ipinfo.io/ip (using the API token if one is set) and caches it for an hour in backend/getIP_serverPublicIp.php, which is gitignored. The lookup then goes through the existing ipinfo API, with the offline db as a fallback. I pulled the API-then-offline-db chain into a small getIspInfo() helper so both paths use it. If the public IP can't be fetched, the response is the same as before. I also documented the option in doc.md and doc_docker.md.
I tested it locally with PHP 8.3 and the offline db. It's unchanged when off, public clients are unchanged too, private clients get ISP info when on, and it falls back cleanly when the lookup fails. I used Claude to help write this.
- 主要语言
- JavaScript
- 星标
- 15.3k
- 派生
- 2.5k
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
librespeed/speedtest 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
librespeed/speedtest#880 ·
-
Add support for Open Container Initiative (OCI) image format within the Docker artifact integration未关闭
难度 4/5 3-5 天 新手友好度 28/100
librespeed/speedtest#879 ·
-
难度 4/5 3-5 天 新手友好度 35/100
librespeed/speedtest#876 ·
-
难度 2/5 1-3 小时 新手友好度 42/100
librespeed/speedtest#875 ·
-
CVE-2026-109618 / CVE-2026-109619可能重新可做 @sstidl 于 34 天前认领,目前没有进行中的 PR。 未关闭Confirmed
难度 4/5 3-5 天 新手友好度 45/100
librespeed/speedtest#866 · 3 条评论 · 10 个 reaction · 已指派 2 人 ·
查看 librespeed/speedtest 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 75/100
testing-library/jest-dom#749 ·
-
bug
难度 2/5 1-3 小时 新手友好度 65/100
-
ernst:4-klein prio:3-wacht ui
难度 2/5 1-3 小时 新手友好度 70/100
NewspeedyNL/PidLane#767 ·
维护者通常 1 天内回复
-
bug for-agent ready
难度 2/5 1-3 小时 新手友好度 62/100
WenyuChiou/agent-board#1812 · 2 条评论 ·
维护者通常 1 天内回复
-
bug help wanted Should Have ui
难度 2/5 1-3 小时 新手友好度 82/100
hannahro15/Musical-Match-Saga#327 · 1 条评论 ·
维护者通常 1 天内回复