cli: option to only use SOCKS5 proxy with onion-only relays (#4459)

* cli: option to only use SOCKS5 proxy with onion-only relays

* simplexmq

* show socks mode in CLI, fix to use correct network config
This commit is contained in:
Evgeny Poberezkin 2024-07-15 23:04:09 +01:00 committed by GitHub
parent c6e5d6e2b8
commit bf59402856
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 46 additions and 31 deletions

View file

@ -76,7 +76,7 @@ import Simplex.Messaging.Agent.Protocol
import Simplex.Messaging.Agent.Store.SQLite (MigrationConfirmation, SQLiteStore, UpMigration, withTransaction)
import Simplex.Messaging.Agent.Store.SQLite.DB (SlowQueryStats (..))
import qualified Simplex.Messaging.Agent.Store.SQLite.DB as DB
import Simplex.Messaging.Client (SMPProxyFallback (..), SMPProxyMode (..))
import Simplex.Messaging.Client (SMPProxyFallback (..), SMPProxyMode (..), SocksMode (..))
import qualified Simplex.Messaging.Crypto as C
import Simplex.Messaging.Crypto.File (CryptoFile (..))
import qualified Simplex.Messaging.Crypto.File as CF
@ -966,6 +966,7 @@ data AppFilePathsConfig = AppFilePathsConfig
data SimpleNetCfg = SimpleNetCfg
{ socksProxy :: Maybe SocksProxy,
socksMode :: SocksMode,
smpProxyMode_ :: Maybe SMPProxyMode,
smpProxyFallback_ :: Maybe SMPProxyFallback,
tcpTimeout_ :: Maybe Int,
@ -974,7 +975,7 @@ data SimpleNetCfg = SimpleNetCfg
deriving (Show)
defaultSimpleNetCfg :: SimpleNetCfg
defaultSimpleNetCfg = SimpleNetCfg Nothing Nothing Nothing Nothing False
defaultSimpleNetCfg = SimpleNetCfg Nothing SMAlways Nothing Nothing Nothing False
data ContactSubStatus = ContactSubStatus
{ contact :: Contact,