mirror of
https://github.com/gl-inet/glkvm-cloud.git
synced 2026-09-16 15:45:16 +00:00
606377fbf8
Remove the obsolete legacy main entry to avoid confusion and reduce maintenance overhead. Signed-off-by: GL.iNet-Yongping.Xie <yongping.xie@gl-inet.com>
42 lines
988 B
Go
Executable File
42 lines
988 B
Go
Executable File
package server
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"rttys/internal/proxy"
|
|
)
|
|
|
|
type HostInfo = proxy.HostInfo
|
|
|
|
func getHostInfoFromRequest(req *http.Request) HostInfo {
|
|
return proxy.GetHostInfoFromRequest(req)
|
|
}
|
|
|
|
func isIPHost(host string) bool {
|
|
return proxy.IsIPHost(host)
|
|
}
|
|
|
|
func domainAllowed(host, base string) bool {
|
|
return proxy.DomainAllowed(host, base)
|
|
}
|
|
|
|
func buildRedirectHost(hostname, devid string) string {
|
|
return proxy.BuildRedirectHost(hostname, devid)
|
|
}
|
|
|
|
func joinHostPortIfNeeded(host, scheme, port string) string {
|
|
return proxy.JoinHostPortIfNeeded(host, scheme, port)
|
|
}
|
|
|
|
func buildRedirectLocation(scheme, hostPort, path, sid string) string {
|
|
return proxy.BuildRedirectLocation(scheme, hostPort, path, sid)
|
|
}
|
|
|
|
func getRequestHostInfo(req *http.Request) (host string, port string, proto string) {
|
|
return proxy.GetRequestHostInfo(req)
|
|
}
|
|
|
|
func extractDeviceIDFromHost(host string) (string, bool) {
|
|
return proxy.ExtractDeviceIDFromHost(host)
|
|
}
|