From 52827e65685a21d1b36c798dc52c5b000ab4e046 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Wed, 15 Jul 2020 03:55:09 +0000 Subject: [PATCH] add SNI/Host spoof option --- curlie/README.md | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/curlie/README.md b/curlie/README.md index 8739aa4..47ce7a7 100644 --- a/curlie/README.md +++ b/curlie/README.md @@ -25,19 +25,19 @@ Use the `@beta` tag for pre-releases. **JSON** (`=`) is the default encoding for `key=value` pairs. -## Simple GET +### Simple GET ```bash curlie -v example.com ``` -## POST simple JSON with headers +### POST simple JSON with headers ```bash curlie -v POST httpbin.org/status/201 "Authorization: Bearer xxxx" "name=John Doe" ``` -## POST large JSON +### POST large JSON ```bash curlie -v POST httpbin.org/status/201 "Authorization: Bearer xxxx" -d ' @@ -48,3 +48,13 @@ curlie -v POST httpbin.org/status/201 "Authorization: Bearer xxxx" -d ' ] ' ``` + +### Spoof Host and SNI + +The `--resolve` option is for when you need to test a local service as if it had +a remote hostname and TLS SNI (or when you want to break things 😈). + +```bash +curlie https://foo.example.com:8443 "Host: foo.example.com" \ + --resolve foo.example.com:8443:localhost +``` -- 2.25.1