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

how to set the proxy #1435

Open
Vis-Wing opened this issue Jun 4, 2023 · 1 comment
Open

how to set the proxy #1435

Vis-Wing opened this issue Jun 4, 2023 · 1 comment
Labels

Comments

@Vis-Wing
Copy link

Vis-Wing commented Jun 4, 2023

May I ask how to set the proxy in version 2.19

@jtojnar
Copy link
Member

jtojnar commented Jun 4, 2023

If you can set environment variables, ALL_PROXY should still work as described in #871 (comment).

If not, you will need to modify the code as follows:

--- a/src/helpers/WebClient.php
+++ b/src/helpers/WebClient.php
@@ -62,6 +62,7 @@ class WebClient {
                 ],
                 'handler' => $stack,
                 'timeout' => 60, // seconds
+                'proxy' => 'http://user:password@proxy:8000',
             ]);
 
             $this->httpClient = $httpClient;

See Guzzle docs for more details on the option.

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

No branches or pull requests

2 participants