proxy

package
v0.0.0-...-9257e39 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2022 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// The address and port of the proxy which server used!
	ProxyAddress string
	// Choose whether to use a proxy.
	UseProxy bool
	// The time limit for the registration center to determine the server timeout.
	Timeout time.Duration
)
View Source
var (
	// HostAddr is proxy service connection address and port!
	HostAddress string
	// The proxy server's listen port!
	ListenPort string
	// Choose the http's version of proxy.
	HttpVersion string
)

Functions

func FileRequestReverse

func FileRequestReverse(ch cache.Cache) gin.HandlerFunc

A more detailed proxy is needed for requests with file hash values, such as redirection based on the IP of the server where the file is stored.

func ReceiveHeartbeat

func ReceiveHeartbeat() gin.HandlerFunc

Responsible for receiving heartbeat packets from the background server.

func SendHeartbeat

func SendHeartbeat(local string)

Send heartbeat packets, the time interval will be half shorter than the timeout time in order to keep the connection.

func UniversalReverse

func UniversalReverse() gin.HandlerFunc

UniversalReverse random reverse proxy for ordinary requests to complete simple reverse.

func UploadRequestReverse

func UploadRequestReverse(ch cache.Cache) gin.HandlerFunc

Types

This section is empty.

Jump to

Keyboard shortcuts

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