librespeed / speedtest

Self-hosted Speed Test for HTML5 and more. Easy setup, examples, configurable, mobile friendly. Supports PHP, Node, Multiple servers, and more
https://librespeed.org
GNU Lesser General Public License v3.0
12.27k stars 2.21k forks source link

Dual mode is broken #666

Open EsmailELBoBDev2 opened 2 months ago

EsmailELBoBDev2 commented 2 months ago

Description

Whenever I try to use dual mode it does not let me select servers from dropmenu. it only see its local self but not the remote server I added

Server

Every info you can provide about your server: web server, database, PHP version, ... as well as server-side speedtest settings If possible, provide an URL to your speedtest so we can check it

Client

Brave, Arch Linux

Steps to reproduce

Expected behaviour

in dual mode it sees itself and other server and let me select between servers

Screenshots

image with dual mode

image without dual mode, I run 2 images now one with mode frontend and other with backend locally

configs

servers.json:

[
    {
        "name": "Server 1",
        "server": "//public-ip:port/",
        "dlURL": "garbage.php",
        "ulURL": "empty.php",
        "pingURL": "empty.php",
        "getIpURL": "getIP.php"
    },
    { 
        "name": "Server 2",
        "server": "//public-ip:port/",
        "dlURL": "garbage.php",
        "ulURL": "empty.php",
        "pingURL": "empty.php",
        "getIpURL": "getIP.php"
    }
]

docker compose (main server)

  librespeed:
    container_name: librespeed
    image: ghcr.io/librespeed/speedtest:latest
    restart: always
    volumes:
      - ./librespeed/servers.json:/servers.json
    environment:
      MODE: dual
      #CORS_ALLOW_ORIGIN: "*"
      #TITLE: "LibreSpeed"
      #TELEMETRY: "false"
      #ENABLE_ID_OBFUSCATION: "false"
      #REDACT_IP_ADDRESSES: "false"
      #PASSWORD:
      #EMAIL:
      #DISABLE_IPINFO: "false"
      #IPINFO_APIKEY: "your api key"
      #DISTANCE: "km"
      #WEBPORT: 80
    ports:
      - "8020:80" # webport mapping (host:container)

the second server

  librespeed:
    container_name: librespeed
    image: ghcr.io/librespeed/speedtest:latest
    restart: always
    volumes:
      - ./librespeed/servers.json:/servers.json
    environment:
      MODE: backend
      #MODE: frontend
      #TITLE: "LibreSpeed"
      #TELEMETRY: "false"
      #ENABLE_ID_OBFUSCATION: "false"
      #REDACT_IP_ADDRESSES: "false"
      #PASSWORD:
      #EMAIL:
      #DISABLE_IPINFO: "false"
      #IPINFO_APIKEY: "your api key"
      #DISTANCE: "km"
      #WEBPORT: 80
    ports:
      - "8020:80" # webport mapping (host:container)

but when I use both images one for frontend and other for backend it works fine on main server and I can see both servers

EsmailELBoBDev2 commented 2 months ago

and now I cant access it via https https://speedtest.esmailelbob.xyz/ it says No servers available but locally it works great so not sure what I really did wrong and if its bug or issue on my end image image