proxyman

package
v2.19.6+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2017 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package proxyman defines applications for manageing 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 SessionFrame_FrameCommand_name = map[int32]string{
	0: "SessionNew",
	1: "SessionKeep",
	2: "SessionEnd",
}
View Source
var SessionFrame_FrameCommand_value = map[string]int32{
	"SessionNew":  0,
	"SessionKeep": 1,
	"SessionEnd":  2,
}

Functions

This section is empty.

Types

type AllocationStrategy

type AllocationStrategy struct {
	Type AllocationStrategy_Type `protobuf:"varint,1,opt,name=type,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" 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" json:"refresh,omitempty"`
}

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

type AllocationStrategy_AllocationStrategyConcurrency

type AllocationStrategy_AllocationStrategyConcurrency struct {
	Value uint32 `protobuf:"varint,1,opt,name=value" json:"value,omitempty"`
}

func (*AllocationStrategy_AllocationStrategyConcurrency) Descriptor

func (*AllocationStrategy_AllocationStrategyConcurrency) GetValue

func (*AllocationStrategy_AllocationStrategyConcurrency) ProtoMessage

func (*AllocationStrategy_AllocationStrategyConcurrency) Reset

func (*AllocationStrategy_AllocationStrategyConcurrency) String

type AllocationStrategy_AllocationStrategyRefresh

type AllocationStrategy_AllocationStrategyRefresh struct {
	Value uint32 `protobuf:"varint,1,opt,name=value" json:"value,omitempty"`
}

func (*AllocationStrategy_AllocationStrategyRefresh) Descriptor

func (*AllocationStrategy_AllocationStrategyRefresh) GetValue

func (*AllocationStrategy_AllocationStrategyRefresh) ProtoMessage

func (*AllocationStrategy_AllocationStrategyRefresh) Reset

func (*AllocationStrategy_AllocationStrategyRefresh) String

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 DispatchConfig

type DispatchConfig struct {
	MuxSettings *MultiplexingConfig `protobuf:"bytes,1,opt,name=mux_settings,json=muxSettings" json:"mux_settings,omitempty"`
}

func (*DispatchConfig) Descriptor

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

func (*DispatchConfig) GetMuxSettings

func (m *DispatchConfig) GetMuxSettings() *MultiplexingConfig

func (*DispatchConfig) ProtoMessage

func (*DispatchConfig) ProtoMessage()

func (*DispatchConfig) Reset

func (m *DispatchConfig) Reset()

func (*DispatchConfig) String

func (m *DispatchConfig) String() string

type InboundConfig

type InboundConfig struct {
}

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

type InboundHandler

type InboundHandler interface {
	Start() error
	Close()

	// For migration
	GetRandomInboundProxy() (proxy.Inbound, net.Port, int)
}

type InboundHandlerConfig

type InboundHandlerConfig struct {
	Tag              string                                 `protobuf:"bytes,1,opt,name=tag" json:"tag,omitempty"`
	ReceiverSettings *v2ray_core_common_serial.TypedMessage `protobuf:"bytes,2,opt,name=receiver_settings,json=receiverSettings" json:"receiver_settings,omitempty"`
	ProxySettings    *v2ray_core_common_serial.TypedMessage `protobuf:"bytes,3,opt,name=proxy_settings,json=proxySettings" json:"proxy_settings,omitempty"`
	DispatchSettings *DispatchConfig                        `protobuf:"bytes,4,opt,name=dispatch_settings,json=dispatchSettings" json:"dispatch_settings,omitempty"`
}

func (*InboundHandlerConfig) Descriptor

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

func (*InboundHandlerConfig) GetDispatchSettings

func (m *InboundHandlerConfig) GetDispatchSettings() *DispatchConfig

func (*InboundHandlerConfig) GetProxySettings

func (*InboundHandlerConfig) GetReceiverSettings

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

type InboundHandlerManager

type InboundHandlerManager interface {
	GetHandler(ctx context.Context, tag string) (InboundHandler, error)
	AddHandler(ctx context.Context, config *InboundHandlerConfig) error
}

func InboundHandlerManagerFromSpace

func InboundHandlerManagerFromSpace(space app.Space) InboundHandlerManager

type MultiplexingConfig

type MultiplexingConfig struct {
	Enabled bool `protobuf:"varint,1,opt,name=enabled" json:"enabled,omitempty"`
}

func (*MultiplexingConfig) Descriptor

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

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

type OutboundConfig

type OutboundConfig struct {
}

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

type OutboundHandler

type OutboundHandler interface {
	Dispatch(ctx context.Context, outboundRay ray.OutboundRay)
}

type OutboundHandlerConfig

type OutboundHandlerConfig struct {
	Tag              string                                 `protobuf:"bytes,1,opt,name=tag" json:"tag,omitempty"`
	SenderSettings   *v2ray_core_common_serial.TypedMessage `protobuf:"bytes,2,opt,name=sender_settings,json=senderSettings" json:"sender_settings,omitempty"`
	ProxySettings    *v2ray_core_common_serial.TypedMessage `protobuf:"bytes,3,opt,name=proxy_settings,json=proxySettings" json:"proxy_settings,omitempty"`
	Expire           int64                                  `protobuf:"varint,4,opt,name=expire" json:"expire,omitempty"`
	Comment          string                                 `protobuf:"bytes,5,opt,name=comment" json:"comment,omitempty"`
	DispatchSettings *DispatchConfig                        `protobuf:"bytes,6,opt,name=dispatch_settings,json=dispatchSettings" json:"dispatch_settings,omitempty"`
}

func (*OutboundHandlerConfig) Descriptor

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

func (*OutboundHandlerConfig) GetComment

func (m *OutboundHandlerConfig) GetComment() string

func (*OutboundHandlerConfig) GetDispatchSettings

func (m *OutboundHandlerConfig) GetDispatchSettings() *DispatchConfig

func (*OutboundHandlerConfig) GetExpire

func (m *OutboundHandlerConfig) GetExpire() int64

func (*OutboundHandlerConfig) GetProxyHandler

func (c *OutboundHandlerConfig) GetProxyHandler(ctx context.Context) (proxy.Outbound, error)

func (*OutboundHandlerConfig) GetProxySettings

func (*OutboundHandlerConfig) GetSenderSettings

func (*OutboundHandlerConfig) GetTag

func (m *OutboundHandlerConfig) GetTag() string

func (*OutboundHandlerConfig) ProtoMessage

func (*OutboundHandlerConfig) ProtoMessage()

func (*OutboundHandlerConfig) Reset

func (m *OutboundHandlerConfig) Reset()

func (*OutboundHandlerConfig) String

func (m *OutboundHandlerConfig) String() string

type OutboundHandlerManager

type OutboundHandlerManager interface {
	GetHandler(tag string) OutboundHandler
	GetDefaultHandler() OutboundHandler
	AddHandler(ctx context.Context, config *OutboundHandlerConfig) error
}

func OutboundHandlerManagerFromSpace

func OutboundHandlerManagerFromSpace(space app.Space) OutboundHandlerManager

type ReceiverConfig

type ReceiverConfig struct {
	PortRange                  *v2ray_core_common_net3.PortRange           `protobuf:"bytes,1,opt,name=port_range,json=portRange" json:"port_range,omitempty"`
	Listen                     *v2ray_core_common_net.IPOrDomain           `protobuf:"bytes,2,opt,name=listen" json:"listen,omitempty"`
	AllocationStrategy         *AllocationStrategy                         `protobuf:"bytes,3,opt,name=allocation_strategy,json=allocationStrategy" json:"allocation_strategy,omitempty"`
	StreamSettings             *v2ray_core_transport_internet.StreamConfig `protobuf:"bytes,4,opt,name=stream_settings,json=streamSettings" json:"stream_settings,omitempty"`
	ReceiveOriginalDestination bool                                        `` /* 135-byte string literal not displayed */
	AllowPassiveConnection     bool                                        `protobuf:"varint,6,opt,name=allow_passive_connection,json=allowPassiveConnection" json:"allow_passive_connection,omitempty"`
}

func (*ReceiverConfig) Descriptor

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

func (*ReceiverConfig) GetAllocationStrategy

func (m *ReceiverConfig) GetAllocationStrategy() *AllocationStrategy

func (*ReceiverConfig) GetAllowPassiveConnection

func (m *ReceiverConfig) GetAllowPassiveConnection() bool

func (*ReceiverConfig) GetListen

func (*ReceiverConfig) GetPortRange

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

func (*ReceiverConfig) GetReceiveOriginalDestination

func (m *ReceiverConfig) GetReceiveOriginalDestination() bool

func (*ReceiverConfig) GetStreamSettings

func (*ReceiverConfig) ProtoMessage

func (*ReceiverConfig) ProtoMessage()

func (*ReceiverConfig) Reset

func (m *ReceiverConfig) Reset()

func (*ReceiverConfig) String

func (m *ReceiverConfig) String() string

type SenderConfig

type SenderConfig struct {
	// Send traffic through the given IP. Only IP is allowed.
	Via            *v2ray_core_common_net.IPOrDomain           `protobuf:"bytes,1,opt,name=via" json:"via,omitempty"`
	StreamSettings *v2ray_core_transport_internet.StreamConfig `protobuf:"bytes,2,opt,name=stream_settings,json=streamSettings" json:"stream_settings,omitempty"`
	ProxySettings  *v2ray_core_transport_internet.ProxyConfig  `protobuf:"bytes,3,opt,name=proxy_settings,json=proxySettings" json:"proxy_settings,omitempty"`
}

func (*SenderConfig) Descriptor

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

func (*SenderConfig) GetProxySettings

func (*SenderConfig) GetStreamSettings

func (*SenderConfig) GetVia

func (*SenderConfig) ProtoMessage

func (*SenderConfig) ProtoMessage()

func (*SenderConfig) Reset

func (m *SenderConfig) Reset()

func (*SenderConfig) String

func (m *SenderConfig) String() string

type SessionFrame

type SessionFrame struct {
	Id      uint32                           `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
	Command SessionFrame_FrameCommand        `protobuf:"varint,2,opt,name=command,enum=v2ray.core.app.proxyman.SessionFrame_FrameCommand" json:"command,omitempty"`
	Target  *v2ray_core_common_net2.Endpoint `protobuf:"bytes,3,opt,name=target" json:"target,omitempty"`
	Payload []byte                           `protobuf:"bytes,4,opt,name=payload,proto3" json:"payload,omitempty"`
}

func (*SessionFrame) Descriptor

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

func (*SessionFrame) GetCommand

func (m *SessionFrame) GetCommand() SessionFrame_FrameCommand

func (*SessionFrame) GetId

func (m *SessionFrame) GetId() uint32

func (*SessionFrame) GetPayload

func (m *SessionFrame) GetPayload() []byte

func (*SessionFrame) GetTarget

func (*SessionFrame) ProtoMessage

func (*SessionFrame) ProtoMessage()

func (*SessionFrame) Reset

func (m *SessionFrame) Reset()

func (*SessionFrame) String

func (m *SessionFrame) String() string

type SessionFrame_FrameCommand

type SessionFrame_FrameCommand int32
const (
	SessionFrame_SessionNew  SessionFrame_FrameCommand = 0
	SessionFrame_SessionKeep SessionFrame_FrameCommand = 1
	SessionFrame_SessionEnd  SessionFrame_FrameCommand = 2
)

func (SessionFrame_FrameCommand) EnumDescriptor

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

func (SessionFrame_FrameCommand) String

func (x SessionFrame_FrameCommand) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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