diff options
author | Joey Hess <joeyh@joeyh.name> | 2020-02-14 13:12:26 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2020-02-14 13:12:34 -0400 |
commit | d083843a1f668cf1081b3fd90e390c36698ac604 (patch) | |
tree | 61ee7d13191f8a8ca11f86c823b2427179510463 /HTTP | |
parent | 35e03f947c8c0a15f18229b8d5c6f822b88df94c (diff) | |
download | keysafe-d083843a1f668cf1081b3fd90e390c36698ac604.tar.gz |
updated many dependencies, ghc 8.x
Updated many dependencies, notably secret-sharing which dropped the dep on
polynomial, and so allows building with ghc 8.x.
Did not try to support building with older ghc because the semigroup-monid
transition would make it nontrivial.
Stackage lts-14.25 is a compromise, since the stack shipped in debian (even
unstable) is not able to handle newer ones.
This commit was sponsored by Eric Drechsel on Patreon.
Diffstat (limited to 'HTTP')
-rw-r--r-- | HTTP/Client.hs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/HTTP/Client.hs b/HTTP/Client.hs index 9626eab..61c862c 100644 --- a/HTTP/Client.hs +++ b/HTTP/Client.hs @@ -18,6 +18,7 @@ import Network.HTTP.Client hiding (port, host, Proxy) import Network.HTTP.Client.Internal (Connection) import Control.Exception import Network.Socks5 +import Network.Socket (SockAddr(..), tupleToHostAddress) import qualified Data.ByteString.UTF8 as BU8 import Data.List import Data.Char @@ -73,8 +74,8 @@ serverRequest' srv a = go Nothing (serverUrls srv) go lasterr [] = return $ Left $ maybe "no known address" (\err -> "server failure: " ++ show err) lasterr go _ (url:urls) = do - manager <- torableManager - res <- runClientM a (ClientEnv manager url) + mymanager <- torableManager + res <- runClientM a (ClientEnv mymanager url Nothing defaultMakeClientRequest) case res of Left err -> go (Just err) urls Right r -> return (Right r) @@ -97,7 +98,8 @@ torConnection onionaddress p = do socketConnection socket 8192 where torsocksport = 9050 - torsockconf = defaultSocksConf "127.0.0.1" torsocksport + torsockconf = defaultSocksConf $ + SockAddrInet torsocksport (tupleToHostAddress (127,0,0,1)) socksdomain = SocksAddrDomainName (BU8.fromString onionaddress) socksaddr = SocksAddress socksdomain (fromIntegral p) |