Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support SOCKS proxy #540

Merged
merged 3 commits into from
Jun 21, 2024
Merged

feat: support SOCKS proxy #540

merged 3 commits into from
Jun 21, 2024

Conversation

jirimoravcik
Copy link
Member

This PR introduces support for SOCKS protocol.

@github-actions github-actions bot added this to the 92nd sprint - Platform team milestone Jun 20, 2024
@github-actions github-actions bot added the t-platform Issues with this label are in the ownership of the platform team. label Jun 20, 2024
@jancurn jancurn requested a review from B4nan June 20, 2024 09:29
Copy link
Member

@B4nan B4nan left a comment

Choose a reason for hiding this comment

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

some tests would be nice 🙃

Copy link
Member

@jancurn jancurn left a comment

Choose a reason for hiding this comment

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

Looks great, thanks Jirka! It would be great to add at least one unit/integration test for the SOCKS proxy, perhaps extend our existing test suite

README.md Outdated
@@ -2,7 +2,7 @@

[![npm version](https://badge.fury.io/js/proxy-chain.svg)](http://badge.fury.io/js/proxy-chain)

A programmable proxy server (think Squid) with support for SSL/TLS, authentication, upstream proxy chaining,
A programmable proxy server (think Squid) with support for SSL/TLS, authentication, upstream proxy chaining (supports SOCKS protocol),
Copy link
Member

Choose a reason for hiding this comment

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

Which versions of SOCKS?

import { forwardSocks } from './forward_socks';
import { chainSocks } from './chain_socks';

const SOCKS_PROTOCOLS = ['socks:', 'socks4:', 'socks4a:', 'socks5:', 'socks5h:'];
Copy link
Member

Choose a reason for hiding this comment

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

Please can we document this list of supported protocols in README?

@jirimoravcik jirimoravcik merged commit a586b3e into master Jun 21, 2024
4 checks passed
@jirimoravcik jirimoravcik deleted the feature/socks-proxy branch June 21, 2024 12:42
@dumbasPL
Copy link

might wanna remove The SOCKS protocol is not supported yet from the readme ;)

@jirimoravcik
Copy link
Member Author

might wanna remove The SOCKS protocol is not supported yet from the readme ;)

Will do, thanks for noticing 🙏

@fnesveda fnesveda added the validated Issues that are resolved and their solutions fulfill the acceptance criteria. label Jun 24, 2024
@mschfh
Copy link

mschfh commented Aug 16, 2024

anonymizeProxy is still throwing the error, can this be removed?

if (parsedProxyUrl.protocol !== 'http:') {
throw new Error(
'Invalid "proxyUrl" option: only HTTP proxies are currently supported.',
);
}

@jirimoravcik
Copy link
Member Author

anonymizeProxy is still throwing the error, can this be removed?

if (parsedProxyUrl.protocol !== 'http:') {
throw new Error(
'Invalid "proxyUrl" option: only HTTP proxies are currently supported.',
);
}

Thanks for reporting this, fix is in #545 and will be merged and released soon.

@jirimoravcik
Copy link
Member Author

anonymizeProxy is still throwing the error, can this be removed?

if (parsedProxyUrl.protocol !== 'http:') {
throw new Error(
'Invalid "proxyUrl" option: only HTTP proxies are currently supported.',
);
}

This has been fixed in v2.5.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t-platform Issues with this label are in the ownership of the platform team. validated Issues that are resolved and their solutions fulfill the acceptance criteria.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants