import "v2ray.com/core/app/reverse"
bridge.go config.go config.pb.go errors.generated.go portal.go reverse.go
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.
var File_app_reverse_config_proto protoreflect.FileDescriptor
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(config *BridgeConfig, dispatcher routing.Dispatcher) (*Bridge, error)
NewBridge creates a new Bridge instance.
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() ([]byte, []int)
Deprecated: Use BridgeConfig.ProtoReflect.Descriptor instead.
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 struct {
// contains filtered or unexported fields
}
func NewBridgeWorker(domain string, tag string, d routing.Dispatcher) (*BridgeWorker, error)
func (w *BridgeWorker) Close() error
func (w *BridgeWorker) Connections() uint32
func (w *BridgeWorker) Dispatch(ctx context.Context, dest net.Destination) (*transport.Link, error)
func (w *BridgeWorker) IsActive() bool
func (w *BridgeWorker) Start() error
func (w *BridgeWorker) Type() interface{}
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 }
Deprecated: Use Config.ProtoReflect.Descriptor instead.
func (x *Config) GetBridgeConfig() []*BridgeConfig
func (x *Config) GetPortalConfig() []*PortalConfig
func (x *Config) ProtoReflect() protoreflect.Message
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 }
Deprecated: Use Control.ProtoReflect.Descriptor instead.
func (x *Control) GetState() Control_State
func (x *Control) ProtoReflect() protoreflect.Message
const ( Control_ACTIVE Control_State = 0 Control_DRAIN Control_State = 1 )
func (Control_State) Descriptor() protoreflect.EnumDescriptor
func (x Control_State) Enum() *Control_State
func (Control_State) EnumDescriptor() ([]byte, []int)
Deprecated: Use Control_State.Descriptor instead.
func (x Control_State) Number() protoreflect.EnumNumber
func (x Control_State) String() string
func (Control_State) Type() protoreflect.EnumType
type Outbound struct {
// contains filtered or unexported fields
}
type Portal struct {
// contains filtered or unexported fields
}
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() ([]byte, []int)
Deprecated: Use PortalConfig.ProtoReflect.Descriptor instead.
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 struct {
// contains filtered or unexported fields
}
func NewPortalWorker(client *mux.ClientWorker) (*PortalWorker, error)
func (w *PortalWorker) Closed() bool
func (w *PortalWorker) IsFull() bool
type Reverse struct {
// contains filtered or unexported fields
}
type StaticMuxPicker struct {
// contains filtered or unexported fields
}
func NewStaticMuxPicker() (*StaticMuxPicker, error)
func (p *StaticMuxPicker) AddWorker(worker *PortalWorker)
func (p *StaticMuxPicker) PickAvailable() (*mux.ClientWorker, error)
Package reverse imports 22 packages (graph) and is imported by 6 packages. Updated 2020-10-15. Refresh now. Tools for package owners.