core, ui: option to use web port by default for preset servers only (#5847)

* core: option to use web port by default for preset servers only

* ui

* refactor

* simplexmq
This commit is contained in:
Evgeny authored and GitHub committed 2025-04-25 11:17:27 +01:00
1 parent d53c13f8be
commit 7b11d8514a
14 files changed
+156 -94

No files matched your search

+5 -3
View File
@@ -50,6 +50,7 @@ import Data.Time.Clock.System (SystemTime (..), systemToUTCTime)
import Data.Version (showVersion)
import Data.Word (Word16)
import Language.Haskell.TH (Exp, Q, runIO)
import Network.Socket (HostName)
import Numeric.Natural
import qualified Paths_simplex_chat as SC
import Simplex.Chat.AppSettings
@@ -77,7 +78,7 @@ import Simplex.Messaging.Agent.Protocol
import Simplex.Messaging.Agent.Store.Common (DBStore, withTransaction, withTransactionPriority)
import Simplex.Messaging.Agent.Store.Shared (MigrationConfirmation, UpMigration)
import qualified Simplex.Messaging.Agent.Store.DB as DB
import Simplex.Messaging.Client (HostMode (..), SMPProxyFallback (..), SMPProxyMode (..), SocksMode (..))
import Simplex.Messaging.Client (HostMode (..), SMPProxyFallback (..), SMPProxyMode (..), SMPWebPortServers (..), SocksMode (..))
import qualified Simplex.Messaging.Crypto as C
import Simplex.Messaging.Crypto.File (CryptoFile (..))
import qualified Simplex.Messaging.Crypto.File as CF
@@ -139,6 +140,7 @@ data ChatConfig = ChatConfig
confirmMigrations :: MigrationConfirmation,
presetServers :: PresetServers,
shortLinkPresetServers :: NonEmpty SMPServer,
presetDomains :: [HostName],
tbqSize :: Natural,
fileChunkSize :: Integer,
xftpDescrPartSize :: Int,
@@ -1053,7 +1055,7 @@ data SimpleNetCfg = SimpleNetCfg
requiredHostMode :: Bool,
smpProxyMode_ :: Maybe SMPProxyMode,
smpProxyFallback_ :: Maybe SMPProxyFallback,
smpWebPort :: Bool,
smpWebPortServers :: SMPWebPortServers,
tcpTimeout_ :: Maybe Int,
logTLSErrors :: Bool
}
@@ -1068,7 +1070,7 @@ defaultSimpleNetCfg =
requiredHostMode = False,
smpProxyMode_ = Nothing,
smpProxyFallback_ = Nothing,
smpWebPort = False,
smpWebPortServers = SWPPreset,
tcpTimeout_ = Nothing,
logTLSErrors = False
}