shttp

package module
v0.0.0-...-28ac690 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

README

shttp

Have you ever thought: Golly gee, HTTP is great and all, but wouldn't it be even better if it were a little less insecure?

Well do I have good news for you! The wait is finally over! Behold, Secure HTTP!

That's right, now you can browse the web in absolute safety with this one simply trick certificate authroties don't want you to know about!

shttp, it's HTTP over SSH!

But what about HTTPS?

Sorry, could you speak up a little? HTTPS? Never heard of it. Sounds fake. Probably made up.

Okay, but like seriously, why?

Mostly to demonstrate the flexability of the SSH protocol and for a laugh.

I feel that last bit bares clarifiation: This is a joke. A gag. Just for fun.

Great, can I use this in my next big thing?

No, you shouldn't use this. Not only is it highly impratical, it's probably not actually secure.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection struct {
	// contains filtered or unexported fields
}

func Dial

func Dial(options DialOptions) (*Connection, error)

func (*Connection) Close

func (c *Connection) Close() error

func (*Connection) Read

func (c *Connection) Read(p []byte) (n int, err error)

func (*Connection) Write

func (c *Connection) Write(p []byte) (n int, err error)

type DialOptions

type DialOptions struct {
	Network  string
	Address  string
	Identity ssh.Signer
	Timeout  time.Duration
}

type Identity

type Identity []byte

func NewIdentity

func NewIdentity() (Identity, error)

func (Identity) Signer

func (i Identity) Signer() ssh.Signer

type ListenOptions

type ListenOptions struct {
	Address  string
	Identity ssh.Signer
}

type Listener

type Listener struct {
	// contains filtered or unexported fields
}

func SetupListener

func SetupListener(options ListenOptions, handle func(conn *Connection)) (*Listener, error)

func (*Listener) Accept

func (l *Listener) Accept()

func (*Listener) Close

func (l *Listener) Close()

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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