-
-
Save baleyko/003a089deb4f532552ef674e9ff4cea9 to your computer and use it in GitHub Desktop.
Socat: Simple HTTP Server
This file contains 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
socat \ | |
-v -d -d \ | |
TCP-LISTEN:1234,crlf,reuseaddr,fork \ | |
SYSTEM:" | |
echo HTTP/1.1 200 OK; | |
echo Content-Type\: text/plain; | |
echo; | |
echo \"Server: \$SOCAT_SOCKADDR:\$SOCAT_SOCKPORT\"; | |
echo \"Client: \$SOCAT_PEERADDR:\$SOCAT_PEERPORT\"; | |
" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment