summaryrefslogtreecommitdiffhomepage
path: root/Servers.hs
blob: 093e75b1406fb9e5d0d181b091b8fe81881d0327 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{- Copyright 2016 Joey Hess <id@joeyh.name>
 -
 - Licensed under the GNU AGPL version 3 or higher.
 -}

module Servers where

import Types.Server
import Network.Wai.Handler.Warp (Port)
import Servant.Client

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 "vzgrspuxbtnlrtup.onion" 4242 -- keysafe.joeyh.name
	, Server "localhost" 4242
	, Server "localhost" 4242
	]