fix: downgrade undici to v6 and add SOCKS proxy support for undici dispatcher path#2802
fix: downgrade undici to v6 and add SOCKS proxy support for undici dispatcher path#2802Copilot wants to merge 3 commits intomax-regen-genfrom
Conversation
…dici path Co-authored-by: brendandburns <5751682+brendandburns@users.noreply.github.com> Agent-Logs-Url: https://github.com/kubernetes-client/javascript/sessions/f6da75b3-9f5b-4cfa-9fbe-0191093345f3
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Copilot The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@copilot update this to use |
…ient connector Co-authored-by: brendandburns <5751682+brendandburns@users.noreply.github.com> Agent-Logs-Url: https://github.com/kubernetes-client/javascript/sessions/789ac2b6-243f-4ac2-9786-5e5e23942604
Done in 2152769. The |
A prior commit ("support socks proxy") accidentally bumped
undicifrom^6.24.1to^7.23.0, breaking Node.js 18 compatibility (Fileis not defined). undici v7 requires Node.js ≥ 20.18.1.Changes
package.json: Revertundicito^6.24.1; addsocks(^2.8.4) as a direct dependencysrc/config.ts:buildConnectorfromundiciandSocksClientfromsocksDispatcherOptionswith a'socks'variant ({ type: 'socks'; uri: string; requestTls: tls.ConnectionOptions })createDispatcherOptions, return{ type: 'socks' }for SOCKS proxy URLs instead of throwingcreateSocksConnector()— creates an undici-compatible connector that tunnels connections through the SOCKS proxy usingSocksClient.createConnection, with TLS upgrade forhttps:targetscreateDispatcher, handletype: 'socks'by creating aUndiciAgentwith the custom socks connectorsrc/config_test.ts: Restore socks proxy test to verify aUndiciAgentis set as the dispatcher andcreateDispatcherOptionsreturns{ type: 'socks', uri: 'socks5://...' }SOCKS proxy now works on both the
createDispatcherpath (undici/fetch) and the legacycreateAgentpath (WebSocket /applyToHTTPSOptions).✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.