diff options
Diffstat (limited to 'P2P/Address.hs')
-rw-r--r-- | P2P/Address.hs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/P2P/Address.hs b/P2P/Address.hs index 1b1f66059..919739327 100644 --- a/P2P/Address.hs +++ b/P2P/Address.hs @@ -14,6 +14,7 @@ import Git.Types import Creds import Utility.AuthToken import Utility.Tor +import qualified Utility.SimpleProtocol as Proto import qualified Data.Text as T @@ -46,6 +47,10 @@ instance FormatP2PAddress P2PAddress where return (TorAnnex (OnionAddress onionaddr) onionport) | otherwise = Nothing +instance Proto.Serializable P2PAddressAuth where + serialize = formatP2PAddress + deserialize = unformatP2PAddress + torAnnexScheme :: String torAnnexScheme = "tor-annex:" |