From 4001475ae7a2c9581c27f3352152d4a281215f40 Mon Sep 17 00:00:00 2001 From: delta456 Date: Wed, 11 Dec 2024 23:19:36 +0530 Subject: [PATCH 1/3] Revert "add alias attr to all edge structs" This reverts commit f17dd08dd32998a310510f0abc44e5b484202a4d. --- rust/src/edge.rs | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/rust/src/edge.rs b/rust/src/edge.rs index 8b844dd718630..582a7f1717b38 100644 --- a/rust/src/edge.rs +++ b/rust/src/edge.rs @@ -555,42 +555,42 @@ impl SeleniumManager for EdgeManager { #[derive(Serialize, Deserialize, Debug)] pub struct EdgeProduct { - #[serde(rename = "Product", alias = "product")] + #[serde(rename = "Product")] pub product: String, - #[serde(rename = "Releases", alias = "releases")] + #[serde(rename = "Releases")] pub releases: Vec, } #[derive(Serialize, Deserialize, Debug)] pub struct Release { - #[serde(rename = "ReleaseId", alias = "releaseId")] + #[serde(rename = "ReleaseId")] pub release_id: u32, - #[serde(rename = "Platform", alias = "platform")] + #[serde(rename = "Platform")] pub platform: String, - #[serde(rename = "Architecture", alias = "architecture")] + #[serde(rename = "Architecture")] pub architecture: String, - #[serde(rename = "CVEs", alias = "cves")] + #[serde(rename = "CVEs")] pub cves: Vec, - #[serde(rename = "ProductVersion", alias = "productVersion")] + #[serde(rename = "ProductVersion")] pub product_version: String, - #[serde(rename = "Artifacts", alias = "artifacts")] + #[serde(rename = "Artifacts")] pub artifacts: Vec, - #[serde(rename = "PublishedTime", alias = "publishedTime")] + #[serde(rename = "PublishedTime")] pub published_time: String, - #[serde(rename = "ExpectedExpiryDate", alias = "expectedExpiryDate")] + #[serde(rename = "ExpectedExpiryDate")] pub expected_expiry_date: String, } #[derive(Serialize, Deserialize, Debug)] pub struct Artifact { - #[serde(rename = "ArtifactName", alias = "artifactName")] + #[serde(rename = "ArtifactName")] pub artifact_name: String, - #[serde(rename = "Location", alias = "location")] + #[serde(rename = "Location")] pub location: String, - #[serde(rename = "Hash", alias = "hash")] + #[serde(rename = "Hash")] pub hash: String, - #[serde(rename = "HashAlgorithm", alias = "hashAlgorithm")] + #[serde(rename = "HashAlgorithm")] pub hash_algorithm: String, - #[serde(rename = "SizeInBytes", alias = "sizeInBytes")] + #[serde(rename = "SizeInBytes")] pub size_in_bytes: u32, } From cab48c6006ba39041dea23753f7c1c6bf466961d Mon Sep 17 00:00:00 2001 From: delta456 Date: Thu, 19 Dec 2024 00:12:10 +0530 Subject: [PATCH 2/3] [c#] support IPv6 ports as well --- dotnet/src/webdriver/Internal/PortUtilities.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dotnet/src/webdriver/Internal/PortUtilities.cs b/dotnet/src/webdriver/Internal/PortUtilities.cs index 26c45a8b2688f..5908987428948 100644 --- a/dotnet/src/webdriver/Internal/PortUtilities.cs +++ b/dotnet/src/webdriver/Internal/PortUtilities.cs @@ -37,9 +37,11 @@ public static int FindFreePort() // an IPEndPoint using IPAddress.Any and port 0. The socket will // select a free port. int listeningPort = 0; - Socket portSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); + // Use a dual-stack socket (IPv6 family will support both IPv4 and IPv6) + Socket portSocket = new Socket(AddressFamily.InterNetworkV6, SocketType.Stream, ProtocolType.Tcp); try { + portSocket.SetSocketOption(SocketOptionLevel.IPv6, SocketOptionName.IPv6Only, false); IPEndPoint socketEndPoint = new IPEndPoint(IPAddress.Any, 0); portSocket.Bind(socketEndPoint); socketEndPoint = (IPEndPoint)portSocket.LocalEndPoint; From d0ad0bacba5f59c6a3c7310c272786c487ccfa31 Mon Sep 17 00:00:00 2001 From: delta456 Date: Thu, 19 Dec 2024 00:14:50 +0530 Subject: [PATCH 3/3] how --- rust/src/edge.rs | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/rust/src/edge.rs b/rust/src/edge.rs index 582a7f1717b38..8b844dd718630 100644 --- a/rust/src/edge.rs +++ b/rust/src/edge.rs @@ -555,42 +555,42 @@ impl SeleniumManager for EdgeManager { #[derive(Serialize, Deserialize, Debug)] pub struct EdgeProduct { - #[serde(rename = "Product")] + #[serde(rename = "Product", alias = "product")] pub product: String, - #[serde(rename = "Releases")] + #[serde(rename = "Releases", alias = "releases")] pub releases: Vec, } #[derive(Serialize, Deserialize, Debug)] pub struct Release { - #[serde(rename = "ReleaseId")] + #[serde(rename = "ReleaseId", alias = "releaseId")] pub release_id: u32, - #[serde(rename = "Platform")] + #[serde(rename = "Platform", alias = "platform")] pub platform: String, - #[serde(rename = "Architecture")] + #[serde(rename = "Architecture", alias = "architecture")] pub architecture: String, - #[serde(rename = "CVEs")] + #[serde(rename = "CVEs", alias = "cves")] pub cves: Vec, - #[serde(rename = "ProductVersion")] + #[serde(rename = "ProductVersion", alias = "productVersion")] pub product_version: String, - #[serde(rename = "Artifacts")] + #[serde(rename = "Artifacts", alias = "artifacts")] pub artifacts: Vec, - #[serde(rename = "PublishedTime")] + #[serde(rename = "PublishedTime", alias = "publishedTime")] pub published_time: String, - #[serde(rename = "ExpectedExpiryDate")] + #[serde(rename = "ExpectedExpiryDate", alias = "expectedExpiryDate")] pub expected_expiry_date: String, } #[derive(Serialize, Deserialize, Debug)] pub struct Artifact { - #[serde(rename = "ArtifactName")] + #[serde(rename = "ArtifactName", alias = "artifactName")] pub artifact_name: String, - #[serde(rename = "Location")] + #[serde(rename = "Location", alias = "location")] pub location: String, - #[serde(rename = "Hash")] + #[serde(rename = "Hash", alias = "hash")] pub hash: String, - #[serde(rename = "HashAlgorithm")] + #[serde(rename = "HashAlgorithm", alias = "hashAlgorithm")] pub hash_algorithm: String, - #[serde(rename = "SizeInBytes")] + #[serde(rename = "SizeInBytes", alias = "sizeInBytes")] pub size_in_bytes: u32, }