All Projects → nwtgck → http-knocking

nwtgck / http-knocking

Licence: MIT license
🚪HTTP-Knocking hides a Web server and open it by knocking sequence: Hide Web server until your knocks

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to http-knocking

p3y
A single binary reverse proxy written in go. It was developed for use in Kubernetes, to wrap services like Prometheus with simple BasicAuth and TLS encryption.
Stars: ✭ 15 (-46.43%)
Mutual labels:  proxy-server, reverse-proxy
reproxy
Simple edge server / reverse proxy
Stars: ✭ 994 (+3450%)
Mutual labels:  proxy-server, reverse-proxy
bproxy
high-performance minimal HTTP reverse proxy
Stars: ✭ 28 (+0%)
Mutual labels:  proxy-server, reverse-proxy
go-reverse-proxy
Reverse proxy with simple routing configuration and override behaviour
Stars: ✭ 21 (-25%)
Mutual labels:  proxy-server, reverse-proxy
Ergo
The management of multiple apps running over different ports made easy
Stars: ✭ 452 (+1514.29%)
Mutual labels:  proxy-server, reverse-proxy
Mongols
C++ high performance networking with TCP/UDP/RESP/HTTP/WebSocket protocols
Stars: ✭ 250 (+792.86%)
Mutual labels:  proxy-server, reverse-proxy
json-caching-proxy
Node caching HTTP proxy built on top of express-http-proxy. Persists requests and responses to an in-memory HAR-like data structure based on HAR1.2 . Caches JSON content-type responses by default with the ability to cache an entire site; including content-types describing images. Useful for testing front end code, mocking api, and saving the cac…
Stars: ✭ 31 (+10.71%)
Mutual labels:  proxy-server, reverse-proxy
mps
MPS is a high-performance HTTP(S) proxy library that supports forward proxies, reverse proxies, man-in-the-middle proxies, tunnel proxies, Websocket proxies. MPS 是一个高性能HTTP(s)中间代理库,它支持正向代理、反向代理、中间人代理、隧道代理、Websocket代理
Stars: ✭ 64 (+128.57%)
Mutual labels:  proxy-server, reverse-proxy
throo
A Vert.x/Spring based HTTP reverse-proxy
Stars: ✭ 19 (-32.14%)
Mutual labels:  proxy-server, reverse-proxy
Noginx
High performance HTTP and reverse proxy server based on Node.js. 基于 Node.js 的高性能 HTTP 及反向代理服务器,类似nginx。
Stars: ✭ 53 (+89.29%)
Mutual labels:  proxy-server, reverse-proxy
node-proxy
High performance HTTP and reverse proxy server based on Node.js. 基于 Node.js 的高性能 HTTP 及反向代理服务器,类似nginx。
Stars: ✭ 71 (+153.57%)
Mutual labels:  proxy-server, reverse-proxy
saml-auth-proxy
Provides a SAML SP authentication proxy for backend web services
Stars: ✭ 38 (+35.71%)
Mutual labels:  proxy-server
docker-varnish
Docker image for Varnish Cache (caching HTTP reverse proxy)
Stars: ✭ 46 (+64.29%)
Mutual labels:  reverse-proxy
NakovForwardServer
TCP port forwarding software, written in Java: forwards a local TCP port (e.g. 127.0.0.1:1521) to external port (e.g. 0.0.0.0:1522)
Stars: ✭ 41 (+46.43%)
Mutual labels:  reverse-proxy
nimSocks
A filtering SOCKS proxy server and client library written in nim.
Stars: ✭ 51 (+82.14%)
Mutual labels:  proxy-server
Free-Proxy
Hi there will be a lot of proxies here.
Stars: ✭ 135 (+382.14%)
Mutual labels:  proxy-server
RandomProxyRuby
Tiny Library for get random proxy (free).
Stars: ✭ 16 (-42.86%)
Mutual labels:  proxy-server
wsp
HTTP tunnel over Websocket
Stars: ✭ 85 (+203.57%)
Mutual labels:  reverse-proxy
yastack
YAStack: User-space network-stack based on DPDK, FreeBSD TCP/IP Stack, EnvoyProxy
Stars: ✭ 90 (+221.43%)
Mutual labels:  proxy-server
docker-media-server
Jellyfin media server with sonarr, radarr, ombi, jackett, deluge and traefik
Stars: ✭ 37 (+32.14%)
Mutual labels:  reverse-proxy

http-knocking

NpmVersion CircleCI Docker Automated build

HTTP knocking is like port knocking. It hides your server, and allows you to open/close the server by certain knocking.
In HTTPS communication, knocking is hidden because of encryption unlike port knocking.

demo1

Run with npm

Suppose http://localhost:8181/ is running. The following command runs a http-knocking server on port 8282.

npm install -g http-knocking
http-knocking --port=8282 --target-host=localhost --target-port=8181 --open-knocking="/alpha,/foxtrot,/lima"

In the case of --open-knocking="/alpha,/foxtrot,/lima", you can open the server by accessing to

  1. http://localhost:8282/alpha
  2. http://localhost:8282/foxtrot
  3. http://localhost:8282/lima

Close procedure is the reverse order of open if --close-knocking is not specfied.
Technically, localhost:8282 is a reverse proxy server to localhost:8181.

Run with Docker Compose

Here is a docker-compose.yml to run Ghost on http-knocking.

version: '3.1'
services:
  http-knocking:
    image: nwtgck/http-knocking:v0.3.1
    ports:
      - '8282:8282'
    depends_on:
      - ghost
    restart: always
    command: --port=8282 --target-host=ghost --target-port=2368 --open-knocking="/alpha,/foxtrot,/lima"
  ghost:
    image: ghost
    restart: always
    expose:
      - "2368"

Options

Here is available options.

Options:
  --help                               Show help                       [boolean]
  --version                            Show version number             [boolean]
  --port                               Port of knocking server
                                                             [number] [required]
  --target-host                        Target host to hide   [string] [required]
  --target-port                        Target port to hide[number] [default: 80]
  --open-knocking                      Open-knocking sequence (e.g.
                                       "/alpha,/foxtrot,/lima")         [string]
  --close-knocking                     Close-knocking sequence (e.g.
                                       "/victor,/kilo")                 [string]
  --enable-websocket                   Enable WebSocket proxy   [default: false]
  --auto-close-millis                  Time millis to close automatically
                                                                        [number]
  --open-knocking-max-interval-millis  Time millis to reset open procedure
                                                                        [number]
  --http-request-limit                 Limit of HTTP request            [number]
  --on-upgrade-limit                   Limit of on-upgrade (WebSocket)  [number]
  --enable-fake-nginx                  Enable fake Nginx Internal Server Error
                                       response                 [default: false]
  --fake-nginx-version                 Nginx version in fake Nginx Internal
                                       Server Error response [default: "1.15.2"]
  --enable-empty-response              Enable empty response (NOTE: Not empty
                                       HTTP body)               [default: false]
  --enable-knocking-update             Enable auto knocking-update
                                                                [default: false]
  --knocking-update-interval-sec       Interval millis of auto knocking-update
                                                                 [default: 1800]
  --min-knocking-length                Min knocking length used in auto
                                       knocking-update              [default: 6]
  --max-knocking-length                Max knocking length used in auto
                                       knocking-update              [default: 8]
  --n-knockings                        The number of knocking sequence used in
                                       auto knocking-update         [default: 3]
  --webhook-url                        Webhook URL used in auto knocking-update
                                                                        [string]
  --webhook-template-path              Webhook template file path used in auto
                                       knocking-update                  [string]

--auto-close-millis option makes your server more secure because it closes automatically by time.
--open-knocking-max-interval-millis option also makes your server more secure because it resets open procedure by time.
--http-request-limit restricts the number of HTTP requests after knocking server opening.
--on-upgrade-limit restricts the number of on-upgrade (WebSocket) after knocking server opening.
--enable-fake-nginx option fakes server response like "Nginx Internal Server Error" when the knocking server is closed.
--fake-nginx-version option specifies Nginx version used in fake "Internal Server Error" response.
--enable-empty-response option changes a knocking server response to be empty when the knocking server is closed

Auto Knocking-Update

To get more secure, --enable-knocking-update option updates knocking-sequences regularly and notifies new sequences via Webhook. You can use any Webhook-supported services.

Here is a demo to notify to Slack.

Auto Knocking-Update to Slack

Here is a demo to notify to Discord.

Auto Knocking-Update to Discord

Templates of JSON notified to the services are located at

The following options are required to enable auto knocking-update.

  • --enable-knocking-update
  • --webhook-url=https://...
  • --webhook-template-path=./path/to/webhook/template

Fake English words

Fake English words used in auto knocking-update are generated by fakelish.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].