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
Copy file name to clipboardExpand all lines: README.md
+21Lines changed: 21 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -117,7 +117,9 @@ typedef struct {
117
117
std::string certPath;
118
118
std::string certType;
119
119
std::string keyPath;
120
+
std::string keyPassword;
120
121
std::string customUserAgent;
122
+
std::string uriProxy;
121
123
struct {
122
124
// total time of the last request in seconds Total time of previous
123
125
// transfer. See CURLINFO_TOTAL_TIME
@@ -184,6 +186,25 @@ conn->SetCertPath(certPath);
184
186
conn->SetCertType(type);
185
187
// set CURLOPT_SSLKEY
186
188
conn->SetKeyPath(keyPath);
189
+
// set CURLOPT_KEYPASSWD
190
+
conn->SetKeyPassword(keyPassword);
191
+
```
192
+
193
+
## HTTP Proxy Tunneling Support
194
+
195
+
An HTTP Proxy can be set to use for the upcoming request.
196
+
To specify a port number, append :[port] to the end of the host name. If not specified, `libcurl` will default to using port 1080 for proxies. The proxy string may be prefixed with `http://` or `https://`. If no HTTP(S) scheme is specified, the address provided to `libcurl` will be prefixed with `http://` to specify an HTTP proxy. A proxy host string can embedded user + password.
197
+
The operation will be tunneled through the proxy as curl option `CURLOPT_HTTPPROXYTUNNEL` is enabled by default.
198
+
A numerical IPv6 address must be written within [brackets].
199
+
200
+
```cpp
201
+
// set CURLOPT_PROXY
202
+
conn->SetProxy("https://37.187.100.23:3128");
203
+
/* or you can set it without the protocol scheme and
204
+
http:// will be prefixed by default */
205
+
conn->SetProxy("37.187.100.23:3128");
206
+
/* the following request will be tunneled through the proxy */
0 commit comments