added insecure-networking advanced option

This commit is contained in:
Eric 2024-11-06 15:27:13 -08:00
parent f03eb5fc6f
commit 1154843f52
No known key found for this signature in database
GPG Key ID: 89C93F0F8D6D5A98
8 changed files with 125 additions and 61 deletions

98
.efrocachemap generated
View File

@ -421,21 +421,21 @@
"build/assets/ba_data/audio/zoeOw.ogg": "74befe45a8417e95b6a2233c51992a26",
"build/assets/ba_data/audio/zoePickup01.ogg": "48ab8cddfcde36a750856f3f81dd20c8",
"build/assets/ba_data/audio/zoeScream01.ogg": "2b468aedfa8741090247f04eb9e6df55",
"build/assets/ba_data/data/langdata.json": "09c12ac33695c54895dd9ff2094785fb",
"build/assets/ba_data/data/langdata.json": "f948f1e450a3e7aad4fa7bc6de3a5cef",
"build/assets/ba_data/data/languages/arabic.json": "4a6fc46285d6289ee14a7ccd9e801ac4",
"build/assets/ba_data/data/languages/belarussian.json": "3d5523d0004293aa2df02f3f6f3b84f8",
"build/assets/ba_data/data/languages/chinese.json": "57d199cfd2a5cf493e777dd96cc12f7c",
"build/assets/ba_data/data/languages/chinesetraditional.json": "d85c58cc1e0e4bd0b09b2bc768cb1971",
"build/assets/ba_data/data/languages/chinesetraditional.json": "904b35b656c53f9830e406565edd5120",
"build/assets/ba_data/data/languages/croatian.json": "b23619cb396ac16640c47458f884b16a",
"build/assets/ba_data/data/languages/czech.json": "7f123919752ed1e9de5bd06b46fa811e",
"build/assets/ba_data/data/languages/danish.json": "8e57db30c5250df2abff14a822f83ea7",
"build/assets/ba_data/data/languages/dutch.json": "734357560f53b4820221f6d60a0b79e8",
"build/assets/ba_data/data/languages/english.json": "a13015c5fea152cf84f5988e5cab9298",
"build/assets/ba_data/data/languages/english.json": "dffc4a03b94c74f11da188a7c4187eda",
"build/assets/ba_data/data/languages/esperanto.json": "0e397cfa5f3fb8cef5f4a64f21cda880",
"build/assets/ba_data/data/languages/filipino.json": "69c01f1ff6783db2c43e268372719236",
"build/assets/ba_data/data/languages/french.json": "e0bf81cff0497dd84044442606cc878e",
"build/assets/ba_data/data/languages/german.json": "c4b8c4d3c078b7902155af3221cf9cf4",
"build/assets/ba_data/data/languages/gibberish.json": "48bd2b7f70bdb76ac217c27c06f7a294",
"build/assets/ba_data/data/languages/german.json": "c979cb1397d53a1e5b6c9a7becf83072",
"build/assets/ba_data/data/languages/gibberish.json": "2efafa7c1d479ce1fa46e897739508e5",
"build/assets/ba_data/data/languages/greek.json": "d28d1092fbb00ed857cbd53124c0dc78",
"build/assets/ba_data/data/languages/hindi.json": "5f60453c7dd3853c95c6f822e92d5300",
"build/assets/ba_data/data/languages/hungarian.json": "9d88004a98f0fbe2ea72edd5e0b3002e",
@ -4099,50 +4099,50 @@
"build/assets/windows/Win32/ucrtbased.dll": "2def5335207d41b21b9823f6805997f1",
"build/assets/windows/Win32/vc_redist.x86.exe": "b08a55e2e77623fe657bea24f223a3ae",
"build/assets/windows/Win32/vcruntime140d.dll": "865b2af4d1e26a1a8073c89acb06e599",
"build/prefab/full/linux_arm64_gui/debug/ballisticakit": "96c8b2875f759dbd62ca3464afadad02",
"build/prefab/full/linux_arm64_gui/release/ballisticakit": "1528d2d47004755d4b916cc0e13bfc69",
"build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "3bfbbe12773fbc65a0fd935f234667ca",
"build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "a8c1ad7a374fe208314c1e5dfe94c996",
"build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "47efde47649457e220344dc86af0986e",
"build/prefab/full/linux_x86_64_gui/release/ballisticakit": "15870676b641fcf7691a9b65d40e0e72",
"build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "6e64a3871db7412502638b600c2e5ad6",
"build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "c6bdbc0adfc913a3827e9d5652ab22bb",
"build/prefab/full/mac_arm64_gui/debug/ballisticakit": "b1f4619e818c9e045a9db9e42aebef6f",
"build/prefab/full/mac_arm64_gui/release/ballisticakit": "3920af12205757a3490445320e68b181",
"build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "2b6aa7c94505a7bdc916716b7e7cf916",
"build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "97aad1e0b6b03d468c3be3d6cf0b6c81",
"build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "52b8cde9fd2fe8f3772ed4ed10a7c5c0",
"build/prefab/full/mac_x86_64_gui/release/ballisticakit": "afc0cbab491c752fe93dcb575c0d843c",
"build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "ee8269b0e494f087c0a57747fba1b3eb",
"build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "c91ed4a529404aa53aace29d16f8ae7e",
"build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "a216397f133797bd7754d55233a8abdf",
"build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "7de8eb9429b3faece9c11294f29a4095",
"build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "45afa7775f0a9cade7253367013453e0",
"build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "8ac6cce6ef95b4957473fb0377b048fd",
"build/prefab/lib/linux_arm64_gui/debug/libballisticaplus.a": "8c667cd77a82124b48c50630b2dd4aed",
"build/prefab/lib/linux_arm64_gui/release/libballisticaplus.a": "7e6824b45b74266c09823109b5a7069f",
"build/prefab/lib/linux_arm64_server/debug/libballisticaplus.a": "8c667cd77a82124b48c50630b2dd4aed",
"build/prefab/lib/linux_arm64_server/release/libballisticaplus.a": "7e6824b45b74266c09823109b5a7069f",
"build/prefab/lib/linux_x86_64_gui/debug/libballisticaplus.a": "ee9800f3b72862f087ced2ef382d39f1",
"build/prefab/lib/linux_x86_64_gui/release/libballisticaplus.a": "1e121312835e14cfecc7ee3d26f57439",
"build/prefab/lib/linux_x86_64_server/debug/libballisticaplus.a": "ee9800f3b72862f087ced2ef382d39f1",
"build/prefab/lib/linux_x86_64_server/release/libballisticaplus.a": "1e121312835e14cfecc7ee3d26f57439",
"build/prefab/lib/mac_arm64_gui/debug/libballisticaplus.a": "7b8ba069d9ca2edc257f6868fc9e9df9",
"build/prefab/lib/mac_arm64_gui/release/libballisticaplus.a": "a237f9e945d1a416be9aa913b5d60705",
"build/prefab/lib/mac_arm64_server/debug/libballisticaplus.a": "7b8ba069d9ca2edc257f6868fc9e9df9",
"build/prefab/lib/mac_arm64_server/release/libballisticaplus.a": "a237f9e945d1a416be9aa913b5d60705",
"build/prefab/lib/mac_x86_64_gui/debug/libballisticaplus.a": "920f39fc5155d9c41b96ff01a88a5020",
"build/prefab/lib/mac_x86_64_gui/release/libballisticaplus.a": "c39bcd7db4fd85f1b59855aeaf966070",
"build/prefab/lib/mac_x86_64_server/debug/libballisticaplus.a": "a0abd47869e753575f06a4336659ca79",
"build/prefab/lib/mac_x86_64_server/release/libballisticaplus.a": "c39bcd7db4fd85f1b59855aeaf966070",
"build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "12e6257d149d6ccad51bf6264012e41f",
"build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "e53c04082290060b4288bf7b50fc93b7",
"build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "fa784484b0b7af1e87c8018dccf0451b",
"build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "399cd16520bf51854e6d45581d914607",
"build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "4be0625f239b0478e738946d93b3062d",
"build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "c561bd08c1c2f589e46682bb79f9b264",
"build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "ff3b606105f73375658c5deefa90b286",
"build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "03dc78462c9fdbb3dfd371b2f9089b70",
"build/prefab/full/linux_arm64_gui/debug/ballisticakit": "65570e582e00c4dfc735d397a1a67f44",
"build/prefab/full/linux_arm64_gui/release/ballisticakit": "4294913d4a8e2127fb11843ba9a5ee98",
"build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "674203f03c045b37be45e52e658218eb",
"build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "4c308de14f3843175a461e4acb00049a",
"build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "0447540479acbe495cff2ede29f862a6",
"build/prefab/full/linux_x86_64_gui/release/ballisticakit": "b6186b60bce92fefc94287391175a34d",
"build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "6b4143cc6a78b30ddb5e9468a556ebff",
"build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "992a7e69d5dc5184b08f0ae3a7542393",
"build/prefab/full/mac_arm64_gui/debug/ballisticakit": "e8572d287db0d4ecdd7971381b4d403b",
"build/prefab/full/mac_arm64_gui/release/ballisticakit": "d19bf540e166005b5005621d16f2ff5c",
"build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "e79932a3bd315b5a0c5139bfb7240ee8",
"build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "d28f86dfe3d4a5d69382f30fea024835",
"build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "029625365e535ead70acbb124d8c23db",
"build/prefab/full/mac_x86_64_gui/release/ballisticakit": "cc7ff48639b6fd058c4f0a8aa9f9fe25",
"build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "e67fa708561f1c039b5f4bbb6e614e57",
"build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "c68d7c2b820a9fb008383bad70785ada",
"build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "ba682a1a523fc43e396ed11ce092d81b",
"build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "d6bd6efec4f0b8cd2fe50fd3b8f4b45e",
"build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "22210920ec2f6e489d8e365f557a806a",
"build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "8aaec6111219f9408d9d7be3d1e6508c",
"build/prefab/lib/linux_arm64_gui/debug/libballisticaplus.a": "d5ac5ee2702f74d141909493069223eb",
"build/prefab/lib/linux_arm64_gui/release/libballisticaplus.a": "34c426ee917a95a458c61cf87e1afe65",
"build/prefab/lib/linux_arm64_server/debug/libballisticaplus.a": "d5ac5ee2702f74d141909493069223eb",
"build/prefab/lib/linux_arm64_server/release/libballisticaplus.a": "34c426ee917a95a458c61cf87e1afe65",
"build/prefab/lib/linux_x86_64_gui/debug/libballisticaplus.a": "4272c6d009ee344afd022a961e06a394",
"build/prefab/lib/linux_x86_64_gui/release/libballisticaplus.a": "c7e90a3be277572394a989f72edff0b2",
"build/prefab/lib/linux_x86_64_server/debug/libballisticaplus.a": "4272c6d009ee344afd022a961e06a394",
"build/prefab/lib/linux_x86_64_server/release/libballisticaplus.a": "c7e90a3be277572394a989f72edff0b2",
"build/prefab/lib/mac_arm64_gui/debug/libballisticaplus.a": "eea1cf561d09b23812cfb7b79b9b300d",
"build/prefab/lib/mac_arm64_gui/release/libballisticaplus.a": "bfb71dbdef6c2348947ce92c24741acd",
"build/prefab/lib/mac_arm64_server/debug/libballisticaplus.a": "eea1cf561d09b23812cfb7b79b9b300d",
"build/prefab/lib/mac_arm64_server/release/libballisticaplus.a": "bfb71dbdef6c2348947ce92c24741acd",
"build/prefab/lib/mac_x86_64_gui/debug/libballisticaplus.a": "3fd926f0b0af92b2f507ba580489e108",
"build/prefab/lib/mac_x86_64_gui/release/libballisticaplus.a": "40e842df4766706c0ba08b77b2c611fb",
"build/prefab/lib/mac_x86_64_server/debug/libballisticaplus.a": "f3dfb5baf5b3243ba07ab09f294eba27",
"build/prefab/lib/mac_x86_64_server/release/libballisticaplus.a": "40e842df4766706c0ba08b77b2c611fb",
"build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "11a73e507f15315eb43afe0a7a21d667",
"build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "40c3bc51216752529989ca3b19b583ad",
"build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "c3f9911ee02e2ffe63e019e2c6768f60",
"build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "407ee17f98b1503b8ae5c66ad987a850",
"build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "d113d24cea1c74f64946bb80c21bcc15",
"build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "e2d9906062e1e2a2d43ce8149d8c6174",
"build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "11f14133361f51635e12b76d9aeccd04",
"build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "bee54e37161cde5606ef2a6f24ffaadb",
"src/assets/ba_data/python/babase/_mgen/__init__.py": "f885fed7f2ed98ff2ba271f9dbe3391c",
"src/assets/ba_data/python/babase/_mgen/enums.py": "794d258d59fd17a61752843a9a0551ad",
"src/ballistica/base/mgen/pyembed/binding_base.inc": "3a583e7e03bd4907b21adc3bf5729d15",

View File

@ -1,4 +1,4 @@
### 1.7.37 (build 22071, api 9, 2024-11-04)
### 1.7.37 (build 22075, api 9, 2024-11-06)
- I am pleased to announce that after years of hard work from many members of
the community, PirateSpeak is now complete and available as a language choice.
This changes everything.
@ -141,6 +141,9 @@
dev-console. Note that this will copy all cached log history; not just what is
displayed in the dev-console. This should be handy for diagnosing problems in
the future.
- (build 22072) Added a 'Use insecure connections' option in settings ->
advanced. This may make it possible to play from places such as Iran where ssl
connections are being blocked. Do not enable this if you don't need to.
### 1.7.36 (build 21944, api 8, 2024-07-26)
- Wired up Tokens, BombSquad's new purchasable currency. The first thing these

View File

@ -53,7 +53,7 @@ if TYPE_CHECKING:
# Build number and version of the ballistica binary we expect to be
# using.
TARGET_BALLISTICA_BUILD = 22071
TARGET_BALLISTICA_BUILD = 22075
TARGET_BALLISTICA_VERSION = '1.7.37'

View File

@ -1,5 +1,7 @@
# Released under the MIT License. See LICENSE for details.
#
# pylint: disable=too-many-lines
"""UI functionality for advanced settings."""
from __future__ import annotations
@ -94,6 +96,10 @@ class AdvancedSettingsWindow(bui.MainWindow):
if self._show_disable_gyro:
self._sub_height += 42
self._show_use_insecure_connections = True
if self._show_use_insecure_connections:
self._sub_height += 82
self._do_vr_test_button = app.env.vr
self._do_net_test_button = True
self._extra_button_spacing = self._spacing * 2.5
@ -527,6 +533,47 @@ class AdvancedSettingsWindow(bui.MainWindow):
maxwidth=430,
)
self._use_insecure_connections_check_box: ConfigCheckBox | None
if self._show_use_insecure_connections:
v -= 42
self._use_insecure_connections_check_box = ConfigCheckBox(
parent=self._subcontainer,
position=(50, v),
size=(self._sub_width - 100, 30),
configkey='Use Insecure Connections',
autoselect=True,
# displayname='USE INSECURE CONNECTIONS',
displayname=bui.Lstr(
resource=(f'{self._r}.insecureConnectionsText')
),
# displayname=bui.Lstr(
# resource=f'{self._r}.alwaysUseInternalKeyboardText'
# ),
scale=1.0,
maxwidth=430,
)
bui.textwidget(
parent=self._subcontainer,
position=(90, v - 20),
size=(0, 0),
# text=(
# 'not recommended, but may allow online play\n'
# 'from restricted countries or networks'
# ),
text=bui.Lstr(
resource=(f'{self._r}.insecureConnectionsDescriptionText')
),
maxwidth=400,
flatness=1.0,
scale=0.65,
color=(0.4, 0.9, 0.4, 0.8),
h_align='left',
v_align='center',
)
v -= 40
else:
self._use_insecure_connections_check_box = None
self._always_use_internal_keyboard_check_box: ConfigCheckBox | None
if self._show_always_use_internal_keyboard:
v -= 42
@ -826,6 +873,11 @@ class AdvancedSettingsWindow(bui.MainWindow):
== self._always_use_internal_keyboard_check_box.widget
):
sel_name = 'AlwaysUseInternalKeyboard'
elif (
self._use_insecure_connections_check_box is not None
and sel == self._use_insecure_connections_check_box.widget
):
sel_name = 'UseInsecureConnections'
elif (
self._disable_gyro_check_box is not None
and sel == self._disable_gyro_check_box.widget
@ -862,6 +914,7 @@ class AdvancedSettingsWindow(bui.MainWindow):
def _restore_state(self) -> None:
# pylint: disable=too-many-branches
# pylint: disable=too-many-statements
try:
assert bui.app.classic is not None
sel_name = bui.app.ui_v1.window_states.get(type(self), {}).get(
@ -896,6 +949,11 @@ class AdvancedSettingsWindow(bui.MainWindow):
and self._always_use_internal_keyboard_check_box is not None
):
sel = self._always_use_internal_keyboard_check_box.widget
elif (
sel_name == 'UseInsecureConnections'
and self._use_insecure_connections_check_box is not None
):
sel = self._use_insecure_connections_check_box.widget
elif (
sel_name == 'DisableGyro'
and self._disable_gyro_check_box is not None

View File

@ -298,28 +298,28 @@ void BasePython::StorePreEnv(PyObject* obj) {
}
void BasePython::SetRawConfigValue(const char* name, float value) {
assert(g_base->InLogicThread());
assert(Python::HaveGIL());
assert(objs().Exists(ObjID::kConfig));
PythonRef value_obj(PyFloat_FromDouble(value), PythonRef::kSteal);
int result = PyDict_SetItemString(objs().Get(ObjID::kConfig).Get(), name,
value_obj.Get());
if (result == -1) {
// Failed, we have.
// Clear any Python error that got us here; we're in C++ Exception land now.
// Failed, we have. Clear any Python error that got us here; we're in
// C++ Exception land now.
PyErr_Clear();
throw Exception("Error setting config dict value.");
}
}
auto BasePython::GetRawConfigValue(const char* name) -> PyObject* {
assert(g_base->InLogicThread());
assert(Python::HaveGIL());
assert(objs().Exists(ObjID::kConfig));
return PyDict_GetItemString(objs().Get(ObjID::kConfig).Get(), name);
}
auto BasePython::GetRawConfigValue(const char* name, const char* default_value)
-> std::string {
assert(g_base->InLogicThread());
assert(Python::HaveGIL());
assert(objs().Exists(ObjID::kConfig));
PyObject* value =
PyDict_GetItemString(objs().Get(ObjID::kConfig).Get(), name);
@ -331,7 +331,7 @@ auto BasePython::GetRawConfigValue(const char* name, const char* default_value)
auto BasePython::GetRawConfigValue(const char* name, float default_value)
-> float {
assert(g_base->InLogicThread());
assert(Python::HaveGIL());
assert(objs().Exists(ObjID::kConfig));
PyObject* value =
PyDict_GetItemString(objs().Get(ObjID::kConfig).Get(), name);
@ -351,7 +351,7 @@ auto BasePython::GetRawConfigValue(const char* name, float default_value)
auto BasePython::GetRawConfigValue(const char* name,
std::optional<float> default_value)
-> std::optional<float> {
assert(g_base->InLogicThread());
assert(Python::HaveGIL());
assert(objs().Exists(ObjID::kConfig));
PyObject* value =
PyDict_GetItemString(objs().Get(ObjID::kConfig).Get(), name);
@ -372,7 +372,7 @@ auto BasePython::GetRawConfigValue(const char* name,
}
auto BasePython::GetRawConfigValue(const char* name, int default_value) -> int {
assert(g_base->InLogicThread());
assert(Python::HaveGIL());
assert(objs().Exists(ObjID::kConfig));
PyObject* value =
PyDict_GetItemString(objs().Get(ObjID::kConfig).Get(), name);
@ -391,7 +391,7 @@ auto BasePython::GetRawConfigValue(const char* name, int default_value) -> int {
auto BasePython::GetRawConfigValue(const char* name, bool default_value)
-> bool {
assert(g_base->InLogicThread());
assert(Python::HaveGIL());
assert(objs().Exists(ObjID::kConfig));
PyObject* value =
PyDict_GetItemString(objs().Get(ObjID::kConfig).Get(), name);

View File

@ -220,6 +220,8 @@ void AppConfig::SetupEntries() {
bool_entries_[BoolID::kAlwaysUseInternalKeyboard] =
BoolEntry("Always Use Internal Keyboard", false);
bool_entries_[BoolID::kUseInsecureConnections] =
BoolEntry("Use Insecure Connections", false);
bool_entries_[BoolID::kShowFPS] = BoolEntry("Show FPS", false);
bool_entries_[BoolID::kShowPing] = BoolEntry("Show Ping", false);
bool_entries_[BoolID::kShowDevConsoleButton] =

View File

@ -64,6 +64,7 @@ class AppConfig {
kFullscreen,
kKickIdlePlayers,
kAlwaysUseInternalKeyboard,
kUseInsecureConnections,
kShowFPS,
kShowPing,
kShowDevConsoleButton,

View File

@ -39,7 +39,7 @@ auto main(int argc, char** argv) -> int {
namespace ballistica {
// These are set automatically via script; don't modify them here.
const int kEngineBuildNumber = 22071;
const int kEngineBuildNumber = 22075;
const char* kEngineVersion = "1.7.37";
const int kEngineApiVersion = 9;