You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Attempts to connect to the web server through the given proxy server. The method accepts the following arguments:
170
170
171
171
*`proxy_uri` - Full URI of the proxy server to use (e.g. `http://proxy.example.com:3128/`). Note: Only `http` protocol is supported.
172
172
*`scheme` - The protocol to use between the proxy server and the remote host (`http` or `https`). If `https` is specified as the scheme, `connect_proxy()` makes a `CONNECT` request to establish a TCP tunnel to the remote host through the proxy server.
173
173
*`host` - The hostname of the remote host to connect to.
174
174
*`port` - The port of the remote host to connect to.
175
+
*`proxy_authorization` - The `Proxy-Authorization` header value sent to the proxy server via `CONNECT` when the `scheme` is `https`.
175
176
176
177
If an error occurs during the connection attempt, this method returns `nil` with a string describing the error. If the connection was successfully established, the method returns `1`.
177
178
@@ -221,7 +222,9 @@ In case of success, returns `1`. In case of errors, returns `nil, err`. In the c
221
222
Configure an http proxy to be used with this client instance. The `opts` is a table that accepts the following fields:
222
223
223
224
*`http_proxy` - an URI to a proxy server to be used with http requests
225
+
*`http_proxy_authorization` - a default `Proxy-Authorization` header value to be used with `http_proxy`, e.g. `Basic ZGVtbzp0ZXN0`, which will be overriden if the `Proxy-Authorization` request header is present.
224
226
*`https_proxy` - an URI to a proxy server to be used with https requests
227
+
*`https_proxy_authorization` - as `http_proxy_authorization` but for use with `https_proxy`.
225
228
*`no_proxy` - a comma separated list of hosts that should not be proxied.
226
229
227
230
Note that proxy options are only applied when using the high-level `request_uri()` API.
0 commit comments