Skip to content

Feature Request: Discover LibreSpeed server via .well-known or DNS SVCB/HTTPS records #117

@vincejv

Description

@vincejv

Summary

Add support for automatic LibreSpeed server discovery using a .well-known endpoint.

Instead of requiring:

librespeed-cli --server-json https://example.com/speedtest/server.json

allow a simpler CLI:

librespeed-cli example.com

The CLI would automatically fetch:

https://example.com/.well-known/librespeed

or:

https://example.com/.well-known/librespeed.json

and retrieve the server.json location.


Proposed Flow

Image

Example:

librespeed-cli vincejv.com

CLI behavior:

  1. Request:
https://example.com/.well-known/librespeed
  1. Response example:
{
  "server_json": "https://internal.example.com/speedtest/server.json"
}
  1. CLI automatically uses the discovered server list.

Equivalent internally to:

librespeed-cli --server-json https://internal.example.com/speedtest/server.json

Benefits

  • Much simpler CLI
  • Easier self-hosting
  • Easier branding/custom domains
  • Standardized discovery mechanism
  • Similar to other .well-known discovery standards

Suggested Fallback Behavior

If .well-known/librespeed is not found:

  • fallback to existing behavior

  • optionally try:

    • /speedtest/server.json
    • https://speedtest.<domain>/server.json

Backward Compatibility

This feature would be fully backward compatible since existing flags (--server-json, --local-json) would continue working unchanged.


Additional Idea

Potential future support:

librespeed-cli example.com

with automatic discovery using DNS SVCB/HTTPS records.

Example DNS record:

_librespeed.example.com. IN HTTPS 1 . alpn="h2" path="/speedtest/server.json"

or:

_librespeed.example.com. IN SVCB 1 speed.example.com. path="/speedtest/server.json"

CLI behavior:

  1. Query _librespeed.<domain> SVCB/HTTPS records
  2. Extract target host and optional path metadata
  3. Automatically retrieve the LibreSpeed server.json

This avoids hardcoded path guessing and provides a standards-based discovery mechanism similar to modern service discovery approaches.

Fallback order could be:

  1. DNS SVCB/HTTPS discovery
  2. .well-known/librespeed
  3. Explicit --server-json

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions