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

Control proxy-chain's 'host' parameter from Apify's launchContext #2434

Open
zuccon opened this issue Mar 27, 2024 · 2 comments
Open

Control proxy-chain's 'host' parameter from Apify's launchContext #2434

zuccon opened this issue Mar 27, 2024 · 2 comments
Assignees
Labels
t-tooling Issues with this label are in the ownership of the tooling team.

Comments

@zuccon
Copy link

zuccon commented Mar 27, 2024

The host argument has been added to proxy-chain, for its listener to be bound to something else than 0.0.0.0.

However it's not possible to set this parameter while launching Puppeteer as it's not available in the launchContext.

Is it possible to add this option to the launchContext, or do you have any advice for launching Puppeteer with a customized proxy-chain instance which has this argument too?

Thanks!

@mtrunkat mtrunkat added the t-tooling Issues with this label are in the ownership of the tooling team. label Apr 11, 2024
@barjin
Copy link
Contributor

barjin commented Apr 26, 2024

Hello @zuccon !

Are you sure this is an issue for this package (apify/apify-client-js)? To me, this sounds like a thing from crawlee - there, we're using proxy-chain to create a local proxy server that authenticates with the target proxy server. I'll transfer this issue to crawlee and we can continue the discussion there.

As far as I understand - you want this "immediate" proxy server inside crawlee to only listen on a certain address / network interface, right?

@barjin barjin transferred this issue from apify/apify-client-js Apr 26, 2024
@zuccon
Copy link
Author

zuccon commented May 7, 2024

Hello @zuccon !

Hi @barjin, thanks for answering.

Are you sure this is an issue for this package (apify/apify-client-js)? To me, this sounds like a thing from crawlee - there, we're using proxy-chain to create a local proxy server that authenticates with the target proxy server. I'll transfer this issue to crawlee and we can continue the discussion there.

As far as I understood the proxy-chain instance is instantiated in crawlee, however crawlee is instantiated by our call of Apify.launchPuppeteer(), with Apify being const Apify = require("apify");.

https://docs.apify.com/sdk/js/docs/1.3/api/apify#apifylaunchpuppeteerlaunchcontext

So in order for it to work, I believe this option needs to be propagated from proxy-chain, where it has been implemented first, through crawlee, to end up being exposed in Apify's launchContext so that we can change its default value.
I may be wrong though, not completely familiar with it yet.

As far as I understand - you want this "immediate" proxy server inside crawlee to only listen on a certain address / network interface, right?

yes, this is the goal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t-tooling Issues with this label are in the ownership of the tooling team.
Projects
None yet
Development

No branches or pull requests

3 participants