Edgegap Hosting: updated to latest version for fixes and Websocket support

This commit is contained in:
mischa 2024-01-27 10:55:14 +01:00
parent 7a2cae3cfd
commit 86805e82d2
4 changed files with 10 additions and 9 deletions

View File

@ -11,5 +11,8 @@ public enum ProtocolType
/// <summary>Slower, but more reliable; works in WebGL.</summary>
TCP,
/// <summary>Slower, but more reliable; works in WebGL.</summary>
WS,
}
}

View File

@ -61,7 +61,7 @@ public class UpdateAppVersionRequest
#endregion // (!) Shows in API docs for PATCH, but could be CREATE only? "Unknown Args"
[JsonProperty("max_duration")]
public int MaxDuration { get; set; } = 30;
public int MaxDuration { get; set; } = 60;
[JsonProperty("use_telemetry")]
public bool UseTelemetry { get; set; } = true;
@ -70,7 +70,7 @@ public class UpdateAppVersionRequest
public bool InjectContextEnv { get; set; } = true;
[JsonProperty("whitelisting_active")]
public bool WhitelistingActive { get; set; } = true;
public bool WhitelistingActive { get; set; } = false;
[JsonProperty("force_cache")]
public bool ForceCache { get; set; }
@ -82,7 +82,7 @@ public class UpdateAppVersionRequest
public int CacheMaxHour { get; set; }
[JsonProperty("time_to_deploy")]
public int TimeToDeploy { get; set; } = 15;
public int TimeToDeploy { get; set; } = 120;
[JsonProperty("enable_all_locations")]
public bool EnableAllLocations { get; set; }

View File

@ -237,10 +237,10 @@ private void setVisualElementsToFields()
_containerRegistryFoldout = rootVisualElement.Q<Foldout>(EdgegapWindowMetadata.CONTAINER_REGISTRY_FOLDOUT_ID);
_containerNewTagVersionInput = rootVisualElement.Q<TextField>(EdgegapWindowMetadata.CONTAINER_NEW_TAG_VERSION_TXT_ID);
_containerPortNumInput = rootVisualElement.Q<TextField>(EdgegapWindowMetadata.CONTAINER_REGISTRY_PORT_NUM_ID);
// MIRROR CHANGE: dynamically resolving PortType fails if not in Assembly-CSharp-Editor.dll. Hardcode UDP/TCP instead.
// MIRROR CHANGE: dynamically resolving PortType fails if not in Assembly-CSharp-Editor.dll. Hardcode UDP/TCP/WS instead.
// this finds the placeholder and dynamically replaces it with a popup field
VisualElement dropdownPlaceholder = rootVisualElement.Q<VisualElement>("MIRROR_CHANGE_PORT_HARDCODED");
List<string> options = new List<string> { "UDP", "TCP" };
List<string> options = Enum.GetNames(typeof(ProtocolType)).Cast<string>().ToList();
_containerTransportTypeEnumInput = new PopupField<string>("Protocol Type", options, 0);
dropdownPlaceholder.Add(_containerTransportTypeEnumInput);
// END MIRROR CHANGE
@ -1606,6 +1606,7 @@ private async Task buildAndPushServerAsync()
{
Port = int.Parse(_containerPortNumInput.value), // OnInputChange clamps + validates,
ProtocolStr = _containerTransportTypeEnumInput.value.ToString(),
TlsUpgrade = _containerTransportTypeEnumInput.value.ToString() == ProtocolType.WS.ToString() // If the protocol is WebSocket, we seemlessly add tls_upgrade. If we want to add it to other protocols, we need to change this.
},
};

View File

@ -3,10 +3,7 @@ guid: 1c3d4497250ad3e4aa500d4c599b30fe
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences:
- m_ViewDataDictionary: {instanceID: 0}
- LogoImage: {fileID: 2800000, guid: b7012da4ebf9008458abc3ef9a741f3c, type: 3}
- ClipboardImage: {fileID: 2800000, guid: caa516cdb721dd143bbc8000ca78d50a, type: 3}
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData: