reverse

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2022 License: MPL-2.0 Imports: 22 Imported by: 45

Documentation

Index

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.

func (*Bridge) Close

func (b *Bridge) Close() error

func (*Bridge) Start

func (b *Bridge) Start() error

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 (w *BridgeWorker) DispatchLink(ctx context.Context, dest net.Destination, link *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) Descriptor() ([]byte, []int)

Deprecated: Use Config.ProtoReflect.Descriptor instead.

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

func (*Config) Reset

func (x *Config) Reset()

func (*Config) String

func (x *Config) String() string

type Control

type Control struct {
	State  Control_State `protobuf:"varint,1,opt,name=state,proto3,enum=xray.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) Descriptor() ([]byte, []int)

Deprecated: Use Control.ProtoReflect.Descriptor instead.

func (*Control) FillInRandom

func (c *Control) FillInRandom()

func (*Control) GetRandom

func (x *Control) GetRandom() []byte

func (*Control) GetState

func (x *Control) GetState() Control_State

func (*Control) ProtoMessage

func (*Control) ProtoMessage()

func (*Control) ProtoReflect

func (x *Control) ProtoReflect() protoreflect.Message

func (*Control) Reset

func (x *Control) Reset()

func (*Control) String

func (x *Control) String() string

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) 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 (Control_State) String

func (x Control_State) String() string

func (Control_State) Type

type Outbound

type Outbound struct {
	// contains filtered or unexported fields
}

func (*Outbound) Close

func (o *Outbound) Close() error

func (*Outbound) Dispatch

func (o *Outbound) Dispatch(ctx context.Context, link *transport.Link)

func (*Outbound) Start

func (o *Outbound) Start() error

func (*Outbound) Tag

func (o *Outbound) Tag() string

type Portal

type Portal struct {
	// contains filtered or unexported fields
}

func NewPortal

func NewPortal(config *PortalConfig, ohm outbound.Manager) (*Portal, error)

func (*Portal) Close

func (p *Portal) Close() error

func (*Portal) HandleConnection

func (p *Portal) HandleConnection(ctx context.Context, link *transport.Link) error

func (*Portal) Start

func (p *Portal) Start() error

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
}

func (*Reverse) Close

func (r *Reverse) Close() error

func (*Reverse) Init

func (r *Reverse) Init(config *Config, d routing.Dispatcher, ohm outbound.Manager) error

func (*Reverse) Start

func (r *Reverse) Start() error

func (*Reverse) Type

func (r *Reverse) Type() interface{}

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)

Jump to

Keyboard shortcuts

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