Remove: setting "no_http_content_downloads" (#12058)

As we now use HTTPS, it is very likely this will work on most systems.
For systems that do have HTTPS blocked, it will fail instantly,
and it will fallback to TCP anyway. That makes this setting no longer
very useful.
This commit is contained in:
Patric Stout 2024-02-11 15:48:12 +01:00 committed by GitHub
parent 8db08da148
commit d02b1547f6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 3 additions and 20 deletions

View File

@ -325,7 +325,7 @@ void ClientNetworkContentSocketHandler::DownloadSelectedContent(uint &files, uin
this->isCancelled = false;
if (_settings_client.network.no_http_content_downloads || fallback) {
if (fallback) {
this->DownloadSelectedContentFallback(content);
} else {
this->DownloadSelectedContentHTTP(content);

View File

@ -158,7 +158,7 @@ enum IniFileVersion : uint32_t {
IFV_PRIVATE_SECRETS, ///< 1 PR#9298 Moving of settings from openttd.cfg to private.cfg / secrets.cfg.
IFV_GAME_TYPE, ///< 2 PR#9515 Convert server_advertise to server_game_type.
IFV_LINKGRAPH_SECONDS, ///< 3 PR#10610 Store linkgraph update intervals in seconds instead of days.
IFV_NETWORK_PRIVATE_SETTINGS, ///< 4 PR#10762 Move no_http_content_downloads / use_relay_service to private settings.
IFV_NETWORK_PRIVATE_SETTINGS, ///< 4 PR#10762 Move use_relay_service to private settings.
IFV_AUTOSAVE_RENAME, ///< 5 PR#11143 Renamed values of autosave to be in minutes.
IFV_RIGHT_CLICK_CLOSE, ///< 6 PR#10204 Add alternative right click to close windows setting.
@ -1378,19 +1378,10 @@ void LoadFromConfig(bool startup)
_settings_newgame.linkgraph.recalc_time *= CalendarTime::SECONDS_PER_DAY;
}
/* Move no_http_content_downloads and use_relay_service from generic_ini to private_ini. */
/* Move use_relay_service from generic_ini to private_ini. */
if (generic_version < IFV_NETWORK_PRIVATE_SETTINGS) {
const IniGroup *network = generic_ini.GetGroup("network");
if (network != nullptr) {
const IniItem *no_http_content_downloads = network->GetItem("no_http_content_downloads");
if (no_http_content_downloads != nullptr) {
if (no_http_content_downloads->value == "true") {
_settings_client.network.no_http_content_downloads = true;
} else if (no_http_content_downloads->value == "false") {
_settings_client.network.no_http_content_downloads = false;
}
}
const IniItem *use_relay_service = network->GetItem("use_relay_service");
if (use_relay_service != nullptr) {
if (use_relay_service->value == "never") {
@ -1496,7 +1487,6 @@ void SaveToConfig()
if (generic_version < IFV_NETWORK_PRIVATE_SETTINGS) {
IniGroup *network = generic_ini.GetGroup("network");
if (network != nullptr) {
network->RemoveItem("no_http_content_downloads");
network->RemoveItem("use_relay_service");
}
}

View File

@ -330,7 +330,6 @@ struct NetworkSettings {
uint8_t min_active_clients; ///< minimum amount of active clients to unpause the game
bool reload_cfg; ///< reload the config file before restarting
std::string last_joined; ///< Last joined server
bool no_http_content_downloads; ///< do not do content downloads over HTTP
UseRelayService use_relay_service; ///< Use relay service?
ParticipateSurvey participate_survey; ///< Participate in the automated survey
};

View File

@ -76,12 +76,6 @@ flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
def = """"
cat = SC_EXPERT
[SDTC_BOOL]
var = network.no_http_content_downloads
flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
def = false
cat = SC_EXPERT
[SDTC_OMANY]
var = network.use_relay_service
type = SLE_UINT8