librespeed / librespeed/speedtest
index-classic.html ignores defined server list
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 15.2k
- Forks
- 2.5k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 7
Description
Description
index-classic.html doesn't get my server-list.json even though I have it in place per the documentation
Server
running on raspberry os inside docker container using alpine images
//LIST OF TEST SERVERS. Leave empty if you're doing a standalone installation. See documentation for details
var SPEEDTEST_SERVERS = [
/*{ //this server doesn't actually exist, remove it
name:"Example Server 1", //user friendly name for the server
server:"//test1.mydomain.com/", //URL to the server. // at the beginning will be replaced with http:// or https:// automatically
dlURL:"backend/garbage.php", //path to download test on this server (garbage.php or replacement)
ulURL:"backend/empty.php", //path to upload test on this server (empty.php or replacement)
pingURL:"backend/empty.php", //path to ping/jitter test on this server (empty.php or replacement)
getIpURL:"backend/getIP.php" //path to getIP on this server (getIP.php or replacement)
},
{ //this server doesn't actually exist, remove it
name:"Example Server 2", //user friendly name for the server
server:"//test2.example.com/", //URL to the server. // at the beginning will be replaced with http:// or https:// automatically
dlURL:"garbage.php", //path to download test on this server (garbage.php or replacement)
ulURL:"empty.php", //path to upload test on this server (empty.php or replacement)
pingURL:"empty.php", //path to ping/jitter test on this server (empty.php or replacement)
getIpURL:"getIP.php" //path to getIP on this server (getIP.php or replacement)
}*/
//add other servers here, comma separated
];
If I replace the above code with:
var SPEEDTEST_SERVERS = "server-list.json";
Then the list loads as expected
The list loads if I set it to use the modern gui as well just fine (-e USE_NEW_DESIGN=true)
Client
any browser, don't get a drop down list of servers on classic
Steps to reproduce
- try to use a list of servers with classic layout
Expected behaviour
list of server drop down list
Additional troubleshooting
# grep SPEEDTEST_SERVERS /entrypoint.sh
sed -i "s/var SPEEDTEST_SERVERS = \"server-list.json\";/var SPEEDTEST_SERVERS = \"$SERVER_LIST_URL_ESCAPED\";/" /var/www/html/index-modern.html
sed -i "s/var SPEEDTEST_SERVERS = \\[/var SPEEDTEST_SERVERS = \"$SERVER_LIST_URL_ESCAPED\";\\n\\t\\t\\/\\*/" /var/www/html/index-classic.html
sed -i "s/var SPEEDTEST_SERVERS = \"server-list.json\";/var SPEEDTEST_SERVERS = \"$SERVER_LIST_URL_ESCAPED\";/" /var/www/html/stability.html
I believe the issue has something to do with this entrypoint sed line on classic
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the SPEEDTEST_SERVERS declarations in index-classic.html and index-modern.html, then inspect the corresponding sed replacement in entrypoint.sh. Reproduce with USE_NEW_DESIGN disabled and a server-list.json configuration. Done means the classic layout loads the configured server list and displays its server dropdown.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, javascript, shell
- Domain
- devops, frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100