diff options
Diffstat (limited to 'Servers.hs')
-rw-r--r-- | Servers.hs | 20 |
1 files changed, 13 insertions, 7 deletions
@@ -8,14 +8,20 @@ module Servers where import Types.Server import Servant.Client -serverUrl :: Server -> BaseUrl -serverUrl srv = BaseUrl Http (serverName srv) (serverPort srv) "" +serverUrls :: Server -> [BaseUrl] +serverUrls srv = map go (serverAddress srv) + where + go (ServerAddress addr port) = BaseUrl Http addr port "" --- | These can be either tor .onion addresses, or regular hostnames. --- Using tor is highly recommended, to avoid correlation attacks. networkServers :: IO [Server] networkServers = return - [ Server "vzgrspuxbtnlrtup.onion" 4242 -- keysafe.joeyh.name - , Server "localhost" 4242 - , Server "localhost" 4242 + [ Server (ServerName "keysafe.joeyh.name") + [ServerAddress "vzgrspuxbtnlrtup.onion" 4242] + -- Purism server is not yet deployed, but planned. + , Server (ServerName "keysafe.puri.sm") + [] + -- Unknown yet who will provide this server, but allocate it now + -- so keysafe can start queuing uploads to it. + , Server (ServerName "thirdserver") + [] ] |