Documentation ¶
Index ¶
- Constants
- type HTTPSContext
- type TLSContextDial
- type TransportHolding
- type XTransport
- func (XTransport *XTransport) BuildTLS(server common.RegisteredServer) error
- func (XTransport *XTransport) BuildTransport(server common.RegisteredServer, _ *conceptions.NestedProxy) error
- func (XTransport *XTransport) FetchDoT(name string, serverProto string, ctx *common.TLSContext, body *[]byte, ...) ([]byte, error)
- func (XTransport *XTransport) FetchHTTPS(name string, path string, method string, doh bool, ctx *HTTPSContext, ...) ([]byte, error)
- func (XTransport *XTransport) Get(name string, path string, ctx *HTTPSContext, Timeout time.Duration) ([]byte, error)
- func (XTransport *XTransport) Post(name string, path string, ctx *HTTPSContext, body *[]byte, ...) ([]byte, error)
Constants ¶
View Source
const ( GET = "GET" POST = "POST" DOHMediaType = "application/dns-message" DefaultKeepAlive = 0 * time.Second DefaultTimeout = 30 * time.Second 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 ¶
This section is empty.
Types ¶
type HTTPSContext ¶
type HTTPSContext struct { context.Context TLSContextDial // contains filtered or unexported fields }
soul of HTTPS
func (*HTTPSContext) Value ¶
func (c *HTTPSContext) Value(key interface{}) interface{}
type TLSContextDial ¶
name, conn, err
type TransportHolding ¶
type TransportHolding struct { *tls.Config IPs *atomic.Value //*EPRing Name *string //redundant key: name of stamp for now DomainName string SNIShadow string SNIBlotUp stamps.SNIBlotUpType Context *HTTPSContext Proxies *conceptions.NestedProxy // individual proxies chain }
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
func (*TransportHolding) BuildTLS ¶
func (th *TransportHolding) BuildTLS(XTransport *XTransport) (cfg *tls.Config)
func (*TransportHolding) BuildTransport ¶
func (th *TransportHolding) BuildTransport(XTransport *XTransport, proxies *conceptions.NestedProxy) error
type XTransport ¶
type XTransport struct { *http.Transport Transports map[string]*TransportHolding //key: name of stamp for now KeepAlive time.Duration Timeout time.Duration TlsDisableSessionTickets bool Proxies *conceptions.NestedProxy LocalInterface *string }
upon TLS
func NewXTransport ¶
func NewXTransport() *XTransport
func (*XTransport) BuildTLS ¶
func (XTransport *XTransport) BuildTLS(server common.RegisteredServer) error
func (*XTransport) BuildTransport ¶
func (XTransport *XTransport) BuildTransport(server common.RegisteredServer, _ *conceptions.NestedProxy) error
general template for all TLS conn;
func (*XTransport) FetchDoT ¶
func (XTransport *XTransport) FetchDoT(name string, serverProto string, ctx *common.TLSContext, body *[]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 (*XTransport) FetchHTTPS ¶
func (*XTransport) Get ¶
func (XTransport *XTransport) Get(name string, path string, ctx *HTTPSContext, Timeout time.Duration) ([]byte, error)
Click to show internal directories.
Click to hide internal directories.