Documentation ¶
Index ¶
- Variables
- func Dial(ctx context.Context, dest net.Destination, ...) (stat.Connection, error)
- func ListenSH(ctx context.Context, address net.Address, port net.Port, ...) (internet.Listener, error)
- func NewMuxManager(config Multiplexing, newResource func() interface{}) *muxManager
- func NewUploadQueue(maxPackets int) *uploadQueue
- type BrowserDialerClient
- type Config
- func (*Config) Descriptor() ([]byte, []int)deprecated
- func (x *Config) GetDownloadSettings() *internet.StreamConfig
- func (x *Config) GetHeader() map[string]string
- func (x *Config) GetHost() string
- func (x *Config) GetNoSSEHeader() bool
- func (c *Config) GetNormalizedPath() string
- func (c *Config) GetNormalizedQuery() string
- func (c *Config) GetNormalizedScMaxConcurrentPosts() RandRangeConfig
- func (c *Config) GetNormalizedScMaxEachPostBytes() RandRangeConfig
- func (c *Config) GetNormalizedScMinPostsIntervalMs() RandRangeConfig
- func (c *Config) GetNormalizedXPaddingBytes() RandRangeConfig
- func (x *Config) GetPath() string
- func (c *Config) GetRequestHeader() http.Header
- func (x *Config) GetScMaxConcurrentPosts() *RandRangeConfig
- func (x *Config) GetScMaxEachPostBytes() *RandRangeConfig
- func (x *Config) GetScMinPostsIntervalMs() *RandRangeConfig
- func (x *Config) GetXPaddingBytes() *RandRangeConfig
- func (x *Config) GetXmux() *Multiplexing
- func (*Config) ProtoMessage()
- func (x *Config) ProtoReflect() protoreflect.Message
- func (x *Config) Reset()
- func (x *Config) String() string
- func (c *Config) WriteResponseHeader(writer http.ResponseWriter)
- type DefaultDialerClient
- type DialerClient
- type H1Conn
- type LazyReader
- type Listener
- type Multiplexing
- func (*Multiplexing) Descriptor() ([]byte, []int)deprecated
- func (x *Multiplexing) GetCMaxLifetimeMs() *RandRangeConfig
- func (x *Multiplexing) GetCMaxReuseTimes() *RandRangeConfig
- func (x *Multiplexing) GetMaxConcurrency() *RandRangeConfig
- func (x *Multiplexing) GetMaxConnections() *RandRangeConfig
- func (m *Multiplexing) GetNormalizedCMaxLifetimeMs() RandRangeConfig
- func (m *Multiplexing) GetNormalizedCMaxReuseTimes() RandRangeConfig
- func (m *Multiplexing) GetNormalizedMaxConcurrency() RandRangeConfig
- func (m *Multiplexing) GetNormalizedMaxConnections() RandRangeConfig
- func (*Multiplexing) ProtoMessage()
- func (x *Multiplexing) ProtoReflect() protoreflect.Message
- func (x *Multiplexing) Reset()
- func (x *Multiplexing) String() string
- type Packet
- type RandRangeConfig
- func (*RandRangeConfig) Descriptor() ([]byte, []int)deprecated
- func (x *RandRangeConfig) GetFrom() int32
- func (x *RandRangeConfig) GetTo() int32
- func (*RandRangeConfig) ProtoMessage()
- func (x *RandRangeConfig) ProtoReflect() protoreflect.Message
- func (x *RandRangeConfig) Reset()
- func (x *RandRangeConfig) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var File_transport_internet_splithttp_config_proto protoreflect.FileDescriptor
Functions ¶
func Dial ¶
func Dial(ctx context.Context, dest net.Destination, streamSettings *internet.MemoryStreamConfig) (stat.Connection, error)
func NewMuxManager ¶
func NewMuxManager(config Multiplexing, newResource func() interface{}) *muxManager
func NewUploadQueue ¶
func NewUploadQueue(maxPackets int) *uploadQueue
Types ¶
type BrowserDialerClient ¶
type BrowserDialerClient struct{}
implements splithttp.DialerClient in terms of browser dialer has no fields because everything is global state :O)
func (*BrowserDialerClient) OpenDownload ¶
func (*BrowserDialerClient) SendUploadRequest ¶
func (c *BrowserDialerClient) SendUploadRequest(ctx context.Context, url string, payload io.ReadWriteCloser, contentLength int64) error
type Config ¶
type Config struct { Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"` Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` Header map[string]string `` /* 153-byte string literal not displayed */ ScMaxConcurrentPosts *RandRangeConfig `protobuf:"bytes,4,opt,name=scMaxConcurrentPosts,proto3" json:"scMaxConcurrentPosts,omitempty"` ScMaxEachPostBytes *RandRangeConfig `protobuf:"bytes,5,opt,name=scMaxEachPostBytes,proto3" json:"scMaxEachPostBytes,omitempty"` ScMinPostsIntervalMs *RandRangeConfig `protobuf:"bytes,6,opt,name=scMinPostsIntervalMs,proto3" json:"scMinPostsIntervalMs,omitempty"` NoSSEHeader bool `protobuf:"varint,7,opt,name=noSSEHeader,proto3" json:"noSSEHeader,omitempty"` XPaddingBytes *RandRangeConfig `protobuf:"bytes,8,opt,name=xPaddingBytes,proto3" json:"xPaddingBytes,omitempty"` Xmux *Multiplexing `protobuf:"bytes,9,opt,name=xmux,proto3" json:"xmux,omitempty"` DownloadSettings *internet.StreamConfig `protobuf:"bytes,10,opt,name=downloadSettings,proto3" json:"downloadSettings,omitempty"` // contains filtered or unexported fields }
func (*Config) Descriptor
deprecated
func (*Config) GetDownloadSettings ¶
func (x *Config) GetDownloadSettings() *internet.StreamConfig
func (*Config) GetNoSSEHeader ¶
func (*Config) GetNormalizedPath ¶
func (*Config) GetNormalizedQuery ¶
func (*Config) GetNormalizedScMaxConcurrentPosts ¶
func (c *Config) GetNormalizedScMaxConcurrentPosts() RandRangeConfig
func (*Config) GetNormalizedScMaxEachPostBytes ¶
func (c *Config) GetNormalizedScMaxEachPostBytes() RandRangeConfig
func (*Config) GetNormalizedScMinPostsIntervalMs ¶
func (c *Config) GetNormalizedScMinPostsIntervalMs() RandRangeConfig
func (*Config) GetNormalizedXPaddingBytes ¶
func (c *Config) GetNormalizedXPaddingBytes() RandRangeConfig
func (*Config) GetRequestHeader ¶
func (*Config) GetScMaxConcurrentPosts ¶
func (x *Config) GetScMaxConcurrentPosts() *RandRangeConfig
func (*Config) GetScMaxEachPostBytes ¶
func (x *Config) GetScMaxEachPostBytes() *RandRangeConfig
func (*Config) GetScMinPostsIntervalMs ¶
func (x *Config) GetScMinPostsIntervalMs() *RandRangeConfig
func (*Config) GetXPaddingBytes ¶
func (x *Config) GetXPaddingBytes() *RandRangeConfig
func (*Config) GetXmux ¶
func (x *Config) GetXmux() *Multiplexing
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
func (*Config) ProtoReflect ¶
func (x *Config) ProtoReflect() protoreflect.Message
func (*Config) WriteResponseHeader ¶
func (c *Config) WriteResponseHeader(writer http.ResponseWriter)
type DefaultDialerClient ¶
type DefaultDialerClient struct {
// contains filtered or unexported fields
}
implements splithttp.DialerClient in terms of direct network connections
func (*DefaultDialerClient) OpenDownload ¶
func (*DefaultDialerClient) SendUploadRequest ¶
func (c *DefaultDialerClient) SendUploadRequest(ctx context.Context, url string, payload io.ReadWriteCloser, contentLength int64) error
type DialerClient ¶
type DialerClient interface { // (ctx, baseURL, payload) -> err // baseURL already contains sessionId and seq SendUploadRequest(context.Context, string, io.ReadWriteCloser, int64) error // (ctx, baseURL) -> (downloadReader, remoteAddr, localAddr) // baseURL already contains sessionId OpenDownload(context.Context, string) (io.ReadCloser, net.Addr, net.Addr, error) }
interface to abstract between use of browser dialer, vs net/http
type LazyReader ¶
type LazyReader struct { CreateReader func() (io.Reader, error) // contains filtered or unexported fields }
Close is intentionally not supported by LazyReader because it's not clear how CreateReader should be aborted in case of Close. It's best to wrap LazyReader in another struct that handles Close correctly, or better, stop using LazyReader entirely.
type Multiplexing ¶
type Multiplexing struct { MaxConcurrency *RandRangeConfig `protobuf:"bytes,1,opt,name=maxConcurrency,proto3" json:"maxConcurrency,omitempty"` MaxConnections *RandRangeConfig `protobuf:"bytes,2,opt,name=maxConnections,proto3" json:"maxConnections,omitempty"` CMaxReuseTimes *RandRangeConfig `protobuf:"bytes,3,opt,name=cMaxReuseTimes,proto3" json:"cMaxReuseTimes,omitempty"` CMaxLifetimeMs *RandRangeConfig `protobuf:"bytes,4,opt,name=cMaxLifetimeMs,proto3" json:"cMaxLifetimeMs,omitempty"` // contains filtered or unexported fields }
func (*Multiplexing) Descriptor
deprecated
func (*Multiplexing) Descriptor() ([]byte, []int)
Deprecated: Use Multiplexing.ProtoReflect.Descriptor instead.
func (*Multiplexing) GetCMaxLifetimeMs ¶
func (x *Multiplexing) GetCMaxLifetimeMs() *RandRangeConfig
func (*Multiplexing) GetCMaxReuseTimes ¶
func (x *Multiplexing) GetCMaxReuseTimes() *RandRangeConfig
func (*Multiplexing) GetMaxConcurrency ¶
func (x *Multiplexing) GetMaxConcurrency() *RandRangeConfig
func (*Multiplexing) GetMaxConnections ¶
func (x *Multiplexing) GetMaxConnections() *RandRangeConfig
func (*Multiplexing) GetNormalizedCMaxLifetimeMs ¶
func (m *Multiplexing) GetNormalizedCMaxLifetimeMs() RandRangeConfig
func (*Multiplexing) GetNormalizedCMaxReuseTimes ¶
func (m *Multiplexing) GetNormalizedCMaxReuseTimes() RandRangeConfig
func (*Multiplexing) GetNormalizedMaxConcurrency ¶
func (m *Multiplexing) GetNormalizedMaxConcurrency() RandRangeConfig
func (*Multiplexing) GetNormalizedMaxConnections ¶
func (m *Multiplexing) GetNormalizedMaxConnections() RandRangeConfig
func (*Multiplexing) ProtoMessage ¶
func (*Multiplexing) ProtoMessage()
func (*Multiplexing) ProtoReflect ¶
func (x *Multiplexing) ProtoReflect() protoreflect.Message
func (*Multiplexing) Reset ¶
func (x *Multiplexing) Reset()
func (*Multiplexing) String ¶
func (x *Multiplexing) String() string
type RandRangeConfig ¶
type RandRangeConfig struct { From int32 `protobuf:"varint,1,opt,name=from,proto3" json:"from,omitempty"` To int32 `protobuf:"varint,2,opt,name=to,proto3" json:"to,omitempty"` // contains filtered or unexported fields }
func (*RandRangeConfig) Descriptor
deprecated
func (*RandRangeConfig) Descriptor() ([]byte, []int)
Deprecated: Use RandRangeConfig.ProtoReflect.Descriptor instead.
func (*RandRangeConfig) GetFrom ¶
func (x *RandRangeConfig) GetFrom() int32
func (*RandRangeConfig) GetTo ¶
func (x *RandRangeConfig) GetTo() int32
func (*RandRangeConfig) ProtoMessage ¶
func (*RandRangeConfig) ProtoMessage()
func (*RandRangeConfig) ProtoReflect ¶
func (x *RandRangeConfig) ProtoReflect() protoreflect.Message
func (*RandRangeConfig) Reset ¶
func (x *RandRangeConfig) Reset()
func (*RandRangeConfig) String ¶
func (x *RandRangeConfig) String() string
Click to show internal directories.
Click to hide internal directories.