Documentation ¶
Index ¶
- func ListenAndServe(addr, certFile, keyFile string, handler http.Handler) error
- func ListenAndServeTLS(addr, certFile, keyFile string, handler http.Handler) error
- func ListenAndServeWithTls(addr string, tlsConfig *tls.Config, handler http.Handler) (err error)
- type Client
- func (c *Client) Close()
- func (c *Client) CloseIdleConnections()
- func (c *Client) Get(path string) (string, error)
- func (c *Client) GetRaw(path string) (io.ReadCloser, error)
- func (c *Client) GetResponse(path string) (*http.Response, error)
- func (c *Client) PostJson(path string, value any) (string, error)
- func (c *Client) PostJsonRaw(path string, json []byte) (string, error)
- func (c *Client) PostJsonString(path string, json string) (string, error)
- type ClientPool
- func (cp *ClientPool) GetClientConn(address *net.UDPAddr) (net.PacketConn, error)
- func (cp *ClientPool) GetHttpClient(address *net.UDPAddr) (*Client, error)
- func (cp *ClientPool) GetTlsHttpClient(address *net.UDPAddr, cert *cert.Certificate) (*Client, error)
- func (cp *ClientPool) ReverseProxy(address *net.UDPAddr) (*ReverseProxy, error)
- func (cp *ClientPool) TlsReverseProxy(address *net.UDPAddr, cert *cert.Certificate) (*ReverseProxy, error)
- type ReverseProxy
- type Server
- func (server *Server) GetHttpClient(address *net.UDPAddr) (*Client, error)
- func (server *Server) GetReverseProxy(address *net.UDPAddr) (*ReverseProxy, error)
- func (server *Server) GetTlsHttpClient(address *net.UDPAddr, cert *cert.Certificate) (*Client, error)
- func (server *Server) GetTlsReverseProxy(address *net.UDPAddr, cert *cert.Certificate) (*ReverseProxy, error)
- func (server *Server) ListenAndServe(certFile, keyFile string, handler http.Handler) error
- func (server *Server) ListenAndServeTLS(certFile, keyFile string, handler http.Handler) error
- func (server *Server) ListenAndServeWithKuicTls(manager *cert.Manager, handler http.Handler) error
- func (server *Server) ListenAndServeWithTls(tlsConfig *tls.Config, handler http.Handler) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ListenAndServe ¶
func ListenAndServeTLS ¶ added in v0.0.3
Types ¶
type Client ¶ added in v0.0.7
type Client struct {
// contains filtered or unexported fields
}
func NewKuicClient ¶ added in v0.0.13
func NewKuicClient(address *net.UDPAddr, cer *cert.Certificate, conn net.PacketConn) *Client
func NewTlsClient ¶ added in v0.0.13
func (*Client) CloseIdleConnections ¶ added in v0.0.17
func (c *Client) CloseIdleConnections()
func (*Client) GetResponse ¶ added in v0.0.17
func (*Client) PostJsonRaw ¶ added in v0.0.8
type ClientPool ¶ added in v0.0.7
type ClientPool struct {
// contains filtered or unexported fields
}
func NewClientPool ¶ added in v0.0.7
func NewClientPool(baseServer kuic.BaseServer) *ClientPool
func (*ClientPool) GetClientConn ¶ added in v0.0.10
func (cp *ClientPool) GetClientConn(address *net.UDPAddr) (net.PacketConn, error)
func (*ClientPool) GetHttpClient ¶ added in v0.0.7
func (cp *ClientPool) GetHttpClient(address *net.UDPAddr) (*Client, error)
func (*ClientPool) GetTlsHttpClient ¶ added in v0.0.13
func (cp *ClientPool) GetTlsHttpClient(address *net.UDPAddr, cert *cert.Certificate) (*Client, error)
func (*ClientPool) ReverseProxy ¶ added in v0.0.10
func (cp *ClientPool) ReverseProxy(address *net.UDPAddr) (*ReverseProxy, error)
func (*ClientPool) TlsReverseProxy ¶ added in v0.0.16
func (cp *ClientPool) TlsReverseProxy(address *net.UDPAddr, cert *cert.Certificate) (*ReverseProxy, error)
type ReverseProxy ¶ added in v0.0.9
type ReverseProxy struct {
// contains filtered or unexported fields
}
func NewReverseProxy ¶ added in v0.0.9
func NewReverseProxy(remoteAddress *net.UDPAddr, conn net.PacketConn) (*ReverseProxy, error)
func NewTslReverseProxy ¶ added in v0.0.16
func NewTslReverseProxy(remoteAddress *net.UDPAddr, conn net.PacketConn, cert *cert.Certificate) (*ReverseProxy, error)
func (*ReverseProxy) ServeHTTP ¶ added in v0.0.9
func (p *ReverseProxy) ServeHTTP(rw http.ResponseWriter, req *http.Request)
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func CreateServer ¶
func (*Server) GetHttpClient ¶
func (*Server) GetReverseProxy ¶ added in v0.0.9
func (server *Server) GetReverseProxy(address *net.UDPAddr) (*ReverseProxy, error)
func (*Server) GetTlsHttpClient ¶ added in v0.0.13
func (*Server) GetTlsReverseProxy ¶ added in v0.0.16
func (server *Server) GetTlsReverseProxy(address *net.UDPAddr, cert *cert.Certificate) (*ReverseProxy, error)
func (*Server) ListenAndServe ¶ added in v0.0.5
func (*Server) ListenAndServeTLS ¶ added in v0.0.5
func (*Server) ListenAndServeWithKuicTls ¶ added in v0.0.13
Click to show internal directories.
Click to hide internal directories.