35 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			35 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| # Source: https://c.speedtest.net/speedtest-servers-static.php
 | |
| #
 | |
| # Ookla-speedtest hosts are now generated automatically when generating dlc.dat file.
 | |
| #
 | |
| # You can also generate manually with following Javascript code:
 | |
| # let servers = [];
 | |
| # document.querySelectorAll('server').forEach(s => {
 | |
| #   let v = s.attributes.host.value;
 | |
| #   if (v) {
 | |
| #     v = v.split(":")[0].toLowerCase();
 | |
| #     servers.push(v);
 | |
| #   }
 | |
| # });
 | |
| # servers = servers.filter((s, pos) => {
 | |
| #   if (!/^(\d{1,3}\.){3}\d{1,3}$/.test(s)) {
 | |
| #     return servers.indexOf(s) === pos;
 | |
| #   } else {
 | |
| #     return false;
 | |
| #   }
 | |
| # });
 | |
| # servers.sort();
 | |
| # let output = "";
 | |
| # servers.forEach(s => {
 | |
| #   output += "full:" + s + "\n";
 | |
| # });
 | |
| # console.log(output);
 | |
| #
 | |
| # Or you can generate manually with following sh code:
 | |
| # curl -L -o servers-source.xml "https://c.speedtest.net/speedtest-servers-static.php" -H 'Accept-Encoding: gzip' --compressed
 | |
| # perl -ne '/host="(.+):[0-9]+"/ && print "full:$1\n"' servers-source.xml | perl -ne 'print if not /^(full:([0-9]{1,3}\.){3}[0-9]{1,3})$/' | perl -ne 'print lc' | sort --ignore-case -u >> $GOPATH/src/$REPO_URL/data/ookla-speedtest
 | |
| 
 | |
| 
 | |
| # Do not remove the following line
 | |
| include:ookla-speedtest-ads
 |