https://github.com/trinitronx/fastest-servers
A ruby script to generate a list of fastest servers (Ubuntu mirrors by default)
https://github.com/trinitronx/fastest-servers
Last synced: about 1 month ago
JSON representation
A ruby script to generate a list of fastest servers (Ubuntu mirrors by default)
- Host: GitHub
- URL: https://github.com/trinitronx/fastest-servers
- Owner: trinitronx
- Created: 2015-04-30T06:39:39.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2015-11-30T18:53:29.000Z (over 10 years ago)
- Last Synced: 2025-02-27T09:12:19.740Z (over 1 year ago)
- Language: Ruby
- Homepage:
- Size: 33.2 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Fastest Servers
===============
[](https://travis-ci.org/trinitronx/fastest-servers)
[](https://hub.docker.com/r/trinitronx/fastest-servers)
[](https://hub.docker.com/r/trinitronx/fastest-servers)
[](https://www.gittip.com/trinitronx)
A Ruby Script to narrow down a list of mirrors to the fastest servers.
By default, use Ubuntu mirror list hosted at: http://mirrors.ubuntu.com/mirrors.txt
Outputs a `mirrors.txt` file to `/tmp/` in the container. To capture this file for later use, pass through `/tmp` as a volume mount to Docker Container.
Configuration / Environment Variables
-------------------------------------
Variable Name | Description | Default
-------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------
`FASTEST_SERVER_LIST_TYPE` | Tells script what port to ping servers on. `HTTP` or `NTP` (Experimental) | `HTTP`
`FASTEST_SERVER_INITIAL_TIMEOUT` | Initial timeout in seconds used as limit for server ping timeout. If < 5 servers satisfy timeout, add `0.001` to this & retry until >= 5 servers found. | `0.050` (seconds)
`MIRRORLIST_LOCAL_FILE` | If specified, use this local file as mirror list input to find fastest servers in list | `nil`
`MIRRORLIST_HOST` | Get `MIRRORLIST_URL` from this host and use as mirror list input for finding fastest servers | `mirrors.ubuntu.com`
`MIRRORLIST_URL` | Get this URL from `MIRRORLIST_HOST` & use as mirror list input | `/mirrors.txt`
`MIRRORLIST_PORT` | Port to contact `MIRRORLIST_HOST` on for getting `MIRRORLIST_URL` via HTTP | `80`
`FASTEST_SERVER_LIST_OUTPUT` | Local file to output final filtered mirror list to. If using docker, ensure you volume mount enclosing directory from host | `/tmp/mirrors.txt`
`FASTEST_SERVER_DEBUG` | Puts script in `DEBUG` mode, which prints extra information to `STDOUT` | `nil`
Example Usage
-------------
To output a list of fastest Ubuntu mirrors to `/tmp/mirrors.txt`:
sudo docker run -ti -v /tmp/:/tmp/ trinitronx/fastest-servers:latest
To run script in `DEBUG` mode, pass in environment variable `-e FASTEST_SERVER_DEBUG=true`:
sudo docker run -ti -e FASTEST_SERVER_DEBUG=true -v /tmp/:/tmp/ trinitronx/fastest-servers:latest