proxy

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LCUProxy

type LCUProxy struct {

	// The hostname and port of the LCU.
	LCUHost string

	// The authentication token of the LCU.
	AuthToken string

	// Indicates if the startup message should be shown
	DisableStartUpMessage bool

	// Indicates if CORS should be disabled. When this property is set to true.
	// The Proxy will respond with the Header (Access-Control-Allow-Origin: *)
	DisableCORS bool

	// Indicates that the certificate check should be disabled
	DisableCertCheck bool
	// contains filtered or unexported fields
}

func CreateCustomProxy

func CreateCustomProxy(host string, lcuHost string, authToken string) *LCUProxy

CreateCustomProxy creates a new reverse proxy which can be used to get rid of https or/and the self-signed certificate. Also, it can be used to disable cors for local web development

Other than the function CreateProxy this method doesn't call the lcu.FindLCUConnectInfo function but depends on the specific auth-token and port

func CreateProxy

func CreateProxy(host string) (*LCUProxy, error)

CreateProxy creates a new reverse proxy which can be used to get rid of https or/and the self-signed certificate. Also, it can be used to disable cors for local web development

This function calls internally the lcu.FindLCUConnectInfo to retrieve the auth-token and port of the LCU.

func (*LCUProxy) ListenAndServe

func (proxy *LCUProxy) ListenAndServe() error

ListenAndServe Starts the proxy and waits for incoming requests.

To disable the startup message set DisableStartupMessage to true in the LCUProxy struct

Jump to

Keyboard shortcuts

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