Repository navigation
Conversation
hpagent が URL.hostname を http.request の host に渡すと、IPv6 の角括弧付きのまま名前解決に失敗する。
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
このPRによるapi.jsonの差分 |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #18155 +/- ##
============================================
+ Coverage 12.81% 26.94% +14.12%
============================================
Files 228 1162 +934
Lines 11181 39948 +28767
Branches 3699 11000 +7301
============================================
+ Hits 1433 10763 +9330
- Misses 7661 23406 +15745
- Partials 2087 5779 +3692 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
⚙️ Backend Diagnostics ReportMemory: After GC(No significant changes) V8 Heap Snapshot Statistics
|
🖥 Frontend Diagnostics Report(No significant changes) Requests by resource type
V8 heap snapshot statistics
📦 Bundle StatsChunk size diff (0 updated, 0 added, 0 removed)
Startup chunk size (0 updated, 0 added, 0 removed)
Startup chunks are the Vite entry for
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
What
When
config.proxyis an IPv6 URL such ashttp://[2001:db8::2]:3128, the existing hpagent setup receives a host without the surrounding[]. Domain and IPv4 proxy strings are unchanged.Why
Fixes #17565.
hpagent v1.2.0 copies
URL.hostnameintohttp.request({ host }). For IPv6 that value is[2001:db8::2]. Node'surlToHttpOptionsstrips those brackets, but a rawhoststring does not, sogetaddrinforeturnsENOTFOUND. hpagent has not had a release since 2023.The proxy is still built only in
HttpRequestService, for bothHttpProxyAgentandHttpsProxyAgent. This does not add another proxy client. AURLobject cannot store an IPv6 hostname without brackets (hostnamekeeps them after assignment), and hpagent already accepts a non-string proxy and readshostname,port,protocol,username, andpassword. The configured URL string stays in bracket form.Additional info (optional)
8fe4596d7d56d0a7a4038042ec3eda26cfc9f5ad(develop).packages/backend/test/unit/misc/hpagent-proxy.tschecks the host stored by both agents, leaves domain and IPv4 strings untouched, and keeps auth and protocol. Leaving the brackets in place fails that test.node scripts/check-shipping.mjs --base origin/develop: lint, SPDX, and locale safety passed.[::1]was not run. On this machine,dns.lookup('[2001:db8::2]')isENOTFOUNDanddns.lookup('2001:db8::2')returns the IPv6 address. Windows can resolve the bracketed form, so the test does not assertgetaddrinfo.Checklist