Documentation ¶
Overview ¶
Package http is a generated protocol buffer package.
It is generated from these files:
v2ray.com/core/transport/internet/authenticators/http/config.proto
It has these top-level messages:
Header Version Method RequestConfig Status ResponseConfig Config
Index ¶
- Constants
- type Config
- type Header
- type HeaderReader
- type HeaderWriter
- type HttpAuthenticator
- type HttpAuthenticatorFactory
- type HttpConn
- type Method
- type NoOpReader
- type NoOpWriter
- type Reader
- type RequestConfig
- func (*RequestConfig) Descriptor() ([]byte, []int)
- func (this *RequestConfig) GetFullVersion() string
- func (m *RequestConfig) GetHeader() []*Header
- func (m *RequestConfig) GetMethod() *Method
- func (m *RequestConfig) GetVersion() *Version
- func (this *RequestConfig) PickHeaders() []string
- func (this *RequestConfig) PickUri() string
- func (*RequestConfig) ProtoMessage()
- func (m *RequestConfig) Reset()
- func (m *RequestConfig) String() string
- type ResponseConfig
- func (*ResponseConfig) Descriptor() ([]byte, []int)
- func (this *ResponseConfig) GetFullVersion() string
- func (m *ResponseConfig) GetHeader() []*Header
- func (m *ResponseConfig) GetStatus() *Status
- func (m *ResponseConfig) GetVersion() *Version
- func (this *ResponseConfig) HasHeader(header string) bool
- func (this *ResponseConfig) PickHeaders() []string
- func (*ResponseConfig) ProtoMessage()
- func (m *ResponseConfig) Reset()
- func (m *ResponseConfig) String() string
- type Status
- type Version
- type Writer
Constants ¶
View Source
const ( CRLF = "\r\n" ENDING = CRLF + CRLF )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Settings for authenticating requests. If not set, client side will not send authenication header, and server side will bypass authentication. Request *RequestConfig `protobuf:"bytes,1,opt,name=request" json:"request,omitempty"` // Settings for authenticating responses. If not set, client side will bypass authentication, and server side will not send authentication header. Response *ResponseConfig `protobuf:"bytes,2,opt,name=response" json:"response,omitempty"` }
func (*Config) Descriptor ¶
func (*Config) GetRequest ¶
func (m *Config) GetRequest() *RequestConfig
func (*Config) GetResponse ¶
func (m *Config) GetResponse() *ResponseConfig
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
type Header ¶
type Header struct { // "Accept", "Cookie", etc Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` // Each entry must be valid in one piece. Random entry will be chosen if multiple entries present. Value []string `protobuf:"bytes,2,rep,name=value" json:"value,omitempty"` }
func (*Header) Descriptor ¶
func (*Header) ProtoMessage ¶
func (*Header) ProtoMessage()
type HeaderReader ¶
type HeaderReader struct { }
type HeaderWriter ¶
type HeaderWriter struct {
// contains filtered or unexported fields
}
func NewHeaderWriter ¶
func NewHeaderWriter(header *alloc.Buffer) *HeaderWriter
type HttpAuthenticator ¶
type HttpAuthenticator struct {
// contains filtered or unexported fields
}
func (HttpAuthenticator) GetClientWriter ¶
func (this HttpAuthenticator) GetClientWriter() *HeaderWriter
func (HttpAuthenticator) GetServerWriter ¶
func (this HttpAuthenticator) GetServerWriter() *HeaderWriter
type HttpAuthenticatorFactory ¶
type HttpAuthenticatorFactory struct{}
func (HttpAuthenticatorFactory) Create ¶
func (HttpAuthenticatorFactory) Create(config interface{}) internet.ConnectionAuthenticator
type Method ¶
type Method struct {
Value string `protobuf:"bytes,1,opt,name=value" json:"value,omitempty"`
}
HTTP method. Default value "GET".
func (*Method) Descriptor ¶
func (*Method) ProtoMessage ¶
func (*Method) ProtoMessage()
type NoOpReader ¶
type NoOpReader struct{}
type NoOpWriter ¶
type NoOpWriter struct{}
type RequestConfig ¶
type RequestConfig struct { // Full HTTP version like "1.1". Version *Version `protobuf:"bytes,1,opt,name=version" json:"version,omitempty"` // GET, POST, CONNECT etc Method *Method `protobuf:"bytes,2,opt,name=method" json:"method,omitempty"` // URI like "/login.php" Uri []string `protobuf:"bytes,3,rep,name=uri" json:"uri,omitempty"` Header []*Header `protobuf:"bytes,4,rep,name=header" json:"header,omitempty"` }
func (*RequestConfig) Descriptor ¶
func (*RequestConfig) Descriptor() ([]byte, []int)
func (*RequestConfig) GetFullVersion ¶
func (this *RequestConfig) GetFullVersion() string
func (*RequestConfig) GetHeader ¶
func (m *RequestConfig) GetHeader() []*Header
func (*RequestConfig) GetMethod ¶
func (m *RequestConfig) GetMethod() *Method
func (*RequestConfig) GetVersion ¶
func (m *RequestConfig) GetVersion() *Version
func (*RequestConfig) PickHeaders ¶
func (this *RequestConfig) PickHeaders() []string
func (*RequestConfig) PickUri ¶
func (this *RequestConfig) PickUri() string
func (*RequestConfig) ProtoMessage ¶
func (*RequestConfig) ProtoMessage()
func (*RequestConfig) Reset ¶
func (m *RequestConfig) Reset()
func (*RequestConfig) String ¶
func (m *RequestConfig) String() string
type ResponseConfig ¶
type ResponseConfig struct { Version *Version `protobuf:"bytes,1,opt,name=version" json:"version,omitempty"` Status *Status `protobuf:"bytes,2,opt,name=status" json:"status,omitempty"` Header []*Header `protobuf:"bytes,3,rep,name=header" json:"header,omitempty"` }
func (*ResponseConfig) Descriptor ¶
func (*ResponseConfig) Descriptor() ([]byte, []int)
func (*ResponseConfig) GetFullVersion ¶
func (this *ResponseConfig) GetFullVersion() string
func (*ResponseConfig) GetHeader ¶
func (m *ResponseConfig) GetHeader() []*Header
func (*ResponseConfig) GetStatus ¶
func (m *ResponseConfig) GetStatus() *Status
func (*ResponseConfig) GetVersion ¶
func (m *ResponseConfig) GetVersion() *Version
func (*ResponseConfig) HasHeader ¶
func (this *ResponseConfig) HasHeader(header string) bool
func (*ResponseConfig) PickHeaders ¶
func (this *ResponseConfig) PickHeaders() []string
func (*ResponseConfig) ProtoMessage ¶
func (*ResponseConfig) ProtoMessage()
func (*ResponseConfig) Reset ¶
func (m *ResponseConfig) Reset()
func (*ResponseConfig) String ¶
func (m *ResponseConfig) String() string
type Status ¶
type Status struct { // Status code. Default "200". Code string `protobuf:"bytes,1,opt,name=code" json:"code,omitempty"` // Statue reason. Default "OK". Reason string `protobuf:"bytes,2,opt,name=reason" json:"reason,omitempty"` }
func (*Status) Descriptor ¶
func (*Status) ProtoMessage ¶
func (*Status) ProtoMessage()
type Version ¶
type Version struct {
Value string `protobuf:"bytes,1,opt,name=value" json:"value,omitempty"`
}
HTTP version. Default value "1.1".
func (*Version) Descriptor ¶
func (*Version) ProtoMessage ¶
func (*Version) ProtoMessage()
Click to show internal directories.
Click to hide internal directories.