Documentation ¶
Index ¶
- Constants
- type TransportHolding
- type XTransport
- func (XTransport *XTransport) BuildTLS(server common.RegisteredServer, https bool) error
- func (XTransport *XTransport) BuildTransport(server common.RegisteredServer, _ *conceptions.NestedProxy) error
- func (XTransport *XTransport) FetchDoT(name string, serverProto string, ctx context.Context, body *[]byte, ...) ([]byte, error)
- func (XTransport *XTransport) FetchHTTPS(name string, path string, method string, doh bool, ctx context.Context, ...) ([]byte, error)
- func (XTransport *XTransport) Get(name string, path string, ctx context.Context, Timeout time.Duration) ([]byte, error)
- func (XTransport *XTransport) Post(name string, path string, ctx context.Context, body *[]byte, ...) ([]byte, error)
Constants ¶
View Source
const ( GET = "GET" POST = "POST" DOHMediaType = "application/dns-message" 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 TransportHolding ¶
type TransportHolding struct { *tls.Config IPs interface{} //*EPRing Name *string //redundant key: name of stamp for now DomainName string SNIShadow string SNIBlotUp stamps.SNIBlotUpType Proxies *conceptions.NestedProxy // individual proxies chain 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
func (*TransportHolding) BuildTLS ¶
func (th *TransportHolding) BuildTLS(XTransport *XTransport, ip string) (cfg *tls.Config)
func (*TransportHolding) BuildTransport ¶
func (th *TransportHolding) BuildTransport(XTransport *XTransport, proxies *conceptions.NestedProxy, https bool) 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, https bool) 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 context.Context, 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 ¶
Click to show internal directories.
Click to hide internal directories.