Skip to content

feat(js): support socks proxy#197

Merged
barjin merged 3 commits intomasterfrom
js/support-socks-proxy
Jun 11, 2025
Merged

feat(js): support socks proxy#197
barjin merged 3 commits intomasterfrom
js/support-socks-proxy

Conversation

@barjin
Copy link
Member

@barjin barjin commented Jun 11, 2025

Enables support for socks proxies to impit-node. This theoretically enables socks proxies for CLI and the Python binding as well, but this behaviour is untested due to a lack of working socks proxy server implementations in Python.

@barjin barjin requested a review from Copilot June 11, 2025 10:25
@barjin barjin self-assigned this Jun 11, 2025
@barjin barjin added the adhoc Ad-hoc unplanned task added during the sprint. label Jun 11, 2025
@github-actions github-actions bot added this to the 116th sprint - Tooling team milestone Jun 11, 2025
@github-actions github-actions bot added t-tooling Issues with this label are in the ownership of the tooling team. tested Temporary label used only programatically for some analytics. labels Jun 11, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds SOCKS proxy support to both the Rust core (impit) and the Node binding (impit-node), and includes a basic end‐to‐end test for the new feature.

  • Enabled the socks feature in reqwest for Rust proxy support
  • Added socksv5 dependency and SOCKS server setup in the Node tests
  • Introduced a new supports socks proxy test in basics.test.ts

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

File Description
impit/Cargo.toml Enabled the socks feature flag for the reqwest crate
impit-node/package.json Added socksv5 as a development/test dependency
impit-node/test/basics.test.ts Imported and started a SOCKS server; added new test case
Comments suppressed due to low confidence (2)

impit-node/test/basics.test.ts:131

  • [nitpick] For consistency with other tests prefixed by impit, consider renaming this test to impit supports socks proxy.
test('supports socks proxy', async (t) => {

impit/Cargo.toml:15

  • [nitpick] While the Rust client now supports SOCKS, there are no integration tests verifying proxy usage on the Rust side. Consider adding a minimal end-to-end test to cover the new feature.
reqwest = { version = "0.12.9", features = ["json", "gzip", "brotli", "zstd", "deflate", "rustls-tls", "http3", "cookies", "stream", "socks"] }

@barjin barjin merged commit 17144f2 into master Jun 11, 2025
46 checks passed
@barjin barjin deleted the js/support-socks-proxy branch June 11, 2025 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. tested Temporary label used only programatically for some analytics.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant