insecure

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: May 20, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package insecure provides an insecure (if it were not obvious yet) TLS proxy that can be used for testing osquery enrollment with a Fleet (or other TLS) server in non-production environments.

Functions in this package are NOT SUITABLE FOR PRODUCTION ENVIRONMENTS!

Index

Constants

View Source
const (
	// ServerCert is the certificate used by the proxy server.
	ServerCert = `` /* 977-byte string literal not displayed */

)

Variables

This section is empty.

Functions

This section is empty.

Types

type TLSProxy

type TLSProxy struct {
	// Port is the port the TLS proxy is listening on (always on localhost).
	Port int
	// contains filtered or unexported fields
}

TLSProxy is the insecure TLS proxy implementation. This type should only be initialized via NewTLSProxy.

func NewTLSProxy

func NewTLSProxy(targetURL string) (*TLSProxy, error)

NewTLSProxy creates a new proxy implementation targeting the provided hostname.

func (*TLSProxy) Close

func (p *TLSProxy) Close() error

Close the server and associated listener. The server may not be reused after calling Close().

func (*TLSProxy) InsecureServeTLS

func (p *TLSProxy) InsecureServeTLS() error

InsecureServeTLS will begin running the TLS proxy.

Jump to

Keyboard shortcuts

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