SPEEDWAN.NET HOST / HOST ĐO SPEEDWAN.NET

VI
Gói chạy NodeOnly với ASP.NET Core Runtime 10. SpeedWAN.net chính giữ giao diện và SQL.
CORS mặc định cho https://speedwan.net.
Nếu dùng tên miền portal khác, sửa app/appsettings.Production.json trước khi cài.
Cho phép GET /api/speedtest/ping, GET /api/speedtest/node-token,
GET /api/speedtest/download và POST /api/speedtest/upload.
Không cần đặt khóa quản trị hoặc chuỗi SQL tại Host.

Windows: Cài IIS và .NET 10 Hosting Bundle; cài chứng chỉ trong Local Computer / Personal.
Trỏ DNS, rồi chạy PowerShell Administrator:
.\setup-iis.ps1 -HostName host.example.com -CertificateThumbprint "THUMBPRINT"

Linux: cài ASP.NET Core Runtime 10, DNS, Caddy hoặc Nginx.
Chạy chmod +x install.sh và sudo ./install.sh. Host nghe 127.0.0.1:5080.
Caddyfile:
host.example.com {
    reverse_proxy 127.0.0.1:5080
}
Mở cổng 80/443 cho Caddy. Với Nginx, cấu hình chứng chỉ TLS và tắt buffering dữ liệu đo.

Docker: docker build -t speedwan-host .
docker run -d --restart unless-stopped -p 127.0.0.1:5080:8080 speedwan-host
Dùng cùng cấu hình reverse proxy HTTPS. Nếu proxy và app khác máy, cấu hình địa chỉ
proxy tin cậy thực tế tại ReverseProxy:KnownProxies và giới hạn kết nối trực tiếp.

Kiểm tra https://host.example.com/api/speedtest/ping rồi đăng ký trên portal.
Origin phải khớp CORS, đường dẫn đo cần streaming và không cache.

EN
This NodeOnly package requires ASP.NET Core Runtime 10. UI and SQL stay on the main portal.
The default CORS origin is https://speedwan.net.
For a different portal, edit app/appsettings.Production.json before installing.
Only ping, node-token, download and upload are enabled. The Host uses no SQL connection.

Windows: Install IIS and the .NET 10 Hosting Bundle. Import a valid certificate into
Local Computer / Personal, configure DNS, then run elevated PowerShell:
.\setup-iis.ps1 -HostName host.example.com -CertificateThumbprint "THUMBPRINT"

Linux: Install ASP.NET Core Runtime 10 and Caddy or Nginx, configure DNS, run
chmod +x install.sh and sudo ./install.sh. The service listens on 127.0.0.1:5080.
Use the Caddyfile above or configure an equivalent HTTPS Nginx streaming reverse proxy.

Docker: docker build -t speedwan-host .
docker run -d --restart unless-stopped -p 127.0.0.1:5080:8080 speedwan-host
Use the same HTTPS reverse proxy. When the proxy is remote, configure its exact
trusted IP in ReverseProxy:KnownProxies and restrict direct access to the backend.

Verify https://host.example.com/api/speedtest/ping and register the endpoint on the portal.
Apply CORS for the exact portal origin. Disable caching of measurement requests.
