summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2016-09-26 15:13:04 -0400
committerJoey Hess <joeyh@joeyh.name>2016-09-26 15:15:11 -0400
commit90ff9f8872b0b4157a7e755e00eedf88907c98f1 (patch)
tree59e0a1706ef6bea2339a239b5a8d94ddaa291f89
parent0b7c646411d049f8d71fcff5fd9dc4f20ee334d0 (diff)
downloadkeysafe-90ff9f8872b0b4157a7e755e00eedf88907c98f1.tar.gz
small updates
-rw-r--r--CHANGELOG3
-rw-r--r--Servers.hs20
2 files changed, 16 insertions, 7 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 9785dfb..cb0f23a 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -8,6 +8,9 @@ keysafe (0.20160923) UNRELEASED; urgency=medium
* Don't upload more than neededshares-1 shares to Alternate servers
without asking the user if they want to do this potentially dangerous
action.
+ * Added a second keysafe server to the server list. It's provided
+ by Marek Isalski at Faelix. Currently located in UK, but planned move
+ to CH. Currently at Alternate level until verification is complete.
-- Joey Hess <id@joeyh.name> Fri, 23 Sep 2016 10:40:55 -0400
diff --git a/Servers.hs b/Servers.hs
index 7edc7af..08789ce 100644
--- a/Servers.hs
+++ b/Servers.hs
@@ -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 ""