tcp2ws

package module
v0.0.0-...-b61862d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 30, 2017 License: GPL-2.0 Imports: 5 Imported by: 0

README

tcp2ws-go

TCP to WebSocket Client proxy written in Go

This was written to solve the problem of communicating with a VNC server that is wrapped in WebSockets, with a connecting client that doesn't speak WebSockets (any normal desktop client)

It creates a TCP server on the specified HOST/PORT combination, and each incoming connection gets proxied to the upstream WebSocket destination

Install

TODO: Install instructions

Usage

go run cmd/tcp2ws/main.go --lhost= localhost:3333 --rhost ws://1.2.3.4:80/websock
Options:
  • -lhost="localhost:3333": TCP HOST:PORT to listen on
  • -rhost="REQUIRED": URL of upstream websocket server. Format is 'ws://HOST:PORT/PATH'

Documentation

Index

Constants

View Source
const (
	CONN_TYPE   = "tcp"
	BUFFER_SIZE = 1024
)

Variables

This section is empty.

Functions

func Proxy

func Proxy(forever bool, listenHost string, remoteHost string) error

If forever is true, it will run in an infinite loop accepting new connections and proxying them to rhost. If it is false, it will stop listening on listenHost after the first connection is established.

Types

This section is empty.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL