====== CURL ====== ====== Allgemeines ====== https://ec.haxx.se/ [[https://curl.haxx.se/docs/manual.html|https://curl.haxx.se/docs/manual.html]] [[https://curl.haxx.se/docs/httpscripting.html|https://curl.haxx.se/docs/httpscripting.html]] https://hasdata.com/blog/curl-with-proxy ====== Request/Response Information ====== curl -iv --head https://www.netzwissen.de oder curl https://www.netzwissen.de -I * Rebuilt URL to: https://www.netzwissen.de/ * Trying 138.201.52.53... * TCP_NODELAY set * Connected to www.netzwissen.de (138.201.52.53) port 443 (#0) * ALPN, offering h2 * ALPN, offering http/1.1 * successfully set certificate verify locations: * CAfile: /etc/ssl/certs/ca-certificates.crt CApath: /etc/ssl/certs * TLSv1.3 (OUT), TLS handshake, Client hello (1): * TLSv1.3 (IN), TLS handshake, Server hello (2): * TLSv1.2 (IN), TLS handshake, Certificate (11): * TLSv1.2 (IN), TLS handshake, Server key exchange (12): * TLSv1.2 (IN), TLS handshake, Server finished (14): * TLSv1.2 (OUT), TLS handshake, Client key exchange (16): * TLSv1.2 (OUT), TLS change cipher, Client hello (1): * TLSv1.2 (OUT), TLS handshake, Finished (20): * TLSv1.2 (IN), TLS handshake, Finished (20): * SSL connection using TLSv1.2 / ECDHE-RSA-CHACHA20-POLY1305 * ALPN, server accepted to use http/1.1 * Server certificate: * subject: CN=www2.netzwissen.de * start date: Nov 27 15:13:22 2019 GMT * expire date: Feb 25 15:13:22 2020 GMT * subjectAltName: host "www.netzwissen.de" matched cert's "www.netzwissen.de" * issuer: C=US; O=Let's Encrypt; CN=Let's Encrypt Authority X3 * SSL certificate verify ok.> HEAD / HTTP/1.1> Host: www.netzwissen.de> User-Agent: curl/7.58.0> Accept: */*> ====== Proxy Anfragen ====== Basis Syntax curl -x proxy_address:proxy_port URL Mit dieser Anfrage bekommt an die eigene IP zurück, als Beweis, dass der Proxy selber tut: curl -x 195.154.243.38:8080 https://httpbin.org/ip ===== Proxy Auth ===== curl --proxy-user username:password -x proxy_address https://httpbin.org/ip Kaputte Zertifikate umgehen curl --proxy http://proxy.example.com:8080 --insecure https://httpbin.org/ip ===== Proxy Request mit Header ===== curl -x proxy_address -H "Header-Name: Header-Value" https://httpbin.org/ip