Last active
December 1, 2021 19:11
-
-
Save SomajitDey/f2c5b2f6de3e5b3ed3092644a534ec08 to your computer and use it in GitHub Desktop.
SSL/TLS passthrough reverse proxy/load-balancer: read SNI in Client-Hello and redirect
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # Get localtest.me for curl https://localtest.me | |
| sudo nc -lk 443 | grep -Uzo --line-buffered '[0-9a-z\-\.]*test.me' | |
| # To read length of client hello handshake - the first 4th and 5th byte - record layer | |
| nc -l 8000 | (head -c3 >/dev/null; head -c2 | xxd -p) # for curl https://localtest.me:8000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment