webteleport

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2023 License: MIT Imports: 9 Imported by: 53

README

WebTeleport Utils

go.dev reference License Visitors

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractAltSvcEndpoints

func ExtractAltSvcEndpoints(h http.Header, protocolId string) []string

ExtractAltSvcH3Endpoints reads Alt-Svc header returns a list of [host]:port endpoints

func ExtractURLPort

func ExtractURLPort(u *url.URL) string

ExtractURLPort returns the :port part from URL.Host (host[:port])

An empty string is returned if no port is found

func Graft

func Graft(base, alt string) string

Graft returns Host(base):Port(alt)

assuming - base is host[:port] - alt is [host]:port

func Hyperlink(name, url string) string

Print Hyperlink via OSC 8 ansi sequence. The syntax is: 'OSC 8 ; params ; url ST text OSC 8 ; ; ST' for more info see https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda

func MaybeHyperlink(l string) string

MaybeHyperlink turns input into ANSI hyperlink when stdin is a tty

func ToIdna

func ToIdna(s string) string

ToIdna converts a string to its idna form at best effort Should only be used on the hostname part without port

Types

This section is empty.

Directories

Path Synopsis
hack

Jump to

Keyboard shortcuts

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