exposure

package
v0.32.0 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package exposure persists local metadata for active tunnel exposures that cannot be retrieved from the Cloudflare API (e.g. the target port).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateDomain added in v0.2.2

func GenerateDomain(exposeID, cfDomain string) string

GenerateDomain constructs a flattened subdomain to prevent SSL wildcard mismatch. Cloudflare Universal SSL certificates automatically cover 1 level of wildcard (*.example.com). If cfDomain is already a subdomain (e.g. james.ipv1337.dev - 3 parts), navigating one level deeper (eagle.james.ipv1337.dev) causes SSL errors (ERR_SSL_VERSION_OR_CIPHER_MISMATCH) because it requires Advanced Certificate Manager coverage (*.*.ipv1337.dev is invalid, you must cover the base specifically). To bypass this, we combine the exposeID and the first subdomain part with a hyphen.

func LookupPort

func LookupPort(tunnelName string) string

LookupPort returns the port for a tunnel name, or "" if unknown.

func RemoveAll

func RemoveAll() error

Remove deletes all stored exposure entries.

func RemoveByName

func RemoveByName(tunnelName string) error

Remove deletes a single entry by tunnel name.

func Save

func Save(entry Entry) error

Save adds or updates an exposure entry.

Types

type Entry

type Entry struct {
	TunnelName string `json:"tunnel_name"`
	TunnelID   string `json:"tunnel_id"`
	Port       string `json:"port"`
	Domain     string `json:"domain"`
}

Entry records metadata about a single exposed tunnel.

func LoadAll

func LoadAll() ([]Entry, error)

LoadAll reads all persisted exposure entries.

Jump to

Keyboard shortcuts

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