diff options
Diffstat (limited to 'Servers.hs')
-rw-r--r-- | Servers.hs | 20 |
1 files changed, 13 insertions, 7 deletions
@@ -9,11 +9,14 @@ import Types.Server import Servant.Client import System.Random.Shuffle -serverUrls :: Server -> [BaseUrl] -serverUrls srv = map go (serverAddress srv) - where - go (ServerAddress addr port) = BaseUrl Http addr port "" - +-- | Keysafe's server list. +-- +-- Note: Avoid removing servers from this list, as that will break +-- restores. If necessary, a server can be set to Untrusted to prevent +-- uploads to it. +-- +-- Also, avoid changing the ServerName of any server, as that will +-- cause any uploads queued under that name to not go through. networkServers :: [Server] networkServers = [ Server (ServerName "keysafe.joeyh.name") Alternate @@ -24,8 +27,6 @@ networkServers = [] "Purism server is not yet deployed, but planned." - -- Provided by https://faelix.net/ - -- Marek Isalski , Server (ServerName "thirdserver") Alternate -- still being vetted [ServerAddress "eqi7glyxe5ravak5.onion" 4242] "Provided by Marek Isalski at Faelix. Currently located in UK, but planned move to CH" @@ -37,3 +38,8 @@ shuffleServers :: [Server] -> IO [Server] shuffleServers l = concat <$> mapM shuf [minBound..maxBound] where shuf sl = shuffleM (filter (\s -> serverLevel s == sl) l) + +serverUrls :: Server -> [BaseUrl] +serverUrls srv = map go (serverAddress srv) + where + go (ServerAddress addr port) = BaseUrl Http addr port "" |