Documentation ¶
Index ¶
- Variables
- func CleanQuic(httpClient *http.Client)
- func InsecureHttp() *http.Client
- func NewSocksHttpClient(socksAddr string) *http.Client
- func NewSocksHttpInsecure(socksAddr string) *http.Client
- func ProxyHttp(addr string) *http.Client
- type H2
- func (h2 *H2) Client(host string) *http.Client
- func (h2 *H2) HandlerWrapper(h http.Handler) *handlerWrapper
- func (h2 *H2) InitH2Server(port string, handler http.Handler, mtls bool) error
- func (h2 *H2) InitH2ServerListener(tcpConn *net.TCPListener, handler http.Handler, requestTLSClient bool) error
- func (h2 *H2) InitMTLSServer(port int, handler http.Handler) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Set to the address of the AP master AndroidAPMaster string )
Functions ¶
func InsecureHttp ¶
func NewSocksHttpClient ¶
NewSocksHttpClient returns a new client using SOCKS5 server.
func NewSocksHttpInsecure ¶
Returns a HTTP client using SOCKS gateway on the requested port.
Types ¶
type H2 ¶
type H2 struct { // Local mux is exposed on 127.0.0.1:5227 // Status, UI. LocalMux *http.ServeMux // MTLS mux. // In DMesh it exposes register, tcp, admin MTLSMux *http.ServeMux Certs *auth.Auth GRPC *grpc.Server // contains filtered or unexported fields }
H2 provides network communication over HTTP/2, QUIC, SSH It also handles the basic config loading - in particular certificates.
func NewTransport ¶
NewTransport initialized the H2 transport. Requires auth information for setting up TLS. Same certificate can be used for both server or client, like in Istio. This will also initialize a GRPC server and 2 Mux, one for localhost and one for ingress.
Verification is disabled in transport, but implemented in a wrapper, using authz.
func (*H2) HandlerWrapper ¶
func (*H2) InitH2Server ¶
func (*H2) InitH2ServerListener ¶
func (h2 *H2) InitH2ServerListener(tcpConn *net.TCPListener, handler http.Handler, requestTLSClient bool) error
Init a HTTPS server on a given listener. Will add TLS transport and certs !
Click to show internal directories.
Click to hide internal directories.