Skip to Content [alt-c]

Comment

In reply to Writing an SNI Proxy in 115 Lines of Go

Reader hgsgtk on 2022-01-17 at 10:41:

Thank you for your great explanation. I tried to run it, but got the following error.

2022/01/17 19:35:30 tls: first record does not look like a TLS handshake

If you already know more about this, could you please let me know...?

[What I did]

- Change the port to 44433.

- Send a client request

$ curl -Lv -x http://127.0.0.1:44433 https://example.com

* Trying 127.0.0.1:44433...

* Connected to 127.0.0.1 (127.0.0.1) port 44433 (#0)

* allocate connect buffer!

* Establish HTTP proxy tunnel to example.com:443

CONNECT example.com:443 HTTP/1.1

Host: example.com:443

User-Agent: curl/7.77.0

Proxy-Connection: Keep-Alive

* Proxy CONNECT aborted

* CONNECT phase completed!

* Closing connection 0

- proxy server's log

curl: (56) Proxy CONNECT aborted

Reply

Post a Reply

Your comment will be public. To contact me privately, email me. Please keep your comment polite, on-topic, and comprehensible. Your comment may be held for moderation before being published.

(Optional; will be published)

(Optional; will not be published)

(Optional; will be published)

  • Blank lines separate paragraphs.
  • Lines starting with > are indented as block quotes.
  • Lines starting with two spaces are reproduced verbatim (good for code).
  • Text surrounded by *asterisks* is italicized.
  • Text surrounded by `back ticks` is monospaced.
  • URLs are turned into links.
  • Use the Preview button to check your formatting.