openvpn

package
v0.0.0-...-ddd9f4d Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnknownProto = errors.New("unknown protocol")
	ErrNoRemoteHost = errors.New("remote host not found")
	ErrNoRemoteIP   = errors.New("remote IP not found")
)

Functions

func ExtractHost

func ExtractHost(b []byte) (host, warning string, err error)

func ExtractIPs

func ExtractIPs(b []byte) (ips []netip.Addr, err error)

func ExtractProto

func ExtractProto(b []byte) (tcp, udp bool, err error)

func FetchFile

func FetchFile(ctx context.Context, client *http.Client, url string) (
	host string, err error,
)

func FetchMultiFiles

func FetchMultiFiles(ctx context.Context, client *http.Client, urls []string,
	failEarly bool,
) (hostToURL map[string]string, errors []error)

FetchMultiFiles fetches multiple Openvpn files in parallel and parses them to extract each of their host. A mapping from host to URL is returned.

Types

This section is empty.

Jump to

Keyboard shortcuts

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