selfor

command module
v0.0.0-...-237d849 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2020 License: MIT Imports: 7 Imported by: 0

README

Selfor

Selfor (pronounced like Sulfur) is a Selective TCP Forwarder. Connections to selfor are forwarded to a host defined in a Redis instance.

Motivation

SSH cannot be load balanced on the basis of hostname due to the nature of the protocol, but with selfor, you can expose multiple servers inside a firewall to the outside world with a single open port. For every source IP address, a destination is mapped to the forwarded, which may be chosen externally by simply setting a value in Redis.

Redis

Each key in redis should be the source IP as the key and the value as a hashmap with d as the destination and i as extra logging info.

HSET 103.4.1.33 d 10.100.100.100:22
HSET 103.4.1.33 i myuser
EXPIRE 103.4.1.3 3600

Such calls may be made by an externally authenticated application (e.g. by a web interface). An example application in PHP (without any authentication) is provided in this repo.

PROXY protocol

Connections from nginx stream module are supported with remote identification with PROXY protocol

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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