Support building with socks-0.6 and persistant-template-2.7
persistent-template now needs UndecidableInstances. socks changed defaultSocksConf to take a SockAddr.
This commit is contained in:
parent
9fd37e65d0
commit
018b5b8173
7 changed files with 14 additions and 0 deletions
|
@ -5,6 +5,8 @@
|
|||
- Licensed under the GNU AGPL version 3 or higher.
|
||||
-}
|
||||
|
||||
{-# LANGUAGE CPP #-}
|
||||
|
||||
module Utility.Tor where
|
||||
|
||||
import Common
|
||||
|
@ -37,7 +39,12 @@ connectHiddenService (OnionAddress address) port = do
|
|||
return s
|
||||
where
|
||||
torsocksport = 9050
|
||||
#if MIN_VERSION_socks(0,6,0)
|
||||
torsockconf = defaultSocksConf $ SockAddrInet torsocksport $
|
||||
tupleToHostAddress (127,0,0,1)
|
||||
#else
|
||||
torsockconf = defaultSocksConf "127.0.0.1" torsocksport
|
||||
#endif
|
||||
socksdomain = SocksAddrDomainName (BU8.fromString address)
|
||||
socksaddr = SocksAddress socksdomain (fromIntegral port)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue