Sign inSign up

nwtgck/tcphttp-server

By nwtgck

•Updated over 7 years ago

TCP over HTTP server

Image
0

2.1K

nwtgck/tcphttp-server repository overview

⁠tcphttp-server

npm Build Status Docker Automated build

Deploy

TCP over HTTP server

⁠Quick Start

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


EOS

Here 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


EOS

⁠Connection Flow

TCPHTTP Server Connection Flow

⁠Run Server

⁠Way 1: Run server on Heroku

Click the button below and run a server.

Deploy

⁠Way 2: Run server on Docker

Run a tcphttp-server on http://localhost:8181⁠ by the following command.

docker run -p 8181:8080 nwtgck/tcphttp-server

You can also specify options as follows.

docker run -p 8181:80 nwtgck/tcphttp-server --http-port=80
⁠Way 3: Run server with npm

Install tcphttp-server as command as follows.

npm install -g tcphttp-server

Then, run a server as follows.

tcphttp-server --http-port=8181
⁠Way 4: Run server from source

Run 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

Tag summary

Content type

Image

Digest

Size

31.3 MB

Last updated

over 7 years ago

docker pull nwtgck/tcphttp-server