Documentation
¶
Overview ¶
Package network provides network utilities for the 3x-ui web panel, including automatic HTTP to HTTPS redirection functionality.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAutoHttpsConn ¶
NewAutoHttpsConn creates a new AutoHttpsConn that wraps the given connection. It enables automatic redirection of HTTP requests to HTTPS.
Types ¶
type AutoHttpsConn ¶
AutoHttpsConn wraps a net.Conn to provide automatic HTTP to HTTPS redirection. It intercepts the first read to detect HTTP requests and responds with a 307 redirect to the HTTPS equivalent URL. Subsequent reads work normally for HTTPS connections.
type AutoHttpsListener ¶
AutoHttpsListener wraps a net.Listener to provide automatic HTTPS redirection. It returns AutoHttpsConn connections that handle HTTP to HTTPS redirection.