core: v2ray.com/core/proxy/blackhole Index | Files

package blackhole

import "v2ray.com/core/proxy/blackhole"

Index

Package Files

blackhole.go config.go config.pb.go errors.generated.go

type Config Uses

type Config struct {
    Response             *serial.TypedMessage `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"`
    XXX_NoUnkeyedLiteral struct{}             `json:"-"`
    XXX_unrecognized     []byte               `json:"-"`
    XXX_sizecache        int32                `json:"-"`
}

func (*Config) Descriptor Uses

func (*Config) Descriptor() ([]byte, []int)

func (*Config) GetInternalResponse Uses

func (c *Config) GetInternalResponse() (ResponseConfig, error)

GetInternalResponse converts response settings from proto to internal data structure.

func (*Config) GetResponse Uses

func (m *Config) GetResponse() *serial.TypedMessage

func (*Config) ProtoMessage Uses

func (*Config) ProtoMessage()

func (*Config) Reset Uses

func (m *Config) Reset()

func (*Config) String Uses

func (m *Config) String() string

func (*Config) XXX_DiscardUnknown Uses

func (m *Config) XXX_DiscardUnknown()

func (*Config) XXX_Marshal Uses

func (m *Config) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Config) XXX_Merge Uses

func (m *Config) XXX_Merge(src proto.Message)

func (*Config) XXX_Size Uses

func (m *Config) XXX_Size() int

func (*Config) XXX_Unmarshal Uses

func (m *Config) XXX_Unmarshal(b []byte) error

type HTTPResponse Uses

type HTTPResponse struct {
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}

func (*HTTPResponse) Descriptor Uses

func (*HTTPResponse) Descriptor() ([]byte, []int)

func (*HTTPResponse) ProtoMessage Uses

func (*HTTPResponse) ProtoMessage()

func (*HTTPResponse) Reset Uses

func (m *HTTPResponse) Reset()

func (*HTTPResponse) String Uses

func (m *HTTPResponse) String() string

func (*HTTPResponse) WriteTo Uses

func (*HTTPResponse) WriteTo(writer buf.Writer) int32

WriteTo implements ResponseConfig.WriteTo().

func (*HTTPResponse) XXX_DiscardUnknown Uses

func (m *HTTPResponse) XXX_DiscardUnknown()

func (*HTTPResponse) XXX_Marshal Uses

func (m *HTTPResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*HTTPResponse) XXX_Merge Uses

func (m *HTTPResponse) XXX_Merge(src proto.Message)

func (*HTTPResponse) XXX_Size Uses

func (m *HTTPResponse) XXX_Size() int

func (*HTTPResponse) XXX_Unmarshal Uses

func (m *HTTPResponse) XXX_Unmarshal(b []byte) error

type Handler Uses

type Handler struct {
    // contains filtered or unexported fields
}

Handler is an outbound connection that silently swallow the entire payload.

func New Uses

func New(ctx context.Context, config *Config) (*Handler, error)

New creates a new blackhole handler.

func (*Handler) Process Uses

func (h *Handler) Process(ctx context.Context, link *transport.Link, dialer internet.Dialer) error

Process implements OutboundHandler.Dispatch().

type NoneResponse Uses

type NoneResponse struct {
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}

func (*NoneResponse) Descriptor Uses

func (*NoneResponse) Descriptor() ([]byte, []int)

func (*NoneResponse) ProtoMessage Uses

func (*NoneResponse) ProtoMessage()

func (*NoneResponse) Reset Uses

func (m *NoneResponse) Reset()

func (*NoneResponse) String Uses

func (m *NoneResponse) String() string

func (*NoneResponse) WriteTo Uses

func (*NoneResponse) WriteTo(buf.Writer) int32

WriteTo implements ResponseConfig.WriteTo().

func (*NoneResponse) XXX_DiscardUnknown Uses

func (m *NoneResponse) XXX_DiscardUnknown()

func (*NoneResponse) XXX_Marshal Uses

func (m *NoneResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*NoneResponse) XXX_Merge Uses

func (m *NoneResponse) XXX_Merge(src proto.Message)

func (*NoneResponse) XXX_Size Uses

func (m *NoneResponse) XXX_Size() int

func (*NoneResponse) XXX_Unmarshal Uses

func (m *NoneResponse) XXX_Unmarshal(b []byte) error

type ResponseConfig Uses

type ResponseConfig interface {
    // WriteTo writes predefined response to the give buffer.
    WriteTo(buf.Writer) int32
}

ResponseConfig is the configuration for blackhole responses.

Package blackhole imports 11 packages (graph) and is imported by 5 packages. Updated 2019-04-20. Refresh now. Tools for package owners.