Documentation ¶
Index ¶
- Constants
- func InitTLS13()
- func NewZTransport(alive time.Duration, timeout time.Duration) (t *http.Transport)
- type HttpMethod
- type PinningError
- type TLSMeta
- func (sm *TLSMeta) FetchDoT(_ string, ctx context.Context, msg *[]byte, timeout time.Duration, ...) (*[]byte, error)
- func (sm *TLSMeta) FetchHTTPS(trans *http.Transport, domain, path *string, method HttpMethod, doh bool, ...) (*[]byte, error)
- func (sm *TLSMeta) Get(trans *http.Transport, domain, path *string, ctx context.Context, ...) (*[]byte, error)
- func (sm *TLSMeta) Post(trans *http.Transport, domain, path *string, ctx context.Context, body *[]byte, ...) (*[]byte, error)
Constants ¶
View Source
const ( GET = HttpMethod(0) POST = HttpMethod(1) HTTPGET = "GET" HTTPPOST = "POST" DOHMediaType = "application/dns-message" DoTDefaultPort = 853 MaxHTTPBodyLength = 4000000 TLS_AES_128_GCM_SHA256 = 0x1301 // 16bytes key TLS_AES_256_GCM_SHA384 = 0x1302 // 1st not pq ready TLS_CHACHA20_POLY1305_SHA256 = 0x1303 // 2nd not pq ready )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HttpMethod ¶ added in v1.2.0
type HttpMethod uint8
type PinningError ¶ added in v1.2.0
type PinningError struct {
// contains filtered or unexported fields
}
func (*PinningError) Error ¶ added in v1.2.0
func (e *PinningError) Error() string
type TLSMeta ¶ added in v1.2.0
type TLSMeta struct { *protocols.NetworkBase *tls.Config IPs *atomic.Value //*EPRing or string of single endpoint Name *string //redundant key: name of stamp for now DomainName string SNIShadow string SNIBlotUp stamps.SNIBlotUpType Pinnings [][]byte DefaultContext context.Context //TLSContext or HTTPSContext }
to reduce memory payload, shift http's Transport and ensure single instance of it now give up calling CloseIdleConnections method which has side effect on burst connections with different cm since we use custom dial on Transport with variant of tls config, have to cover all the proxies usage upon TLS
func NewTLSMeta ¶ added in v1.2.0
func NewTLSMeta(server *common.RegisteredServer, network *protocols.NetworkBase, disableTLSSession bool) *TLSMeta
func (*TLSMeta) FetchDoT ¶ added in v1.2.0
func (sm *TLSMeta) FetchDoT(_ string, ctx context.Context, msg *[]byte, timeout time.Duration, cbs ...interface{}) (*[]byte, error)
I don't foresee any benefit from dtls, so let's wait for DNS over QUIC
func (*TLSMeta) FetchHTTPS ¶ added in v1.2.0
Click to show internal directories.
Click to hide internal directories.