{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE OverloadedLists #-}
{-# LANGUAGE OverloadedStrings #-}
module Simplex.Chat.Operators.Presets where
import Data.List.NonEmpty (NonEmpty)
import qualified Data.List.NonEmpty as L
import Simplex.Chat.Operators
import Simplex.Messaging.Agent.Env.SQLite (ServerRoles (..), allRoles)
import Simplex.Messaging.Agent.Store.Entity
import Simplex.Messaging.Protocol (ProtocolType (..), SMPServer)
operatorSimpleXChat :: NewServerOperator
operatorSimpleXChat :: NewServerOperator
operatorSimpleXChat =
ServerOperator
{ operatorId :: DBEntityId' 'DBNew
operatorId = DBEntityId' 'DBNew
DBNewEntity,
operatorTag :: Maybe OperatorTag
operatorTag = OperatorTag -> Maybe OperatorTag
forall a. a -> Maybe a
Just OperatorTag
OTSimplex,
tradeName :: Text
tradeName = Text
"SimpleX Chat",
legalName :: Maybe Text
legalName = Text -> Maybe Text
forall a. a -> Maybe a
Just Text
"SimpleX Chat Ltd",
serverDomains :: [Text]
serverDomains = [Item [Text]
Text
"simplex.im"],
conditionsAcceptance :: ConditionsAcceptance
conditionsAcceptance = Maybe UTCTime -> ConditionsAcceptance
CARequired Maybe UTCTime
forall a. Maybe a
Nothing,
enabled :: Bool
enabled = Bool
True,
smpRoles :: ServerRoles
smpRoles = ServerRoles
allRoles,
xftpRoles :: ServerRoles
xftpRoles = ServerRoles
allRoles
}
operatorFlux :: NewServerOperator
operatorFlux :: NewServerOperator
operatorFlux =
ServerOperator
{ operatorId :: DBEntityId' 'DBNew
operatorId = DBEntityId' 'DBNew
DBNewEntity,
operatorTag :: Maybe OperatorTag
operatorTag = OperatorTag -> Maybe OperatorTag
forall a. a -> Maybe a
Just OperatorTag
OTFlux,
tradeName :: Text
tradeName = Text
"Flux",
legalName :: Maybe Text
legalName = Text -> Maybe Text
forall a. a -> Maybe a
Just Text
"InFlux Technologies Limited",
serverDomains :: [Text]
serverDomains = [Item [Text]
Text
"simplexonflux.com"],
conditionsAcceptance :: ConditionsAcceptance
conditionsAcceptance = Maybe UTCTime -> ConditionsAcceptance
CARequired Maybe UTCTime
forall a. Maybe a
Nothing,
enabled :: Bool
enabled = Bool
True,
smpRoles :: ServerRoles
smpRoles = ServerRoles {storage :: Bool
storage = Bool
False, proxy :: Bool
proxy = Bool
True},
xftpRoles :: ServerRoles
xftpRoles = ServerRoles {storage :: Bool
storage = Bool
False, proxy :: Bool
proxy = Bool
True}
}
allPresetServers :: NonEmpty SMPServer
allPresetServers :: NonEmpty SMPServer
allPresetServers = NonEmpty SMPServer
enabledSimplexChatSMPServers NonEmpty SMPServer -> NonEmpty SMPServer -> NonEmpty SMPServer
forall a. Semigroup a => a -> a -> a
<> NonEmpty SMPServer
disabledSimplexChatSMPServers NonEmpty SMPServer -> NonEmpty SMPServer -> NonEmpty SMPServer
forall a. Semigroup a => a -> a -> a
<> NonEmpty SMPServer
fluxSMPServers_
NonEmpty SMPServer -> NonEmpty SMPServer -> NonEmpty SMPServer
forall a. Semigroup a => a -> a -> a
<> [Item (NonEmpty SMPServer)
SMPServer
"smp://8Af90NX2TTkKEJAF1RCg69P_Odg2Z-6_J6DOKUqK3rQ=@smp7.simplex.im,dbxqutskmmbkbrs7ofi7pmopeyhgi5cxbjbh4ummgmep4r6bz4cbrcid.onion"]
simplexChatSMPServers :: [NewUserServer 'PSMP]
simplexChatSMPServers :: [NewUserServer 'PSMP]
simplexChatSMPServers =
(SMPServer -> NewUserServer 'PSMP)
-> [SMPServer] -> [NewUserServer 'PSMP]
forall a b. (a -> b) -> [a] -> [b]
map (Bool -> SMPServer -> NewUserServer 'PSMP
forall (p :: ProtocolType).
Bool -> ProtocolServer p -> NewUserServer p
presetServer' Bool
True) (NonEmpty SMPServer -> [SMPServer]
forall a. NonEmpty a -> [a]
L.toList NonEmpty SMPServer
enabledSimplexChatSMPServers)
[NewUserServer 'PSMP]
-> [NewUserServer 'PSMP] -> [NewUserServer 'PSMP]
forall a. Semigroup a => a -> a -> a
<> (SMPServer -> NewUserServer 'PSMP)
-> [SMPServer] -> [NewUserServer 'PSMP]
forall a b. (a -> b) -> [a] -> [b]
map (Bool -> SMPServer -> NewUserServer 'PSMP
forall (p :: ProtocolType).
Bool -> ProtocolServer p -> NewUserServer p
presetServer' Bool
False) (NonEmpty SMPServer -> [SMPServer]
forall a. NonEmpty a -> [a]
L.toList NonEmpty SMPServer
disabledSimplexChatSMPServers)
enabledSimplexChatSMPServers :: NonEmpty SMPServer
enabledSimplexChatSMPServers :: NonEmpty SMPServer
enabledSimplexChatSMPServers =
[ Item (NonEmpty SMPServer)
SMPServer
"smp://0YuTwO05YJWS8rkjn9eLJDjQhFKvIYd8d4xG8X1blIU=@smp8.simplex.im,beccx4yfxxbvyhqypaavemqurytl6hozr47wfc7uuecacjqdvwpw2xid.onion",
Item (NonEmpty SMPServer)
SMPServer
"smp://SkIkI6EPd2D63F4xFKfHk7I1UGZVNn6k1QWZ5rcyr6w=@smp9.simplex.im,jssqzccmrcws6bhmn77vgmhfjmhwlyr3u7puw4erkyoosywgl67slqqd.onion",
Item (NonEmpty SMPServer)
SMPServer
"smp://6iIcWT_dF2zN_w5xzZEY7HI2Prbh3ldP07YTyDexPjE=@smp10.simplex.im,rb2pbttocvnbrngnwziclp2f4ckjq65kebafws6g4hy22cdaiv5dwjqd.onion",
Item (NonEmpty SMPServer)
SMPServer
"smp://1OwYGt-yqOfe2IyVHhxz3ohqo3aCCMjtB-8wn4X_aoY=@smp11.simplex.im,6ioorbm6i3yxmuoezrhjk6f6qgkc4syabh7m3so74xunb5nzr4pwgfqd.onion",
Item (NonEmpty SMPServer)
SMPServer
"smp://UkMFNAXLXeAAe0beCa4w6X_zp18PwxSaSjY17BKUGXQ=@smp12.simplex.im,ie42b5weq7zdkghocs3mgxdjeuycheeqqmksntj57rmejagmg4eor5yd.onion",
Item (NonEmpty SMPServer)
SMPServer
"smp://enEkec4hlR3UtKx2NMpOUK_K4ZuDxjWBO1d9Y4YXVaA=@smp14.simplex.im,aspkyu2sopsnizbyfabtsicikr2s4r3ti35jogbcekhm3fsoeyjvgrid.onion",
Item (NonEmpty SMPServer)
SMPServer
"smp://h--vW7ZSkXPeOUpfxlFGgauQmXNFOzGoizak7Ult7cw=@smp15.simplex.im,oauu4bgijybyhczbnxtlggo6hiubahmeutaqineuyy23aojpih3dajad.onion",
Item (NonEmpty SMPServer)
SMPServer
"smp://hejn2gVIqNU6xjtGM3OwQeuk8ZEbDXVJXAlnSBJBWUA=@smp16.simplex.im,p3ktngodzi6qrf7w64mmde3syuzrv57y55hxabqcq3l5p6oi7yzze6qd.onion",
Item (NonEmpty SMPServer)
SMPServer
"smp://ZKe4uxF4Z_aLJJOEsC-Y6hSkXgQS5-oc442JQGkyP8M=@smp17.simplex.im,ogtwfxyi3h2h5weftjjpjmxclhb5ugufa5rcyrmg7j4xlch7qsr5nuqd.onion",
Item (NonEmpty SMPServer)
SMPServer
"smp://PtsqghzQKU83kYTlQ1VKg996dW4Cw4x_bvpKmiv8uns=@smp18.simplex.im,lyqpnwbs2zqfr45jqkncwpywpbtq7jrhxnib5qddtr6npjyezuwd3nqd.onion",
Item (NonEmpty SMPServer)
SMPServer
"smp://N_McQS3F9TGoh4ER0QstUf55kGnNSd-wXfNPZ7HukcM=@smp19.simplex.im,i53bbtoqhlc365k6kxzwdp5w3cdt433s7bwh3y32rcbml2vztiyyz5id.onion"
]
disabledSimplexChatSMPServers :: NonEmpty SMPServer
disabledSimplexChatSMPServers :: NonEmpty SMPServer
disabledSimplexChatSMPServers =
[ Item (NonEmpty SMPServer)
SMPServer
"smp://u2dS9sG8nMNURyZwqASV4yROM28Er0luVTx5X1CsMrU=@smp4.simplex.im,o5vmywmrnaxalvz6wi3zicyftgio6psuvyniis6gco6bp6ekl4cqj4id.onion",
Item (NonEmpty SMPServer)
SMPServer
"smp://hpq7_4gGJiilmz5Rf-CswuU5kZGkm_zOIooSw6yALRg=@smp5.simplex.im,jjbyvoemxysm7qxap7m5d5m35jzv5qq6gnlv7s4rsn7tdwwmuqciwpid.onion",
Item (NonEmpty SMPServer)
SMPServer
"smp://PQUV2eL0t7OStZOoAsPEV2QYWt4-xilbakvGUGOItUo=@smp6.simplex.im,bylepyau3ty4czmn77q4fglvperknl4bi2eb2fdy2bh4jxtf32kf73yd.onion"
]
fluxSMPServers :: [NewUserServer 'PSMP]
fluxSMPServers :: [NewUserServer 'PSMP]
fluxSMPServers = (SMPServer -> NewUserServer 'PSMP)
-> [SMPServer] -> [NewUserServer 'PSMP]
forall a b. (a -> b) -> [a] -> [b]
map (Bool -> SMPServer -> NewUserServer 'PSMP
forall (p :: ProtocolType).
Bool -> ProtocolServer p -> NewUserServer p
presetServer' Bool
True) (NonEmpty SMPServer -> [SMPServer]
forall a. NonEmpty a -> [a]
L.toList NonEmpty SMPServer
fluxSMPServers_)
fluxSMPServers_ :: NonEmpty SMPServer
fluxSMPServers_ :: NonEmpty SMPServer
fluxSMPServers_ =
[ Item (NonEmpty SMPServer)
SMPServer
"smp://xQW_ufMkGE20UrTlBl8QqceG1tbuylXhr9VOLPyRJmw=@smp1.simplexonflux.com,qb4yoanyl4p7o33yrknv4rs6qo7ugeb2tu2zo66sbebezs4cpyosarid.onion",
Item (NonEmpty SMPServer)
SMPServer
"smp://LDnWZVlAUInmjmdpQQoIo6FUinRXGe0q3zi5okXDE4s=@smp2.simplexonflux.com,yiqtuh3q4x7hgovkomafsod52wvfjucdljqbbipg5sdssnklgongxbqd.onion",
Item (NonEmpty SMPServer)
SMPServer
"smp://1jne379u7IDJSxAvXbWb_JgoE7iabcslX0LBF22Rej0=@smp3.simplexonflux.com,a5lm4k7ufei66cdck6fy63r4lmkqy3dekmmb7jkfdm5ivi6kfaojshad.onion",
Item (NonEmpty SMPServer)
SMPServer
"smp://xmAmqj75I9mWrUihLUlI0ZuNLXlIwFIlHRq5Pb6cHAU=@smp4.simplexonflux.com,qpcz2axyy66u26hfdd2e23uohcf3y6c36mn7dcuilcgnwjasnrvnxjqd.onion",
Item (NonEmpty SMPServer)
SMPServer
"smp://rWvBYyTamuRCBYb_KAn-nsejg879ndhiTg5Sq3k0xWA=@smp5.simplexonflux.com,4ao347qwiuluyd45xunmii4skjigzuuox53hpdsgbwxqafd4yrticead.onion",
Item (NonEmpty SMPServer)
SMPServer
"smp://PN7-uqLBToqlf1NxHEaiL35lV2vBpXq8Nj8BW11bU48=@smp6.simplexonflux.com,hury6ot3ymebbr2535mlp7gcxzrjpc6oujhtfxcfh2m4fal4xw5fq6qd.onion"
]
fluxXFTPServers :: [NewUserServer 'PXFTP]
fluxXFTPServers :: [NewUserServer 'PXFTP]
fluxXFTPServers =
(ProtoServerWithAuth 'PXFTP -> NewUserServer 'PXFTP)
-> [ProtoServerWithAuth 'PXFTP] -> [NewUserServer 'PXFTP]
forall a b. (a -> b) -> [a] -> [b]
map
(Bool -> ProtoServerWithAuth 'PXFTP -> NewUserServer 'PXFTP
forall (p :: ProtocolType).
Bool -> ProtoServerWithAuth p -> NewUserServer p
presetServer Bool
True)
[ Item [ProtoServerWithAuth 'PXFTP]
ProtoServerWithAuth 'PXFTP
"xftp://92Sctlc09vHl_nAqF2min88zKyjdYJ9mgxRCJns5K2U=@xftp1.simplexonflux.com,apl3pumq3emwqtrztykyyoomdx4dg6ysql5zek2bi3rgznz7ai3odkid.onion",
Item [ProtoServerWithAuth 'PXFTP]
ProtoServerWithAuth 'PXFTP
"xftp://YBXy4f5zU1CEhnbbCzVWTNVNsaETcAGmYqGNxHntiE8=@xftp2.simplexonflux.com,c5jjecisncnngysah3cz2mppediutfelco4asx65mi75d44njvua3xid.onion",
Item [ProtoServerWithAuth 'PXFTP]
ProtoServerWithAuth 'PXFTP
"xftp://ARQO74ZSvv2OrulRF3CdgwPz_AMy27r0phtLSq5b664=@xftp3.simplexonflux.com,dc4mohiubvbnsdfqqn7xhlhpqs5u4tjzp7xpz6v6corwvzvqjtaqqiqd.onion",
Item [ProtoServerWithAuth 'PXFTP]
ProtoServerWithAuth 'PXFTP
"xftp://ub2jmAa9U0uQCy90O-fSUNaYCj6sdhl49Jh3VpNXP58=@xftp4.simplexonflux.com,4qq5pzier3i4yhpuhcrhfbl6j25udc4czoyascrj4yswhodhfwev3nyd.onion",
Item [ProtoServerWithAuth 'PXFTP]
ProtoServerWithAuth 'PXFTP
"xftp://Rh19D5e4Eez37DEE9hAlXDB3gZa1BdFYJTPgJWPO9OI=@xftp5.simplexonflux.com,q7itltdn32hjmgcqwhow4tay5ijetng3ur32bolssw32fvc5jrwvozad.onion",
Item [ProtoServerWithAuth 'PXFTP]
ProtoServerWithAuth 'PXFTP
"xftp://0AznwoyfX8Od9T_acp1QeeKtxUi676IBIiQjXVwbdyU=@xftp6.simplexonflux.com,upvzf23ou6nrmaf3qgnhd6cn3d74tvivlmz3p7wdfwq6fhthjrjiiqid.onion"
]