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

module Servers where

import Types.Server
import Servant.Client

serverUrls :: Server -> [BaseUrl]
serverUrls srv = map go (serverAddress srv)
  where
	go (ServerAddress addr port) = BaseUrl Http addr port ""

networkServers :: [Server]
networkServers =
	[ Server (ServerName "keysafe.joeyh.name") Alternate
		[ServerAddress "vzgrspuxbtnlrtup.onion" 4242]

	-- Purism server is not yet deployed, but planned.
	, Server (ServerName "keysafe.puri.sm") Alternate
		[]

	-- Unknown yet who will provide this server, but allocate it now
	-- so keysafe can start queuing uploads to it.
	, Server (ServerName "thirdserver") Recommended
		[]
	--	[ServerAddress "eqi7glyxe5ravak5.onion" 4242]
	--	-- ^ still being vetted
	]