Documentation ¶
Index ¶
- Variables
- type Bridge
- type BridgeConfig
- func (*BridgeConfig) Descriptor() ([]byte, []int)deprecated
- func (x *BridgeConfig) GetDomain() string
- func (x *BridgeConfig) GetTag() string
- func (*BridgeConfig) ProtoMessage()
- func (x *BridgeConfig) ProtoReflect() protoreflect.Message
- func (x *BridgeConfig) Reset()
- func (x *BridgeConfig) String() string
- type BridgeWorker
- type Config
- type Control
- func (*Control) Descriptor() ([]byte, []int)deprecated
- func (c *Control) FillInRandom()
- func (x *Control) GetRandom() []byte
- func (x *Control) GetState() Control_State
- func (*Control) ProtoMessage()
- func (x *Control) ProtoReflect() protoreflect.Message
- func (x *Control) Reset()
- func (x *Control) String() string
- type Control_State
- func (Control_State) Descriptor() protoreflect.EnumDescriptor
- func (x Control_State) Enum() *Control_State
- func (Control_State) EnumDescriptor() ([]byte, []int)deprecated
- func (x Control_State) Number() protoreflect.EnumNumber
- func (x Control_State) String() string
- func (Control_State) Type() protoreflect.EnumType
- type Outbound
- type Portal
- type PortalConfig
- func (*PortalConfig) Descriptor() ([]byte, []int)deprecated
- func (x *PortalConfig) GetDomain() string
- func (x *PortalConfig) GetTag() string
- func (*PortalConfig) ProtoMessage()
- func (x *PortalConfig) ProtoReflect() protoreflect.Message
- func (x *PortalConfig) Reset()
- func (x *PortalConfig) String() string
- type PortalWorker
- type Reverse
- type StaticMuxPicker
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Control_State_name = map[int32]string{ 0: "ACTIVE", 1: "DRAIN", } Control_State_value = map[string]int32{ "ACTIVE": 0, "DRAIN": 1, } )
Enum value maps for Control_State.
View Source
var File_app_reverse_config_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Bridge ¶
type Bridge struct {
// contains filtered or unexported fields
}
Bridge is a component in reverse proxy, that relays connections from Portal to local address.
func NewBridge ¶
func NewBridge(config *BridgeConfig, dispatcher routing.Dispatcher) (*Bridge, error)
NewBridge creates a new Bridge instance.
type BridgeConfig ¶
type BridgeConfig struct { Tag string `protobuf:"bytes,1,opt,name=tag,proto3" json:"tag,omitempty"` Domain string `protobuf:"bytes,2,opt,name=domain,proto3" json:"domain,omitempty"` // contains filtered or unexported fields }
func (*BridgeConfig) Descriptor
deprecated
func (*BridgeConfig) Descriptor() ([]byte, []int)
Deprecated: Use BridgeConfig.ProtoReflect.Descriptor instead.
func (*BridgeConfig) GetDomain ¶
func (x *BridgeConfig) GetDomain() string
func (*BridgeConfig) GetTag ¶
func (x *BridgeConfig) GetTag() string
func (*BridgeConfig) ProtoMessage ¶
func (*BridgeConfig) ProtoMessage()
func (*BridgeConfig) ProtoReflect ¶
func (x *BridgeConfig) ProtoReflect() protoreflect.Message
func (*BridgeConfig) Reset ¶
func (x *BridgeConfig) Reset()
func (*BridgeConfig) String ¶
func (x *BridgeConfig) String() string
type BridgeWorker ¶
type BridgeWorker struct {
// contains filtered or unexported fields
}
func NewBridgeWorker ¶
func NewBridgeWorker(domain string, tag string, d routing.Dispatcher) (*BridgeWorker, error)
func (*BridgeWorker) Close ¶
func (w *BridgeWorker) Close() error
func (*BridgeWorker) Connections ¶
func (w *BridgeWorker) Connections() uint32
func (*BridgeWorker) Dispatch ¶
func (w *BridgeWorker) Dispatch(ctx context.Context, dest net.Destination) (*transport.Link, error)
func (*BridgeWorker) IsActive ¶
func (w *BridgeWorker) IsActive() bool
func (*BridgeWorker) Start ¶
func (w *BridgeWorker) Start() error
func (*BridgeWorker) Type ¶
func (w *BridgeWorker) Type() interface{}
type Config ¶
type Config struct { BridgeConfig []*BridgeConfig `protobuf:"bytes,1,rep,name=bridge_config,json=bridgeConfig,proto3" json:"bridge_config,omitempty"` PortalConfig []*PortalConfig `protobuf:"bytes,2,rep,name=portal_config,json=portalConfig,proto3" json:"portal_config,omitempty"` // contains filtered or unexported fields }
func (*Config) Descriptor
deprecated
func (*Config) GetBridgeConfig ¶
func (x *Config) GetBridgeConfig() []*BridgeConfig
func (*Config) GetPortalConfig ¶
func (x *Config) GetPortalConfig() []*PortalConfig
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
func (*Config) ProtoReflect ¶
func (x *Config) ProtoReflect() protoreflect.Message
type Control ¶
type Control struct { State Control_State `protobuf:"varint,1,opt,name=state,proto3,enum=v2ray.core.app.reverse.Control_State" json:"state,omitempty"` Random []byte `protobuf:"bytes,99,opt,name=random,proto3" json:"random,omitempty"` // contains filtered or unexported fields }
func (*Control) Descriptor
deprecated
func (*Control) FillInRandom ¶
func (c *Control) FillInRandom()
func (*Control) GetState ¶
func (x *Control) GetState() Control_State
func (*Control) ProtoMessage ¶
func (*Control) ProtoMessage()
func (*Control) ProtoReflect ¶
func (x *Control) ProtoReflect() protoreflect.Message
type Control_State ¶
type Control_State int32
const ( Control_ACTIVE Control_State = 0 Control_DRAIN Control_State = 1 )
func (Control_State) Descriptor ¶
func (Control_State) Descriptor() protoreflect.EnumDescriptor
func (Control_State) Enum ¶
func (x Control_State) Enum() *Control_State
func (Control_State) EnumDescriptor
deprecated
func (Control_State) EnumDescriptor() ([]byte, []int)
Deprecated: Use Control_State.Descriptor instead.
func (Control_State) Number ¶
func (x Control_State) Number() protoreflect.EnumNumber
func (Control_State) String ¶
func (x Control_State) String() string
func (Control_State) Type ¶
func (Control_State) Type() protoreflect.EnumType
type Portal ¶
type Portal struct {
// contains filtered or unexported fields
}
func (*Portal) HandleConnection ¶
type PortalConfig ¶
type PortalConfig struct { Tag string `protobuf:"bytes,1,opt,name=tag,proto3" json:"tag,omitempty"` Domain string `protobuf:"bytes,2,opt,name=domain,proto3" json:"domain,omitempty"` // contains filtered or unexported fields }
func (*PortalConfig) Descriptor
deprecated
func (*PortalConfig) Descriptor() ([]byte, []int)
Deprecated: Use PortalConfig.ProtoReflect.Descriptor instead.
func (*PortalConfig) GetDomain ¶
func (x *PortalConfig) GetDomain() string
func (*PortalConfig) GetTag ¶
func (x *PortalConfig) GetTag() string
func (*PortalConfig) ProtoMessage ¶
func (*PortalConfig) ProtoMessage()
func (*PortalConfig) ProtoReflect ¶
func (x *PortalConfig) ProtoReflect() protoreflect.Message
func (*PortalConfig) Reset ¶
func (x *PortalConfig) Reset()
func (*PortalConfig) String ¶
func (x *PortalConfig) String() string
type PortalWorker ¶
type PortalWorker struct {
// contains filtered or unexported fields
}
func NewPortalWorker ¶
func NewPortalWorker(client *mux.ClientWorker) (*PortalWorker, error)
func (*PortalWorker) Closed ¶
func (w *PortalWorker) Closed() bool
func (*PortalWorker) IsFull ¶
func (w *PortalWorker) IsFull() bool
type Reverse ¶
type Reverse struct {
// contains filtered or unexported fields
}
type StaticMuxPicker ¶
type StaticMuxPicker struct {
// contains filtered or unexported fields
}
func NewStaticMuxPicker ¶
func NewStaticMuxPicker() (*StaticMuxPicker, error)
func (*StaticMuxPicker) AddWorker ¶
func (p *StaticMuxPicker) AddWorker(worker *PortalWorker)
func (*StaticMuxPicker) PickAvailable ¶
func (p *StaticMuxPicker) PickAvailable() (*mux.ClientWorker, error)
Click to show internal directories.
Click to hide internal directories.