Skip to content

GH-577: Use JVM proxy settings in Netty client#1027

Open
ennuite wants to merge 2 commits into
apache:mainfrom
ennuite:fix-jvm-proxy-settings
Open

GH-577: Use JVM proxy settings in Netty client#1027
ennuite wants to merge 2 commits into
apache:mainfrom
ennuite:fix-jvm-proxy-settings

Conversation

@ennuite
Copy link
Copy Markdown
Contributor

@ennuite ennuite commented Feb 23, 2026

What's Changed

The Flight SQL JDBC driver ignored JVM proxy settings (-Dhttps.proxyHost, -Dhttps.proxyPort). Connections would always go directly to the target host, bypassing any configured proxy.

Switched to NettyChannelBuilder.forAddress(host, port) for the TCP-based schemes. This causes gRPC to go through ProxySelector, which picks up the standard JVM proxy properties.

Are these changes tested?

Yes.

Added a test to ConnectionTest that installs a recording ProxySelector as the JVM default, opens a JDBC connection, and asserts that ProxySelector.select() was called. This directly validates that the driver participates in JVM proxy detection without requiring a real proxy server.

This change was created with AI assistance (Claude Code). All lines were manually reviewed by a human. The output is not copyrightable subject matter.

Closes #577.

@github-actions

This comment has been minimized.

@jbonofre jbonofre added the enhancement PRs that add or improve features. label Feb 23, 2026
@jbonofre jbonofre added this to the 20.0.0 milestone Feb 23, 2026
@jbonofre
Copy link
Copy Markdown
Member

As I'm close to release Arrow Java 19.0.0, I will consider this PR for 20.0.0.

@ennuite
Copy link
Copy Markdown
Contributor Author

ennuite commented Feb 23, 2026

@jbonofre yeah that makes sense, this one is still a draft as I have not finished work on it, I will ping you once I finish the PR. Should be ready in the next couple of days.

@ennuite ennuite force-pushed the fix-jvm-proxy-settings branch from ef9e0c5 to 1e44df0 Compare May 14, 2026 03:04
@ennuite ennuite marked this pull request as ready for review May 14, 2026 03:22
@ennuite
Copy link
Copy Markdown
Contributor Author

ennuite commented May 14, 2026

While the fix was in the NettyClientBuilder, the bug report concerned the JDBC driver. Because of that, I targeted the test at the driver, ensuring that the whole connection creation flow did not bypass proxies.

Let me know if it's worth it to expand the testing surface with a unit test closer to the place of the bug fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement PRs that add or improve features.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flight-SQL JDBC driver ignores JVM proxy settings

2 participants