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

package blackhole

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

Index

Package Files

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

Variables

var File_proxy_blackhole_config_proto protoreflect.FileDescriptor

type Config Uses

type Config struct {
    Response *serial.TypedMessage `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"`
    // contains filtered or unexported fields
}

func (*Config) Descriptor Uses

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

Deprecated: Use Config.ProtoReflect.Descriptor instead.

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 (x *Config) GetResponse() *serial.TypedMessage

func (*Config) ProtoMessage Uses

func (*Config) ProtoMessage()

func (*Config) ProtoReflect Uses

func (x *Config) ProtoReflect() protoreflect.Message

func (*Config) Reset Uses

func (x *Config) Reset()

func (*Config) String Uses

func (x *Config) String() string

type HTTPResponse Uses

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

func (*HTTPResponse) Descriptor Uses

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

Deprecated: Use HTTPResponse.ProtoReflect.Descriptor instead.

func (*HTTPResponse) ProtoMessage Uses

func (*HTTPResponse) ProtoMessage()

func (*HTTPResponse) ProtoReflect Uses

func (x *HTTPResponse) ProtoReflect() protoreflect.Message

func (*HTTPResponse) Reset Uses

func (x *HTTPResponse) Reset()

func (*HTTPResponse) String Uses

func (x *HTTPResponse) String() string

func (*HTTPResponse) WriteTo Uses

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

WriteTo implements ResponseConfig.WriteTo().

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 {
    // contains filtered or unexported fields
}

func (*NoneResponse) Descriptor Uses

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

Deprecated: Use NoneResponse.ProtoReflect.Descriptor instead.

func (*NoneResponse) ProtoMessage Uses

func (*NoneResponse) ProtoMessage()

func (*NoneResponse) ProtoReflect Uses

func (x *NoneResponse) ProtoReflect() protoreflect.Message

func (*NoneResponse) Reset Uses

func (x *NoneResponse) Reset()

func (*NoneResponse) String Uses

func (x *NoneResponse) String() string

func (*NoneResponse) WriteTo Uses

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

WriteTo implements ResponseConfig.WriteTo().

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 13 packages (graph) and is imported by 3 packages. Updated 2020-12-17. Refresh now. Tools for package owners.