{- Copyright 2016 Joey Hess - - Licensed under the GNU AGPL version 3 or higher. -} module Servers where import Network.Wai.Handler.Warp (Port) import Servant.Client type HostName = String data Server = Server { serverName :: HostName , serverPort :: Port } serverUrl :: Server -> BaseUrl serverUrl srv = BaseUrl Http (serverName srv) (serverPort srv) "" -- | 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 "localhost" 4242 -- Server "vzgrspuxbtnlrtup.onion" 4242 -- keysafe.joeyh.name , Server "localhost" 4242 , Server "localhost" 4242 ]