proxyman

package
v0.0.0-...-6c32bdd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package proxyman defines applications for managing inbound and outbound proxies.

Index

Constants

This section is empty.

Variables

View Source
var AllocationStrategy_Type_name = map[int32]string{
	0: "Always",
	1: "Random",
	2: "External",
}
View Source
var AllocationStrategy_Type_value = map[string]int32{
	"Always":   0,
	"Random":   1,
	"External": 2,
}
View Source
var KnownProtocols_name = map[int32]string{
	0: "HTTP",
	1: "TLS",
}
View Source
var KnownProtocols_value = map[string]int32{
	"HTTP": 0,
	"TLS":  1,
}

Functions

func ContextWithSniffingConfig

func ContextWithSniffingConfig(ctx context.Context, c *SniffingConfig) context.Context

ContextWithSniffingConfig is a wrapper of session.ContextWithContent. Deprecated. Use session.ContextWithContent directly.

Types

type AllocationStrategy

type AllocationStrategy struct {
	Type AllocationStrategy_Type `protobuf:"varint,1,opt,name=type,proto3,enum=v2ray.core.app.proxyman.AllocationStrategy_Type" json:"type,omitempty"`
	// Number of handlers (ports) running in parallel.
	// Default value is 3 if unset.
	Concurrency *AllocationStrategy_AllocationStrategyConcurrency `protobuf:"bytes,2,opt,name=concurrency,proto3" json:"concurrency,omitempty"`
	// Number of minutes before a handler is regenerated.
	// Default value is 5 if unset.
	Refresh              *AllocationStrategy_AllocationStrategyRefresh `protobuf:"bytes,3,opt,name=refresh,proto3" json:"refresh,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                                      `json:"-"`
	XXX_unrecognized     []byte                                        `json:"-"`
	XXX_sizecache        int32                                         `json:"-"`
}

func (*AllocationStrategy) Descriptor

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

func (*AllocationStrategy) GetConcurrency

func (*AllocationStrategy) GetConcurrencyValue

func (s *AllocationStrategy) GetConcurrencyValue() uint32

func (*AllocationStrategy) GetRefresh

func (*AllocationStrategy) GetRefreshValue

func (s *AllocationStrategy) GetRefreshValue() uint32

func (*AllocationStrategy) GetType

func (*AllocationStrategy) ProtoMessage

func (*AllocationStrategy) ProtoMessage()

func (*AllocationStrategy) Reset

func (m *AllocationStrategy) Reset()

func (*AllocationStrategy) String

func (m *AllocationStrategy) String() string

func (*AllocationStrategy) XXX_DiscardUnknown

func (m *AllocationStrategy) XXX_DiscardUnknown()

func (*AllocationStrategy) XXX_Marshal

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

func (*AllocationStrategy) XXX_Merge

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

func (*AllocationStrategy) XXX_Size

func (m *AllocationStrategy) XXX_Size() int

func (*AllocationStrategy) XXX_Unmarshal

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

type AllocationStrategy_AllocationStrategyConcurrency

type AllocationStrategy_AllocationStrategyConcurrency struct {
	Value                uint32   `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*AllocationStrategy_AllocationStrategyConcurrency) Descriptor

func (*AllocationStrategy_AllocationStrategyConcurrency) GetValue

func (*AllocationStrategy_AllocationStrategyConcurrency) ProtoMessage

func (*AllocationStrategy_AllocationStrategyConcurrency) Reset

func (*AllocationStrategy_AllocationStrategyConcurrency) String

func (*AllocationStrategy_AllocationStrategyConcurrency) XXX_DiscardUnknown

func (m *AllocationStrategy_AllocationStrategyConcurrency) XXX_DiscardUnknown()

func (*AllocationStrategy_AllocationStrategyConcurrency) XXX_Marshal

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

func (*AllocationStrategy_AllocationStrategyConcurrency) XXX_Merge

func (*AllocationStrategy_AllocationStrategyConcurrency) XXX_Size

func (*AllocationStrategy_AllocationStrategyConcurrency) XXX_Unmarshal

type AllocationStrategy_AllocationStrategyRefresh

type AllocationStrategy_AllocationStrategyRefresh struct {
	Value                uint32   `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*AllocationStrategy_AllocationStrategyRefresh) Descriptor

func (*AllocationStrategy_AllocationStrategyRefresh) GetValue

func (*AllocationStrategy_AllocationStrategyRefresh) ProtoMessage

func (*AllocationStrategy_AllocationStrategyRefresh) Reset

func (*AllocationStrategy_AllocationStrategyRefresh) String

func (*AllocationStrategy_AllocationStrategyRefresh) XXX_DiscardUnknown

func (m *AllocationStrategy_AllocationStrategyRefresh) XXX_DiscardUnknown()

func (*AllocationStrategy_AllocationStrategyRefresh) XXX_Marshal

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

func (*AllocationStrategy_AllocationStrategyRefresh) XXX_Merge

func (*AllocationStrategy_AllocationStrategyRefresh) XXX_Size

func (*AllocationStrategy_AllocationStrategyRefresh) XXX_Unmarshal

type AllocationStrategy_Type

type AllocationStrategy_Type int32
const (
	// Always allocate all connection handlers.
	AllocationStrategy_Always AllocationStrategy_Type = 0
	// Randomly allocate specific range of handlers.
	AllocationStrategy_Random AllocationStrategy_Type = 1
	// External. Not supported yet.
	AllocationStrategy_External AllocationStrategy_Type = 2
)

func (AllocationStrategy_Type) EnumDescriptor

func (AllocationStrategy_Type) EnumDescriptor() ([]byte, []int)

func (AllocationStrategy_Type) String

func (x AllocationStrategy_Type) String() string

type InboundConfig

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

func (*InboundConfig) Descriptor

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

func (*InboundConfig) ProtoMessage

func (*InboundConfig) ProtoMessage()

func (*InboundConfig) Reset

func (m *InboundConfig) Reset()

func (*InboundConfig) String

func (m *InboundConfig) String() string

func (*InboundConfig) XXX_DiscardUnknown

func (m *InboundConfig) XXX_DiscardUnknown()

func (*InboundConfig) XXX_Marshal

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

func (*InboundConfig) XXX_Merge

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

func (*InboundConfig) XXX_Size

func (m *InboundConfig) XXX_Size() int

func (*InboundConfig) XXX_Unmarshal

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

type InboundHandlerConfig

type InboundHandlerConfig struct {
	Tag                  string               `protobuf:"bytes,1,opt,name=tag,proto3" json:"tag,omitempty"`
	ReceiverSettings     *serial.TypedMessage `protobuf:"bytes,2,opt,name=receiver_settings,json=receiverSettings,proto3" json:"receiver_settings,omitempty"`
	ProxySettings        *serial.TypedMessage `protobuf:"bytes,3,opt,name=proxy_settings,json=proxySettings,proto3" json:"proxy_settings,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

func (*InboundHandlerConfig) Descriptor

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

func (*InboundHandlerConfig) GetProxySettings

func (m *InboundHandlerConfig) GetProxySettings() *serial.TypedMessage

func (*InboundHandlerConfig) GetReceiverSettings

func (m *InboundHandlerConfig) GetReceiverSettings() *serial.TypedMessage

func (*InboundHandlerConfig) GetTag

func (m *InboundHandlerConfig) GetTag() string

func (*InboundHandlerConfig) ProtoMessage

func (*InboundHandlerConfig) ProtoMessage()

func (*InboundHandlerConfig) Reset

func (m *InboundHandlerConfig) Reset()

func (*InboundHandlerConfig) String

func (m *InboundHandlerConfig) String() string

func (*InboundHandlerConfig) XXX_DiscardUnknown

func (m *InboundHandlerConfig) XXX_DiscardUnknown()

func (*InboundHandlerConfig) XXX_Marshal

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

func (*InboundHandlerConfig) XXX_Merge

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

func (*InboundHandlerConfig) XXX_Size

func (m *InboundHandlerConfig) XXX_Size() int

func (*InboundHandlerConfig) XXX_Unmarshal

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

type KnownProtocols

type KnownProtocols int32
const (
	KnownProtocols_HTTP KnownProtocols = 0
	KnownProtocols_TLS  KnownProtocols = 1
)

func (KnownProtocols) EnumDescriptor

func (KnownProtocols) EnumDescriptor() ([]byte, []int)

func (KnownProtocols) String

func (x KnownProtocols) String() string

type MultiplexingConfig

type MultiplexingConfig struct {
	// Whether or not Mux is enabled.
	Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
	// Max number of concurrent connections that one Mux connection can handle.
	Concurrency          uint32   `protobuf:"varint,2,opt,name=concurrency,proto3" json:"concurrency,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*MultiplexingConfig) Descriptor

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

func (*MultiplexingConfig) GetConcurrency

func (m *MultiplexingConfig) GetConcurrency() uint32

func (*MultiplexingConfig) GetEnabled

func (m *MultiplexingConfig) GetEnabled() bool

func (*MultiplexingConfig) ProtoMessage

func (*MultiplexingConfig) ProtoMessage()

func (*MultiplexingConfig) Reset

func (m *MultiplexingConfig) Reset()

func (*MultiplexingConfig) String

func (m *MultiplexingConfig) String() string

func (*MultiplexingConfig) XXX_DiscardUnknown

func (m *MultiplexingConfig) XXX_DiscardUnknown()

func (*MultiplexingConfig) XXX_Marshal

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

func (*MultiplexingConfig) XXX_Merge

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

func (*MultiplexingConfig) XXX_Size

func (m *MultiplexingConfig) XXX_Size() int

func (*MultiplexingConfig) XXX_Unmarshal

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

type OutboundConfig

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

func (*OutboundConfig) Descriptor

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

func (*OutboundConfig) ProtoMessage

func (*OutboundConfig) ProtoMessage()

func (*OutboundConfig) Reset

func (m *OutboundConfig) Reset()

func (*OutboundConfig) String

func (m *OutboundConfig) String() string

func (*OutboundConfig) XXX_DiscardUnknown

func (m *OutboundConfig) XXX_DiscardUnknown()

func (*OutboundConfig) XXX_Marshal

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

func (*OutboundConfig) XXX_Merge

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

func (*OutboundConfig) XXX_Size

func (m *OutboundConfig) XXX_Size() int

func (*OutboundConfig) XXX_Unmarshal

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

type ReceiverConfig

type ReceiverConfig struct {
	// PortRange specifies the ports which the Receiver should listen on.
	PortRange *net.PortRange `protobuf:"bytes,1,opt,name=port_range,json=portRange,proto3" json:"port_range,omitempty"`
	// Listen specifies the IP address that the Receiver should listen on.
	Listen                     *net.IPOrDomain        `protobuf:"bytes,2,opt,name=listen,proto3" json:"listen,omitempty"`
	AllocationStrategy         *AllocationStrategy    `protobuf:"bytes,3,opt,name=allocation_strategy,json=allocationStrategy,proto3" json:"allocation_strategy,omitempty"`
	StreamSettings             *internet.StreamConfig `protobuf:"bytes,4,opt,name=stream_settings,json=streamSettings,proto3" json:"stream_settings,omitempty"`
	ReceiveOriginalDestination bool                   `` /* 142-byte string literal not displayed */
	// Override domains for the given protocol.
	// Deprecated. Use sniffing_settings.
	DomainOverride []KnownProtocols `` // Deprecated: Do not use.
	/* 155-byte string literal not displayed */
	SniffingSettings     *SniffingConfig `protobuf:"bytes,8,opt,name=sniffing_settings,json=sniffingSettings,proto3" json:"sniffing_settings,omitempty"`
	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
	XXX_unrecognized     []byte          `json:"-"`
	XXX_sizecache        int32           `json:"-"`
}

func (*ReceiverConfig) Descriptor

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

func (*ReceiverConfig) GetAllocationStrategy

func (m *ReceiverConfig) GetAllocationStrategy() *AllocationStrategy

func (*ReceiverConfig) GetDomainOverride deprecated

func (m *ReceiverConfig) GetDomainOverride() []KnownProtocols

Deprecated: Do not use.

func (*ReceiverConfig) GetEffectiveSniffingSettings

func (c *ReceiverConfig) GetEffectiveSniffingSettings() *SniffingConfig

func (*ReceiverConfig) GetListen

func (m *ReceiverConfig) GetListen() *net.IPOrDomain

func (*ReceiverConfig) GetPortRange

func (m *ReceiverConfig) GetPortRange() *net.PortRange

func (*ReceiverConfig) GetReceiveOriginalDestination

func (m *ReceiverConfig) GetReceiveOriginalDestination() bool

func (*ReceiverConfig) GetSniffingSettings

func (m *ReceiverConfig) GetSniffingSettings() *SniffingConfig

func (*ReceiverConfig) GetStreamSettings

func (m *ReceiverConfig) GetStreamSettings() *internet.StreamConfig

func (*ReceiverConfig) ProtoMessage

func (*ReceiverConfig) ProtoMessage()

func (*ReceiverConfig) Reset

func (m *ReceiverConfig) Reset()

func (*ReceiverConfig) String

func (m *ReceiverConfig) String() string

func (*ReceiverConfig) XXX_DiscardUnknown

func (m *ReceiverConfig) XXX_DiscardUnknown()

func (*ReceiverConfig) XXX_Marshal

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

func (*ReceiverConfig) XXX_Merge

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

func (*ReceiverConfig) XXX_Size

func (m *ReceiverConfig) XXX_Size() int

func (*ReceiverConfig) XXX_Unmarshal

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

type SenderConfig

type SenderConfig struct {
	// Send traffic through the given IP. Only IP is allowed.
	Via                  *net.IPOrDomain        `protobuf:"bytes,1,opt,name=via,proto3" json:"via,omitempty"`
	StreamSettings       *internet.StreamConfig `protobuf:"bytes,2,opt,name=stream_settings,json=streamSettings,proto3" json:"stream_settings,omitempty"`
	ProxySettings        *internet.ProxyConfig  `protobuf:"bytes,3,opt,name=proxy_settings,json=proxySettings,proto3" json:"proxy_settings,omitempty"`
	MultiplexSettings    *MultiplexingConfig    `protobuf:"bytes,4,opt,name=multiplex_settings,json=multiplexSettings,proto3" json:"multiplex_settings,omitempty"`
	XXX_NoUnkeyedLiteral struct{}               `json:"-"`
	XXX_unrecognized     []byte                 `json:"-"`
	XXX_sizecache        int32                  `json:"-"`
}

func (*SenderConfig) Descriptor

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

func (*SenderConfig) GetMultiplexSettings

func (m *SenderConfig) GetMultiplexSettings() *MultiplexingConfig

func (*SenderConfig) GetProxySettings

func (m *SenderConfig) GetProxySettings() *internet.ProxyConfig

func (*SenderConfig) GetStreamSettings

func (m *SenderConfig) GetStreamSettings() *internet.StreamConfig

func (*SenderConfig) GetVia

func (m *SenderConfig) GetVia() *net.IPOrDomain

func (*SenderConfig) ProtoMessage

func (*SenderConfig) ProtoMessage()

func (*SenderConfig) Reset

func (m *SenderConfig) Reset()

func (*SenderConfig) String

func (m *SenderConfig) String() string

func (*SenderConfig) XXX_DiscardUnknown

func (m *SenderConfig) XXX_DiscardUnknown()

func (*SenderConfig) XXX_Marshal

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

func (*SenderConfig) XXX_Merge

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

func (*SenderConfig) XXX_Size

func (m *SenderConfig) XXX_Size() int

func (*SenderConfig) XXX_Unmarshal

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

type SniffingConfig

type SniffingConfig struct {
	// Whether or not to enable content sniffing on an inbound connection.
	Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
	// Override target destination if sniff'ed protocol is in the given list.
	// Supported values are "http", "tls".
	DestinationOverride  []string `protobuf:"bytes,2,rep,name=destination_override,json=destinationOverride,proto3" json:"destination_override,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*SniffingConfig) Descriptor

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

func (*SniffingConfig) GetDestinationOverride

func (m *SniffingConfig) GetDestinationOverride() []string

func (*SniffingConfig) GetEnabled

func (m *SniffingConfig) GetEnabled() bool

func (*SniffingConfig) ProtoMessage

func (*SniffingConfig) ProtoMessage()

func (*SniffingConfig) Reset

func (m *SniffingConfig) Reset()

func (*SniffingConfig) String

func (m *SniffingConfig) String() string

func (*SniffingConfig) XXX_DiscardUnknown

func (m *SniffingConfig) XXX_DiscardUnknown()

func (*SniffingConfig) XXX_Marshal

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

func (*SniffingConfig) XXX_Merge

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

func (*SniffingConfig) XXX_Size

func (m *SniffingConfig) XXX_Size() int

func (*SniffingConfig) XXX_Unmarshal

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL