~rumpelsepp/webcat

0dd2b6ac7792f99c270461dc1096c000bc7ea248 — Stefan Tatschner 5 months ago bb3c2f8
Add manpage
3 files changed, 94 insertions(+), 0 deletions(-)

A man/.gitignore
A man/Makefile
A man/webcat.1.adoc
A man/.gitignore => man/.gitignore +2 -0
@@ 0,0 1,2 @@
/*.html
/*.1

A man/Makefile => man/Makefile +47 -0
@@ 0,0 1,47 @@
# Copyright (c) 2015-2016 Stefan Tatschner
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

ASCIIDOC            = asciidoctor
ASCIIDOC_MAN        = asciidoctor
ASCIIDOC_MAN_FLAGS  = -d manpage -b manpage
ASCIIDOC_HTML_FLAGS =

MAN_ADOCS = $(wildcard *.adoc)
DOC_MAN   = $(patsubst %.adoc,%,$(MAN_ADOCS))
DOC_HTML   = $(patsubst %.adoc,%.html,$(MAN_ADOCS))
INCLUDES   =
CSS        =

all: html man

html: $(DOC_HTML)

man: $(DOC_MAN)

clean:
	$(RM) *.1 *.html

% : %.adoc $(INCLUDES)
	$(ASCIIDOC_MAN) $(ASCIIDOC_MAN_FLAGS) $<

%.html : %.adoc $(INCLUDES) $(CSS)
	$(ASCIIDOC) $(ASCIIDOC_HTML_FLAGS) $<

.PHONY: clean

A man/webcat.1.adoc => man/webcat.1.adoc +45 -0
@@ 0,0 1,45 @@
= webcat(1)
:doctype:    manpage

== Name

webcat - the swiss army knife for websocket

== Synopsis

    webcat [OPTIONS]

== Description

webcat is a tool which very similar to the well known `netcat` utility.
It reads data from stdin and prints received data to stdout.
Instead of using raw TCP connections webcat uses the websocket protocol (RFC6455).

== Options

`-H HEADER`::
    Set a request header in the form `NAME=VALUE`.
    This header is sent in the initial HTTP request which is then upgraded to a websocket connection.

`-f SHA256 VALUE`::
    Set the expected SHA256 value of the server certificate.
    The hashsum is calculated over the whole certificate in DER encoding.

`-k SECONDS`::
    Send websocket keep alive probes every `SECONDS` seconds.

`-l ADDRESS`::
    Be a server and listen on this address.

`-t TARGET`::
    Connect to `TARGET`.
    When in server mode and target is not `-` (means stdout) then the incoming connection is proxied to `TARGET`.

== Example

For using an SSH through websocket see this blog article: https://rumpelsepp.org/blog/ssh-through-websocket/

== Authors

Maintained by Stefan Tatschner <stefan@rumpelsepp.org>.
The Git repository is hosted here: https://git.sr.ht/~rumpelsepp/webcat