Skip to content

Instantly share code, notes, and snippets.

@georgyo
Created January 6, 2024 15:11
Show Gist options
  • Save georgyo/8d33a0a1deb74b3858620649ad46ed05 to your computer and use it in GitHub Desktop.
Save georgyo/8d33a0a1deb74b3858620649ad46ed05 to your computer and use it in GitHub Desktop.
Good proxy example
% http_proxy=http://127.0.0.1:30000 https_proxy=http://127.0.0.1:30000 all_proxy=http://127.0.0.1:30000 curl --http1.1 -vvv https://ifconfig.io/ua
* Uses proxy env variable https_proxy == 'http://127.0.0.1:30000'
* Trying 127.0.0.1:30000...
* Connected to 127.0.0.1 (127.0.0.1) port 30000
* CONNECT tunnel: HTTP/1.1 negotiated
* allocate connect buffer
* Establish HTTP proxy tunnel to ifconfig.io:443
> CONNECT ifconfig.io:443 HTTP/1.1
> Host: ifconfig.io:443
> User-Agent: curl/8.4.0
> Proxy-Connection: Keep-Alive
>
< HTTP/1.1 200 Connection established
<
* CONNECT phase completed
* CONNECT tunnel established, response 200
* ALPN: curl offers http/1.1
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN: server accepted http/1.1
* Server certificate:
* subject: CN=ifconfig.io
* start date: Dec 28 19:48:11 2023 GMT
* expire date: Mar 27 19:48:10 2024 GMT
* subjectAltName: host "ifconfig.io" matched cert's "ifconfig.io"
* issuer: C=US; O=Google Trust Services LLC; CN=GTS CA 1P5
* SSL certificate verify ok.
* using HTTP/1.1
> GET /ua HTTP/1.1
> Host: ifconfig.io
> User-Agent: curl/8.4.0
> Accept: */*
>
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* old SSL session ID is stale, removing
< HTTP/1.1 200 OK
< Date: Sat, 06 Jan 2024 15:11:27 GMT
< Content-Type: text/plain; charset=utf-8
< Content-Length: 11
< Connection: keep-alive
< CF-Cache-Status: DYNAMIC
< Report-To: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=CHPl2NnVwm9JIn07qTMjbX3Rdu2xxmcAh%2BDWTz%2FrGr6VDFmsFVkS7veHGTX5no0jogNKwoFGxEpTLk0ZyiNBpZZkQPfGPZDSiDYRbQwRyOrKxPnZc40F28DDpyjEItKtMdy1DPsVm%2F0I5A%3D%3D"}],"group":"cf-nel","max_age":604800}
< NEL: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
< Server: cloudflare
< CF-RAY: 8414e4c6efa45e86-EWR
< alt-svc: h3=":443"; ma=86400
<
curl/8.4.0
* Connection #0 to host 127.0.0.1 left intact
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment