diff --git a/dotnet/src/webdriver/Proxy.cs b/dotnet/src/webdriver/Proxy.cs index 675e7a44c6a67..bb11e94624d09 100644 --- a/dotnet/src/webdriver/Proxy.cs +++ b/dotnet/src/webdriver/Proxy.cs @@ -72,7 +72,6 @@ public class Proxy { private ProxyKind proxyKind = ProxyKind.Unspecified; private bool isAutoDetect; - private string? ftpProxyLocation; private string? httpProxyLocation; private string? proxyAutoConfigUrl; private string? sslProxyLocation; @@ -116,11 +115,6 @@ public Proxy(Dictionary settings) } } - if (settings.TryGetValue("ftpProxy", out object? ftpProxyObj) && ftpProxyObj?.ToString() is string ftpProxy) - { - this.FtpProxy = ftpProxy; - } - if (settings.TryGetValue("httpProxy", out object? httpProxyObj) && httpProxyObj?.ToString() is string httpProxy) { this.HttpProxy = httpProxy; @@ -236,24 +230,6 @@ public bool IsAutoDetect } } - /// - /// Gets or sets the value of the proxy for the FTP protocol. - /// - [JsonPropertyName("ftpProxy")] - [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] - [Obsolete("FTP proxy support is deprecated and will be removed in the 4.37 version.")] - public string? FtpProxy - { - get => this.ftpProxyLocation; - - set - { - this.VerifyProxyTypeCompatilibily(ProxyKind.Manual); - this.proxyKind = ProxyKind.Manual; - this.ftpProxyLocation = value; - } - } - /// /// Gets or sets the value of the proxy for the HTTP protocol. /// @@ -494,11 +470,6 @@ public void AddBypassAddresses(IEnumerable addressesToAdd) serializedDictionary["sslProxy"] = this.sslProxyLocation; } - if (!string.IsNullOrEmpty(this.ftpProxyLocation)) - { - serializedDictionary["ftpProxy"] = this.ftpProxyLocation; - } - if (!string.IsNullOrEmpty(this.socksProxyLocation)) { if (!this.socksVersion.HasValue) diff --git a/dotnet/test/common/ProxyTest.cs b/dotnet/test/common/ProxyTest.cs index 0af687bf99ada..2f0e5ab816e40 100644 --- a/dotnet/test/common/ProxyTest.cs +++ b/dotnet/test/common/ProxyTest.cs @@ -31,7 +31,6 @@ public void NotInitializedProxy() Proxy proxy = new Proxy(); Assert.That(proxy.Kind, Is.EqualTo(ProxyKind.Unspecified)); - Assert.That(proxy.FtpProxy, Is.Null); Assert.That(proxy.HttpProxy, Is.Null); Assert.That(proxy.SslProxy, Is.Null); Assert.That(proxy.SocksProxy, Is.Null); @@ -54,7 +53,6 @@ public void CanNotChangeAlreadyInitializedProxyType() Assert.That(() => proxy.SocksUserName = "", Throws.InvalidOperationException); Assert.That(() => proxy.SocksProxy = "", Throws.InvalidOperationException); Assert.That(() => proxy.SocksVersion = 5, Throws.InvalidOperationException); - Assert.That(() => proxy.FtpProxy = "", Throws.InvalidOperationException); Assert.That(() => proxy.HttpProxy = "", Throws.InvalidOperationException); Assert.That(() => proxy.SslProxy = "", Throws.InvalidOperationException); Assert.That(() => proxy.ProxyAutoConfigUrl = "", Throws.InvalidOperationException); @@ -73,7 +71,6 @@ public void ManualProxy() Proxy proxy = new Proxy(); proxy.HttpProxy = "http.proxy:1234"; - proxy.FtpProxy = "ftp.proxy"; proxy.SslProxy = "ssl.proxy"; proxy.AddBypassAddresses("localhost", "127.0.0.*"); proxy.SocksProxy = "socks.proxy:65555"; @@ -82,7 +79,6 @@ public void ManualProxy() proxy.SocksPassword = "test2"; Assert.That(proxy.Kind, Is.EqualTo(ProxyKind.Manual)); - Assert.That(proxy.FtpProxy, Is.EqualTo("ftp.proxy")); Assert.That(proxy.HttpProxy, Is.EqualTo("http.proxy:1234")); Assert.That(proxy.SslProxy, Is.EqualTo("ssl.proxy")); Assert.That(proxy.SocksProxy, Is.EqualTo("socks.proxy:65555")); @@ -104,7 +100,6 @@ public void PACProxy() Assert.That(proxy.Kind, Is.EqualTo(ProxyKind.ProxyAutoConfigure)); Assert.That(proxy.ProxyAutoConfigUrl, Is.EqualTo("http://aaa/bbb.pac")); - Assert.That(proxy.FtpProxy, Is.Null); Assert.That(proxy.HttpProxy, Is.Null); Assert.That(proxy.SslProxy, Is.Null); Assert.That(proxy.SocksProxy, Is.Null); @@ -124,7 +119,6 @@ public void AutoDetectProxy() Assert.That(proxy.Kind, Is.EqualTo(ProxyKind.AutoDetect)); Assert.That(proxy.IsAutoDetect, Is.True); - Assert.That(proxy.FtpProxy, Is.Null); Assert.That(proxy.HttpProxy, Is.Null); Assert.That(proxy.SslProxy, Is.Null); Assert.That(proxy.SocksProxy, Is.Null); @@ -153,7 +147,6 @@ public void ManualProxyFromDictionary() Proxy proxy = new Proxy(proxyData); Assert.That(proxy.Kind, Is.EqualTo(ProxyKind.Manual)); - Assert.That(proxy.FtpProxy, Is.EqualTo("ftp.proxy")); Assert.That(proxy.HttpProxy, Is.EqualTo("http.proxy:1234")); Assert.That(proxy.SslProxy, Is.EqualTo("ssl.proxy")); Assert.That(proxy.SocksProxy, Is.EqualTo("socks.proxy:65555")); @@ -199,7 +192,6 @@ public void PacProxyFromDictionary() Assert.That(proxy.Kind, Is.EqualTo(ProxyKind.ProxyAutoConfigure)); Assert.That(proxy.ProxyAutoConfigUrl, Is.EqualTo("http://aaa/bbb.pac")); - Assert.That(proxy.FtpProxy, Is.Null); Assert.That(proxy.HttpProxy, Is.Null); Assert.That(proxy.SslProxy, Is.Null); Assert.That(proxy.SocksProxy, Is.Null); @@ -222,7 +214,6 @@ public void AutoDetectProxyFromDictionary() Assert.That(proxy.Kind, Is.EqualTo(ProxyKind.AutoDetect)); Assert.That(proxy.IsAutoDetect, Is.True); - Assert.That(proxy.FtpProxy, Is.Null); Assert.That(proxy.HttpProxy, Is.Null); Assert.That(proxy.SslProxy, Is.Null); Assert.That(proxy.SocksProxy, Is.Null); @@ -243,7 +234,6 @@ public void SystemProxyFromDictionary() Assert.That(proxy.Kind, Is.EqualTo(ProxyKind.System)); - Assert.That(proxy.FtpProxy, Is.Null); Assert.That(proxy.HttpProxy, Is.Null); Assert.That(proxy.SslProxy, Is.Null); Assert.That(proxy.SocksProxy, Is.Null); @@ -265,7 +255,6 @@ public void DirectProxyFromDictionary() Assert.That(proxy.Kind, Is.EqualTo(ProxyKind.Direct)); - Assert.That(proxy.FtpProxy, Is.Null); Assert.That(proxy.HttpProxy, Is.Null); Assert.That(proxy.SslProxy, Is.Null); Assert.That(proxy.SocksProxy, Is.Null); @@ -281,13 +270,11 @@ public void DirectProxyFromDictionary() public void ConstructingWithNullKeysWorksAsExpected() { Dictionary rawProxy = new Dictionary(); - rawProxy.Add("ftpProxy", null); rawProxy.Add("httpProxy", "http://www.example.com"); rawProxy.Add("autodetect", null); Proxy proxy = new Proxy(rawProxy); - Assert.That(proxy.FtpProxy, Is.Null); Assert.That(proxy.IsAutoDetect, Is.False); Assert.That(proxy.HttpProxy, Is.EqualTo("http://www.example.com")); }