TCP over HTTP server
Here is examples to show how to use TCP over HTTP. Actually, the following examples show "HTTP over HTTPS" and "HTTPS over HTTPS".
Here is an example to request to example.com.
curl --data-binary @- 'https://tcphttp.glitch.me?host=example.com&port=80' <<EOS
GET / HTTP/1.1
Host: example.com
Connection: close
EOSHere is an example to use HTTPS.
curl --data-binary @- 'https://tcphttp.glitch.me?host=example.com&port=443&tls' <<EOS
GET / HTTP/1.1
Host: example.com
Connection: close
EOSClick the button below and run a server.
Run a tcphttp-server on http://localhost:8181 by the following command.
docker run -p 8181:8080 nwtgck/tcphttp-serverYou can also specify options as follows.
docker run -p 8181:80 nwtgck/tcphttp-server --http-port=80Install tcphttp-server as command as follows.
npm install -g tcphttp-serverThen, run a server as follows.
tcphttp-server --http-port=8181Run a server from the latest source.
# Clone this repository
git clone https://github.com/nwtgck/tcphttp-server.git
# Go to the directory
cd tcphttp-server
# Install dependencies
npm install
# Run a server
npm start