tunnel

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ListenForTunnelCmd = &cobra.Command{
	Use:   "listen-for-tunnel",
	Short: "Listens for a tunnel creation notification",
	Long:  `Listens for a tunnel creation notification`,
	Args:  cobra.NoArgs,
	Run: func(cmd *cobra.Command, args []string) {
		if err := checkParameters(); err != nil {
			log.Fatal(err)
		}

		keypair := models.KeyPair{
			PrivateKeyPath:    privateKeyPath,
			CertificatePath:   certificatePath,
			CACertificatePath: rootCAPath,
		}

		if err := ListenForTunnel(thingName, keypair, endpoint); err != nil {
			log.Fatal(err)
		}
	},
}

ListenForTunnelCmd listens for a new tunnel to be requested

Functions

func ListenForTunnel

func ListenForTunnel(thingName string, keypair models.KeyPair, endpoint string) error

ListenForTunnel listens on the MQTT Tunnel Topic and sets up the tunnel once a notify message is received

func StartLocalProxy

func StartLocalProxy(params ProxyParams) error

StartLocalProxy starts a local proxy to the AWS IoT MQTT endpoint

Types

type ProxyParams

type ProxyParams struct {
	AccessToken     string
	ProxyEndpoint   string
	Region          string
	SourcePort      int
	DestinationApp  string
	NoSSLHostVerify bool
	ProxyScheme     string
}

ProxyParams holds the parameters for running the local proxy

Jump to

Keyboard shortcuts

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