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

Proxy chain support #3196

Closed
dinamic opened this issue Dec 18, 2023 · 1 comment
Closed

Proxy chain support #3196

dinamic opened this issue Dec 18, 2023 · 1 comment

Comments

@dinamic
Copy link

dinamic commented Dec 18, 2023

Description
It'd be great if we could define a proxy chain. We would be able to define a path to a proxy, which goes thru another proxy.

Example

In terms of configuration, maybe we could support passing an array instead of a string as http and https proxies.

$client->request('GET', '/', [
    'proxy' => [
        'http'  => ['socks5://a.b.c.d:1080', 'socks5://z.x.c.v:31337']
        'https' => ['socks5://a.b.c.d:1080', 'socks5://z.x.c.v:31337']
        'no' => ['.mit.edu', 'foo.com']    // Don't use a proxy with these
    ]
]);

In this configuration, we should first connect to a.b.c.d in order to connect to z.x.c.v and then issue the request to the web server.

Not sure if this is possible today. If it is, maybe the documentation needs clearing up a bit.

@GrahamCampbell
Copy link
Member

Thanks for getting in touch. No, this is not possible, not just due to Guzzle, but due to the nature of how HTTP proxies work. See https://stackoverflow.com/questions/8022672/curl-using-multiple-proxies-in-a-chain which has been answered by the author of libcurl.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants