mirror of
https://github.com/curl/curl.git
synced 2026-04-11 12:01:42 +08:00
docs: use .example URLs for proxies
This commit is contained in:
parent
0b69c47131
commit
58394b1c8c
@ -14,7 +14,7 @@ See-also:
|
||||
- dump-ca-embed
|
||||
- proxy
|
||||
Example:
|
||||
- --proxy-cacert CA-file.txt -x https://proxy $URL
|
||||
- --proxy-cacert CA-file.txt -x https://proxy.example $URL
|
||||
---
|
||||
|
||||
# `--proxy-cacert`
|
||||
|
||||
@ -13,7 +13,7 @@ See-also:
|
||||
- capath
|
||||
- dump-ca-embed
|
||||
Example:
|
||||
- --proxy-capath /local/directory -x https://proxy $URL
|
||||
- --proxy-capath /local/directory -x https://proxy.example $URL
|
||||
---
|
||||
|
||||
# `--proxy-capath`
|
||||
|
||||
@ -11,7 +11,7 @@ See-also:
|
||||
- proxy-cert
|
||||
- proxy-key
|
||||
Example:
|
||||
- --proxy-cert-type PEM --proxy-cert file -x https://proxy $URL
|
||||
- --proxy-cert-type PEM --proxy-cert file -x https://proxy.example $URL
|
||||
---
|
||||
|
||||
# `--proxy-cert-type`
|
||||
|
||||
@ -12,7 +12,7 @@ See-also:
|
||||
- proxy-key
|
||||
- proxy-cert-type
|
||||
Example:
|
||||
- --proxy-cert file -x https://proxy $URL
|
||||
- --proxy-cert file -x https://proxy.example $URL
|
||||
---
|
||||
|
||||
# `--proxy-cert`
|
||||
|
||||
@ -13,7 +13,7 @@ See-also:
|
||||
- ciphers
|
||||
- proxy
|
||||
Example:
|
||||
- --proxy-ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256 -x https://proxy $URL
|
||||
- --proxy-ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256 -x https://proxy.example $URL
|
||||
---
|
||||
|
||||
# `--proxy-ciphers`
|
||||
|
||||
@ -11,7 +11,7 @@ See-also:
|
||||
- crlfile
|
||||
- proxy
|
||||
Example:
|
||||
- --proxy-crlfile rejects.txt -x https://proxy $URL
|
||||
- --proxy-crlfile rejects.txt -x https://proxy.example $URL
|
||||
---
|
||||
|
||||
# `--proxy-crlfile`
|
||||
|
||||
@ -10,7 +10,7 @@ See-also:
|
||||
- proxy
|
||||
- insecure
|
||||
Example:
|
||||
- --proxy-insecure -x https://proxy $URL
|
||||
- --proxy-insecure -x https://proxy.example $URL
|
||||
---
|
||||
|
||||
# `--proxy-insecure`
|
||||
|
||||
@ -11,7 +11,7 @@ See-also:
|
||||
- proxy-key
|
||||
- proxy
|
||||
Example:
|
||||
- --proxy-key-type DER --proxy-key here -x https://proxy $URL
|
||||
- --proxy-key-type DER --proxy-key here -x https://proxy.example $URL
|
||||
---
|
||||
|
||||
# `--proxy-key-type`
|
||||
|
||||
@ -11,7 +11,7 @@ See-also:
|
||||
- proxy-key-type
|
||||
- proxy
|
||||
Example:
|
||||
- --proxy-key here -x https://proxy $URL
|
||||
- --proxy-key here -x https://proxy.example $URL
|
||||
---
|
||||
|
||||
# `--proxy-key`
|
||||
|
||||
@ -11,7 +11,7 @@ See-also:
|
||||
- proxy
|
||||
- proxy-key
|
||||
Example:
|
||||
- --proxy-pass secret --proxy-key here -x https://proxy $URL
|
||||
- --proxy-pass secret --proxy-key here -x https://proxy.example $URL
|
||||
---
|
||||
|
||||
# `--proxy-pass`
|
||||
|
||||
@ -10,7 +10,7 @@ See-also:
|
||||
- ssl-allow-beast
|
||||
- proxy
|
||||
Example:
|
||||
- --proxy-ssl-allow-beast -x https://proxy $URL
|
||||
- --proxy-ssl-allow-beast -x https://proxy.example $URL
|
||||
---
|
||||
|
||||
# `--proxy-ssl-allow-beast`
|
||||
|
||||
@ -10,7 +10,7 @@ See-also:
|
||||
- ssl-auto-client-cert
|
||||
- proxy
|
||||
Example:
|
||||
- --proxy-ssl-auto-client-cert -x https://proxy $URL
|
||||
- --proxy-ssl-auto-client-cert -x https://proxy.example $URL
|
||||
---
|
||||
|
||||
# `--proxy-ssl-auto-client-cert`
|
||||
|
||||
@ -12,7 +12,7 @@ See-also:
|
||||
- proxy-tlsuser
|
||||
- proxy-tlspassword
|
||||
Example:
|
||||
- --proxy-tlsauthtype SRP -x https://proxy $URL
|
||||
- --proxy-tlsauthtype SRP -x https://proxy.example $URL
|
||||
---
|
||||
|
||||
# `--proxy-tlsauthtype`
|
||||
|
||||
@ -11,7 +11,7 @@ See-also:
|
||||
- proxy
|
||||
- proxy-tlsuser
|
||||
Example:
|
||||
- --proxy-tlspassword passwd -x https://proxy $URL
|
||||
- --proxy-tlspassword passwd -x https://proxy.example $URL
|
||||
---
|
||||
|
||||
# `--proxy-tlspassword`
|
||||
|
||||
@ -11,7 +11,7 @@ See-also:
|
||||
- proxy
|
||||
- proxy-tlspassword
|
||||
Example:
|
||||
- --proxy-tlsuser smith -x https://proxy $URL
|
||||
- --proxy-tlsuser smith -x https://proxy.example $URL
|
||||
---
|
||||
|
||||
# `--proxy-tlsuser`
|
||||
|
||||
@ -9,7 +9,7 @@ Multi: mutex
|
||||
See-also:
|
||||
- proxy
|
||||
Example:
|
||||
- --proxy-tlsv1 -x https://proxy $URL
|
||||
- --proxy-tlsv1 -x https://proxy.example $URL
|
||||
---
|
||||
|
||||
# `--proxy-tlsv1`
|
||||
|
||||
@ -50,7 +50,7 @@ int main(void)
|
||||
long verifyresult;
|
||||
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy:443");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy.example:443");
|
||||
|
||||
res = curl_easy_perform(curl);
|
||||
if(res) {
|
||||
|
||||
@ -72,7 +72,7 @@ int main(void)
|
||||
CURLcode res;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
|
||||
/* using an HTTPS proxy */
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY, "https://localhost:443");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy.example:443");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY_CAINFO, "/etc/certs/cabundle.pem");
|
||||
res = curl_easy_perform(curl);
|
||||
curl_easy_cleanup(curl);
|
||||
|
||||
@ -73,7 +73,7 @@ int main(void)
|
||||
struct curl_blob blob;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
|
||||
/* using an HTTPS proxy */
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY, "https://localhost:443");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy.example:443");
|
||||
blob.data = strpem;
|
||||
blob.len = strlen(strpem);
|
||||
blob.flags = CURL_BLOB_COPY;
|
||||
|
||||
@ -64,7 +64,7 @@ int main(void)
|
||||
CURLcode res;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
|
||||
/* using an HTTPS proxy */
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY, "https://localhost:443");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy.example:443");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY_CAPATH, "/etc/cert-dir");
|
||||
res = curl_easy_perform(curl);
|
||||
curl_easy_cleanup(curl);
|
||||
|
||||
@ -70,7 +70,7 @@ int main(void)
|
||||
CURLcode res;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
|
||||
/* using an HTTPS proxy */
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY, "https://localhost:443");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy.example:443");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY_ISSUERCERT, "/etc/certs/cacert.pem");
|
||||
res = curl_easy_perform(curl);
|
||||
curl_easy_cleanup(curl);
|
||||
|
||||
@ -77,7 +77,7 @@ int main(void)
|
||||
struct curl_blob blob;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
|
||||
/* using an HTTPS proxy */
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY, "https://localhost:443");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy.example:443");
|
||||
blob.data = certificateData;
|
||||
blob.len = filesize;
|
||||
blob.flags = CURL_BLOB_COPY;
|
||||
|
||||
@ -61,7 +61,7 @@ int main(void)
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy:443");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy.example:443");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY_KEYPASSWD, "superman");
|
||||
res = curl_easy_perform(curl);
|
||||
curl_easy_cleanup(curl);
|
||||
|
||||
@ -67,7 +67,7 @@ int main(void)
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy:443");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy.example:443");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY_PINNEDPUBLICKEY,
|
||||
"sha256//YhKJKSzoTt2b5FP18fvpHo7fJYqQCjA"
|
||||
"a3HWY3tvRMwE=;sha256//t62CeU2tQiqkexU74"
|
||||
|
||||
@ -64,7 +64,7 @@ int main(void)
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy.example");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY_SSLCERT, "client.pem");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY_SSLKEY, "key.pem");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY_KEYPASSWD, "s3cret");
|
||||
|
||||
@ -60,7 +60,7 @@ int main(void)
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy.example");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY_SSLCERT, "client.pem");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY_SSLCERTTYPE, "PEM");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY_SSLKEY, "key.pem");
|
||||
|
||||
@ -68,7 +68,7 @@ int main(void)
|
||||
blob.len = filesize;
|
||||
blob.flags = CURL_BLOB_COPY;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy.example");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY_SSLKEY, "key.pem");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY_KEYPASSWD, "s3cret");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY_SSLCERT_BLOB, &blob);
|
||||
|
||||
@ -64,7 +64,7 @@ int main(void)
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy.example");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY_SSLCERT, "client.pem");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY_SSLKEY, "key.pem");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY_KEYPASSWD, "s3cret");
|
||||
|
||||
@ -53,7 +53,7 @@ int main(void)
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy.example");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY_SSLCERT, "client.pem");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY_SSLKEY, "key.pem");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY_SSLKEYTYPE, "PEM");
|
||||
|
||||
@ -62,7 +62,7 @@ int main(void)
|
||||
CURLcode res;
|
||||
struct curl_blob blob;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy.example");
|
||||
blob.data = certificateData;
|
||||
blob.len = filesize;
|
||||
blob.flags = CURL_BLOB_COPY;
|
||||
|
||||
@ -106,7 +106,7 @@ int main(void)
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy.example");
|
||||
/* weaken TLS only for use with silly proxies */
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY_SSL_OPTIONS,
|
||||
CURLSSLOPT_ALLOW_BEAST | CURLSSLOPT_NO_REVOKE);
|
||||
|
||||
@ -58,7 +58,7 @@ int main(void)
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy.example");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY_TLSAUTH_TYPE, "SRP");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY_TLSAUTH_USERNAME, "user");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY_TLSAUTH_PASSWORD, "secret");
|
||||
|
||||
@ -65,7 +65,7 @@ int main(void)
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy.example");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY_TLSAUTH_TYPE, "SRP");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY_TLSAUTH_USERNAME, "user");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY_TLSAUTH_PASSWORD, "secret");
|
||||
|
||||
@ -58,7 +58,7 @@ int main(void)
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy.example");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY_TLSAUTH_TYPE, "SRP");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY_TLSAUTH_USERNAME, "user");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY_TLSAUTH_PASSWORD, "secret");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user