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.
Click to show internal directories.
Click to hide internal directories.