You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Deprecation tracked in #15905. FTP proxy was already removed from .NET (#16411) and Python (#16721).
💥 What does this PR do?
Removes deprecated FTP proxy support from the Java, JavaScript, and Ruby bindings — the last three still carrying it. FTP proxy is no longer part of the WebDriver spec; all bindings were deprecated in June 2025, well past the 2-release policy.
Java: Proxy.getFtpProxy() / Proxy.setFtpProxy() are gone.
JavaScript: proxy.manual() no longer accepts an ftp option (and no longer emits the runtime console.warn).
Ruby: Proxy#ftp / Proxy#ftp= and the ftp: constructor option are gone.
No binding emits ftpProxy in the serialized proxy capability anymore.
Inbound compatibility is preserved: an ftpProxy key arriving in a proxy capability from a server is silently ignored rather than erroring.
🔧 Implementation Notes
One Ruby spec used Proxy.new(ftp:) only to build a manual proxy with no HTTP URL (to assert the "expected HTTP proxy" error); switched to ssl:, which produces the same condition.
🤖 AI assistance
AI assisted (complete below)
Tool(s): Claude Code
What was generated: the removal across bindings and test updates
I reviewed all AI output and can explain the change
💡 Additional Considerations
🔄 Types of changes
Breaking change (fix or feature that would cause existing functionality to change)
Remove deprecated FTP proxy support in Java/JS/Ruby bindings
✨ Enhancement🧪 Tests🕐 20-40 Minutes
AI Description
• Remove deprecated FTP proxy APIs from Java, JavaScript, and Ruby bindings.
• Stop serializing ftpProxy into proxy capabilities; ignore inbound ftpProxy keys.
• Update unit tests and Firefox profile proxy preference wiring to match new behavior.
Diagram
graph TD
A["Java Proxy"] --> D["Proxy capability JSON"] --> E["WebDriver Server"] --> F["Proxy capability parse"] --> G{ "ftpProxy present?" }
B["JS proxy.manual"] --> D
C["Ruby Proxy"] --> D
G -->|"yes"| H["Ignore ftpProxy"]
G -->|"no"| I["Apply supported keys"]
Loading
High-Level Assessment
The following are alternative approaches to this PR:
1. Explicitly accept-and-drop ftpProxy during parsing
➕ Makes the inbound-compatibility intent obvious in code (vs relying on 'unknown key is ignored')
➕ Allows adding targeted tests asserting ftpProxy is ignored without reintroducing full support
➖ Slightly more code surface for a removed feature
➖ Risk of accidentally reintroducing serialization or API surface if not carefully isolated
2. Keep deprecated API stubs that throw a clear error
➕ Provides a clearer failure mode for consumers still calling FTP proxy APIs
➕ May reduce support burden by pointing users to replacement fields
➖ Still keeps FTP proxy in the public API surface, conflicting with removal goal
➖ Adds runtime behavior differences across bindings if not matched everywhere
Recommendation: Current approach is appropriate: remove the deprecated API surface and capability emission, while remaining tolerant of inbound ftpProxy keys by ignoring unknown capability fields. Consider adding an explicit parse-time ignore branch only if reviewers want the behavior to be self-documenting and directly testable without relying on generic 'unknown key' handling.
Files changed (11) +6 / -93
Refactor (6) +3 / -66
Proxy.javaRemove ftpProxy constant/field, JSON emission, and accessors+0/-35
Remove ftpProxy constant/field, JSON emission, and accessors
• Deletes the deprecated 'ftpProxy' capability key and associated state. Removes 'getFtpProxy'/'setFtpProxy' and stops including 'ftpProxy' in 'toJson()', 'toString()', 'equals()', and 'hashCode()'. Inbound 'ftpProxy' from a raw map is now ignored because it is no longer a recognized setter key.
proxy.jsDrop ftp option from manual proxy config and stop warning+3/-16
Drop ftp option from manual proxy config and stop warning
• Removes 'ManualConfig.prototype.ftpProxy' and eliminates the 'ftp' option from 'proxy.manual()'. Stops emitting the runtime deprecation 'console.warn' and no longer outputs 'ftpProxy' in the returned config object.
proxy.rbRemove ftp option and serialization from Ruby Proxy+0/-8
Remove ftp option and serialization from Ruby Proxy
• Removes 'ftp' from the set of allowed proxy options and deletes the 'ftp=' setter (including its deprecation logging). Stops emitting 'ftpProxy' in 'as_json', which also means 'Proxy.json_create' will ignore inbound 'ftpProxy' keys.
• Removes configuration of 'network.proxy.ftp' and 'network.proxy.ftp_port' from manual proxy profile wiring; only http/ssl/socks remain for manual proxy setup.
ProxyTest.javaUpdate Java Proxy tests to remove ftpProxy expectations+1/-19
Update Java Proxy tests to remove ftpProxy expectations
• Removes all test coverage for 'getFtpProxy'/'setFtpProxy' and 'ftpProxy' JSON/map handling. Updates the expected JSON size to reflect the removed key and removes null-key tests for 'ftpProxy'.
profile_spec.rbUpdate Firefox profile manual proxy spec to exclude FTP prefs+0/-3
Update Firefox profile manual proxy spec to exclude FTP prefs
• Stops constructing manual proxy configs with 'ftp:' and removes expectations that FTP prefs are written into 'user.js'. Keeps assertions for HTTP/SSL/no_proxy behavior.
default_spec.rbSwitch proxy type in HTTP client spec to keep same error condition+1/-1
Switch proxy type in HTTP client spec to keep same error condition
• Replaces 'Proxy.new(ftp: ...)' with 'Proxy.new(ssl: ...)' in the test that asserts an error when the proxy is not an HTTP proxy, preserving the test’s intent without relying on the removed option.
FTP proxy support was removed across Java (Proxy.getFtpProxy()/Proxy.setFtpProxy()), Ruby
(Proxy#ftp/Proxy#ftp= and ftp: constructor option), and JavaScript (proxy.manual({ftp: ...})
and ftpProxy emission), creating both compile-time and runtime breaking changes for downstream
users upgrading. This violates the requirement to maintain public API/ABI compatibility by removing
previously supported public interfaces and behaviors without compatibility measures.
- /**- * Gets the FTP proxy.- *- * @return the FTP proxy hostname if present, or null if not set- * @deprecated getFtpProxy is deprecated and will be removed in a future release.- */- @Deprecated- public @Nullable String getFtpProxy() {- return ftpProxy;- }-- /**- * Specify which proxy to use for FTP connections.- *- * @param ftpProxy the proxy host, expected format is <code>hostname.com:1234</code>- * @return reference to self- * @deprecated setFtpProxy is deprecated and will be removed in a future release.- */- @Deprecated- public Proxy setFtpProxy(String ftpProxy) {- verifyProxyTypeCompatibility(ProxyType.MANUAL);- this.proxyType = ProxyType.MANUAL;- this.ftpProxy = ftpProxy;- return this;- }
Evidence
PR Compliance ID 1 prohibits removing or breaking public interfaces without compatibility measures,
and the cited changes show FTP handling has been eliminated in each binding: the Java Proxy
implementation no longer contains FTP proxy parsing/serialization via an ftpProxy key, aligning
with the removal of the public getFtpProxy/setFtpProxy methods; in Ruby, ftp is no longer
included in ALLOWED, making ftp: an unknown option that raises ArgumentError, and the public
RBS signatures no longer declare ftp; and in JavaScript, the manual factory now only
destructures { http, https, bypass } and returns an object without ftpProxy, so prior calls like
proxy.manual({ftp: ...}) no longer have any effect.
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution
## Issue description
FTP proxy support was removed from public APIs/behaviors across Java, Ruby, and JavaScript (Java `Proxy.getFtpProxy()`/`Proxy.setFtpProxy()`, Ruby `Proxy#ftp`/`Proxy#ftp=` and `ftp:` constructor option, and JavaScript `proxy.manual({ftp: ...})` / `ftpProxy` output), causing downstream compile-time failures (Java) and runtime breakages (Ruby/JS) for previously valid configurations.
## Issue Context
PR Compliance ID 1 requires maintaining public API/ABI compatibility and avoiding breaking public interface changes without compatibility measures; even if functionality was previously discouraged or deprecated, outright removal of accepted options/methods and emitted fields breaks consumers on upgrade.
## Fix Focus Areas
- java/src/org/openqa/selenium/Proxy.java[66-124]
- java/src/org/openqa/selenium/Proxy.java[215-245]
- rb/lib/selenium/webdriver/common/proxy.rb[31-71]
- rb/sig/interfaces/proxy.rbs[19-39]
- rb/sig/lib/selenium/webdriver/common/proxy.rbs[19-79]
- javascript/selenium-webdriver/lib/proxy.js[130-156]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔗 Related Issues
Deprecation tracked in #15905. FTP proxy was already removed from .NET (#16411) and Python (#16721).
💥 What does this PR do?
Removes deprecated FTP proxy support from the Java, JavaScript, and Ruby bindings — the last three still carrying it. FTP proxy is no longer part of the WebDriver spec; all bindings were deprecated in June 2025, well past the 2-release policy.
Proxy.getFtpProxy()/Proxy.setFtpProxy()are gone.proxy.manual()no longer accepts anftpoption (and no longer emits the runtimeconsole.warn).Proxy#ftp/Proxy#ftp=and theftp:constructor option are gone.ftpProxyin the serialized proxy capability anymore.Inbound compatibility is preserved: an
ftpProxykey arriving in a proxy capability from a server is silently ignored rather than erroring.🔧 Implementation Notes
Proxy.new(ftp:)only to build a manual proxy with no HTTP URL (to assert the "expected HTTP proxy" error); switched tossl:, which produces the same condition.🤖 AI assistance
💡 Additional Considerations
🔄 Types of changes