Documentation ¶
Overview ¶
Package blackhole is an outbound handler that blocks all connections.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(space app.Space, config *Config, meta *proxy.OutboundHandlerMeta) (proxy.OutboundHandler, error)
New creates a new blackhole handler.
Types ¶
type Config ¶ added in v1.1.1
type Config struct {
Response *v2ray_core_common_serial.TypedMessage `protobuf:"bytes,1,opt,name=response" json:"response,omitempty"`
}
func (*Config) GetInternalResponse ¶
func (v *Config) GetInternalResponse() (ResponseConfig, error)
GetInternalResponse converts response settings from proto to internal data structure.
func (*Config) GetResponse ¶
func (m *Config) GetResponse() *v2ray_core_common_serial.TypedMessage
type Factory ¶ added in v1.17.1
type Factory struct{}
Factory is an utility for creating blackhole handlers.
func (*Factory) Create ¶ added in v1.17.1
func (v *Factory) Create(space app.Space, config interface{}, meta *proxy.OutboundHandlerMeta) (proxy.OutboundHandler, error)
Create implements OutboundHandlerFactory.Create().
func (*Factory) StreamCapability ¶ added in v1.17.1
func (v *Factory) StreamCapability() v2net.NetworkList
StreamCapability implements OutboundHandlerFactory.StreamCapability().
type HTTPResponse ¶ added in v1.17.1
type HTTPResponse struct { }
func (*HTTPResponse) Descriptor ¶
func (*HTTPResponse) Descriptor() ([]byte, []int)
func (*HTTPResponse) ProtoMessage ¶
func (*HTTPResponse) ProtoMessage()
func (*HTTPResponse) Reset ¶
func (m *HTTPResponse) Reset()
func (*HTTPResponse) String ¶
func (m *HTTPResponse) String() string
func (*HTTPResponse) WriteTo ¶ added in v1.17.1
func (v *HTTPResponse) WriteTo(writer buf.Writer)
WriteTo implements ResponseConfig.WriteTo().
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler is an outbound connection that sliently swallow the entire payload.
func (*Handler) Dispatch ¶
func (v *Handler) Dispatch(destination v2net.Destination, ray ray.OutboundRay)
Dispatch implements OutboundHandler.Dispatch().
type NoneResponse ¶ added in v1.17.1
type NoneResponse struct { }
func (*NoneResponse) Descriptor ¶
func (*NoneResponse) Descriptor() ([]byte, []int)
func (*NoneResponse) ProtoMessage ¶
func (*NoneResponse) ProtoMessage()
func (*NoneResponse) Reset ¶
func (m *NoneResponse) Reset()
func (*NoneResponse) String ¶
func (m *NoneResponse) String() string
func (*NoneResponse) WriteTo ¶ added in v1.17.1
func (v *NoneResponse) WriteTo(buf.Writer)
WriteTo implements ResponseConfig.WriteTo().
Click to show internal directories.
Click to hide internal directories.