traffic_http_fast

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2021 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Certs

type Certs struct {
	// contains filtered or unexported fields
}

Certs 证书集合结构体

func (*Certs) Get

func (c *Certs) Get(hostName string) (*tls.Certificate, bool)

Get 获取证书

type HttpService

type HttpService struct {
	// contains filtered or unexported fields
}

func NewHttpService

func NewHttpService(listener net.Listener) *HttpService

func (*HttpService) GetCertificate

func (h *HttpService) GetCertificate(info *tls.ClientHelloInfo) (*tls.Certificate, error)

GetCertificate 获取证书配置

func (*HttpService) SetHttp

func (h *HttpService) SetHttp(handler fasthttp.RequestHandler)

func (*HttpService) SetHttps

func (h *HttpService) SetHttps(handler fasthttp.RequestHandler, certs map[string]*tls.Certificate)

func (*HttpService) ShutDown

func (h *HttpService) ShutDown()

type HttpTraffic

type HttpTraffic struct {
	// contains filtered or unexported fields
}

func NewHttpTraffic

func NewHttpTraffic(tf traffic.ITraffic) *HttpTraffic

func (*HttpTraffic) Close

func (h *HttpTraffic) Close()

func (*HttpTraffic) Get

func (h *HttpTraffic) Get(port int) IService

func (*HttpTraffic) ShutDown

func (h *HttpTraffic) ShutDown(port int)

type IHttpTraffic

type IHttpTraffic interface {
	Get(port int) IService
	ShutDown(port int)
	Close()
}

type IService

type IService interface {
	SetHttps(handler fasthttp.RequestHandler, certs map[string]*tls.Certificate)
	SetHttp(handler fasthttp.RequestHandler)
	ShutDown()
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL