tunnel

package
v0.0.0-...-455eedf Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: Apache-2.0 Imports: 56 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LogFieldCommand             = "command"
	LogFieldExpandedPath        = "expandedPath"
	LogFieldPIDPathname         = "pidPathname"
	LogFieldTmpTraceFilename    = "tmpTraceFilename"
	LogFieldTraceOutputFilepath = "traceOutputFilepath"
)
View Source
const (
	CredFileFlagAlias = "cred-file"
	CredFileFlag      = "credentials-file"
	CredContentsFlag  = "credentials-contents"
	TunnelTokenFlag   = "token"

	LogFieldTunnelID = "tunnelID"
)

Variables

View Source
var FipsEnabled bool

Functions

func AsciiBox

func AsciiBox(lines []string, padding int) (box []string)

Print out the given lines in a nice ASCII box.

func Commands

func Commands() []*cli.Command

func Flags

func Flags() []cli.Flag

func Init

func Init(info *cliutil.BuildInfo, gracefulShutdown chan struct{})

func NewTagFromCLI

func NewTagFromCLI(compoundTag string) (tunnelpogs.Tag, bool)

func NewTagSliceFromCLI

func NewTagSliceFromCLI(tags []string) ([]tunnelpogs.Tag, error)

func ParseToken

func ParseToken(tokenStr string) (*connection.TunnelToken, error)

func RunQuickTunnel

func RunQuickTunnel(sc *subcommandContext) error

RunQuickTunnel requests a tunnel from the specified service. We use this to power quick tunnels on trycloudflare.com, but the service is open-source and could be used by anyone.

func StartServer

func StartServer(
	c *cli.Context,
	info *cliutil.BuildInfo,
	namedTunnel *connection.NamedTunnelProperties,
	log *zerolog.Logger,
) error

func TunnelCommand

func TunnelCommand(c *cli.Context) error

Types

type CredFinder

type CredFinder interface {
	Path() (string, error)
}

CredFinder can find the tunnel credentials file.

type Info

type Info struct {
	ID         uuid.UUID             `json:"id"`
	Name       string                `json:"name"`
	CreatedAt  time.Time             `json:"createdAt"`
	Connectors []*cfapi.ActiveClient `json:"conns"`
}

type QuickTunnel

type QuickTunnel struct {
	ID         string `json:"id"`
	Name       string `json:"name"`
	Hostname   string `json:"hostname"`
	AccountTag string `json:"account_tag"`
	Secret     []byte `json:"secret"`
}

type QuickTunnelError

type QuickTunnelError struct {
	Code    int
	Message string
}

type QuickTunnelResponse

type QuickTunnelResponse struct {
	Success bool
	Result  QuickTunnel
	Errors  []QuickTunnelError
}

Jump to

Keyboard shortcuts

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