Skip to content

Adopt shared lib-util-net ProxyConfig for egress proxy handling - #7587

Merged
pditommaso merged 1 commit into
masterfrom
claude/adopt-lib-util-net-proxyconfig
Sep 8, 2026
Merged

pditommaso merged 1 commit into
masterfrom
claude/adopt-lib-util-net-proxyconfig

Conversation

@pditommaso

Copy link
Copy Markdown
Member

Summary

Replaces Nextflow's hand-rolled egress-proxy resolution with the shared io.seqera.util.net.ProxyConfig from io.seqera:lib-util-net:0.2.0, so the URI/env parsing, no-proxy matching and proxy authenticator live in one place shared with Wave and lib-httpx (rather than being duplicated in nextflow.util.ProxyConfig, HxProxyConfig, and elsewhere).

Net +54 / −521 lines.

Changes

  • nextflow.util.ProxyConfig — now a thin holder. The launcher's per-protocol env scanning, system-property installation (<proto>.proxyHost/.proxyPort, http.nonProxyHosts), default Authenticator and Basic-over-CONNECT tunnelling all collapse to ProxyConfig.setupFromEnvironment(System.getenv()); proxyConfig() returns the resolved config directly. The hand-rolled parse/decodeUserInfo/authenticator/registry are removed.
  • nextflow.cli.Launcher — the six setProxy(...) + setNoProxy(...) calls become a single ProxyConfig.setupFromEnvironment(env); setProxy/setNoProxy/enableBasicProxyTunneling deleted (their behaviour + tests moved down to lib-util-net).
  • HxClient consumers (TowerXAuth and the 8 withProxyConfig(...) call sites) — unchanged in shape; they now flow an io.seqera.util.net.ProxyConfig since lib-httpx 2.7.0 drops HxProxyConfig in favour of it.
  • Bumps io.seqera:lib-httpx to 2.7.0 and adds io.seqera:lib-util-net:0.2.0.

Behaviour

Proxy env-var handling is unchanged for HTTP_PROXY/HTTPS_PROXY/FTP_PROXY/NO_PROXY (+ lower-case and ALL_PROXY). Two intentional refinements now shared across products: the default proxy port follows the proxy scheme (http→80, https→443) consistently, and NO_PROXY → http.nonProxyHosts keeps the JDK loopback defaults and uses the JDK wildcard grammar.

Related

🤖 Generated with Claude Code

@netlify

netlify Bot commented Sep 6, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for nextflow-docs canceled.

Name Link
🔨 Latest commit f9c576d
🔍 Latest deploy log https://app.netlify.com/projects/nextflow-docs/deploys/6a9dc91e3d2a4f0008f08863

…ling

Replace Nextflow's hand-rolled proxy resolution with the shared
io.seqera.util.net.ProxyConfig (lib-util-net 0.2.0). The launcher's per-protocol env
scanning, system-property installation, default Authenticator and Basic-over-CONNECT
tunnelling collapse to ProxyConfig.setupFromEnvironment(); nextflow.util.ProxyConfig
becomes a thin holder whose proxyConfig() returns the resolved config directly.

With lib-httpx 2.7.0 dropping HxProxyConfig in favour of the same ProxyConfig,
HxClient.withProxyConfig() and TowerXAuth now consume it directly - so the URI parsing,
no-proxy matching and authenticator semantics live in one place, shared with Wave. The
nf-tower TowerXAuth/DataLinks tests seed the config via ProxyConfig.setConfig(fromUri(...)).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
@pditommaso
pditommaso force-pushed the claude/adopt-lib-util-net-proxyconfig branch from 9a1e7fa to f9c576d Compare September 6, 2026 20:12

@bentsherman bentsherman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. I did a similar thing when working on CLI v2 since I needed this logic in both CLI launchers. I called it ProxyHelper instead of ProxyConfig, which would remove the name conflict with libseqera, but either name is fine with me

@pditommaso

Copy link
Copy Markdown
Member Author

Great 👍

@pditommaso
pditommaso merged commit 8b07422 into master Sep 8, 2026
42 of 43 checks passed
@pditommaso
pditommaso deleted the claude/adopt-lib-util-net-proxyconfig branch September 8, 2026 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants