core: v2ray.com/core/app/reverse Index | Files

package reverse

import "v2ray.com/core/app/reverse"

Index

Package Files

bridge.go config.go config.pb.go errors.generated.go portal.go reverse.go

Variables

var Control_State_name = map[int32]string{
    0:  "ACTIVE",
    1:  "DRAIN",
}
var Control_State_value = map[string]int32{
    "ACTIVE": 0,
    "DRAIN":  1,
}

type Bridge Uses

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 Uses

func NewBridge(config *BridgeConfig, dispatcher routing.Dispatcher) (*Bridge, error)

NewBridge creates a new Bridge instance.

func (*Bridge) Close Uses

func (b *Bridge) Close() error

func (*Bridge) Start Uses

func (b *Bridge) Start() error

type BridgeConfig Uses

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"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}

func (*BridgeConfig) Descriptor Uses

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

func (*BridgeConfig) GetDomain Uses

func (m *BridgeConfig) GetDomain() string

func (*BridgeConfig) GetTag Uses

func (m *BridgeConfig) GetTag() string

func (*BridgeConfig) ProtoMessage Uses

func (*BridgeConfig) ProtoMessage()

func (*BridgeConfig) Reset Uses

func (m *BridgeConfig) Reset()

func (*BridgeConfig) String Uses

func (m *BridgeConfig) String() string

func (*BridgeConfig) XXX_DiscardUnknown Uses

func (m *BridgeConfig) XXX_DiscardUnknown()

func (*BridgeConfig) XXX_Marshal Uses

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

func (*BridgeConfig) XXX_Merge Uses

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

func (*BridgeConfig) XXX_Size Uses

func (m *BridgeConfig) XXX_Size() int

func (*BridgeConfig) XXX_Unmarshal Uses

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

type BridgeWorker Uses

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

func NewBridgeWorker Uses

func NewBridgeWorker(domain string, tag string, d routing.Dispatcher) (*BridgeWorker, error)

func (*BridgeWorker) Close Uses

func (w *BridgeWorker) Close() error

func (*BridgeWorker) Connections Uses

func (w *BridgeWorker) Connections() uint32

func (*BridgeWorker) Dispatch Uses

func (w *BridgeWorker) Dispatch(ctx context.Context, dest net.Destination) (*transport.Link, error)

func (*BridgeWorker) IsActive Uses

func (w *BridgeWorker) IsActive() bool

func (*BridgeWorker) Start Uses

func (w *BridgeWorker) Start() error

func (*BridgeWorker) Type Uses

func (w *BridgeWorker) Type() interface{}

type Config Uses

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"`
    XXX_NoUnkeyedLiteral struct{}        `json:"-"`
    XXX_unrecognized     []byte          `json:"-"`
    XXX_sizecache        int32           `json:"-"`
}

func (*Config) Descriptor Uses

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

func (*Config) GetBridgeConfig Uses

func (m *Config) GetBridgeConfig() []*BridgeConfig

func (*Config) GetPortalConfig Uses

func (m *Config) GetPortalConfig() []*PortalConfig

func (*Config) ProtoMessage Uses

func (*Config) ProtoMessage()

func (*Config) Reset Uses

func (m *Config) Reset()

func (*Config) String Uses

func (m *Config) String() string

func (*Config) XXX_DiscardUnknown Uses

func (m *Config) XXX_DiscardUnknown()

func (*Config) XXX_Marshal Uses

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

func (*Config) XXX_Merge Uses

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

func (*Config) XXX_Size Uses

func (m *Config) XXX_Size() int

func (*Config) XXX_Unmarshal Uses

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

type Control Uses

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"`
    XXX_NoUnkeyedLiteral struct{}      `json:"-"`
    XXX_unrecognized     []byte        `json:"-"`
    XXX_sizecache        int32         `json:"-"`
}

func (*Control) Descriptor Uses

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

func (*Control) FillInRandom Uses

func (c *Control) FillInRandom()

func (*Control) GetRandom Uses

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

func (*Control) GetState Uses

func (m *Control) GetState() Control_State

func (*Control) ProtoMessage Uses

func (*Control) ProtoMessage()

func (*Control) Reset Uses

func (m *Control) Reset()

func (*Control) String Uses

func (m *Control) String() string

func (*Control) XXX_DiscardUnknown Uses

func (m *Control) XXX_DiscardUnknown()

func (*Control) XXX_Marshal Uses

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

func (*Control) XXX_Merge Uses

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

func (*Control) XXX_Size Uses

func (m *Control) XXX_Size() int

func (*Control) XXX_Unmarshal Uses

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

type Control_State Uses

type Control_State int32
const (
    Control_ACTIVE Control_State = 0
    Control_DRAIN  Control_State = 1
)

func (Control_State) EnumDescriptor Uses

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

func (Control_State) String Uses

func (x Control_State) String() string

type Outbound Uses

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

func (*Outbound) Close Uses

func (o *Outbound) Close() error

func (*Outbound) Dispatch Uses

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

func (*Outbound) Start Uses

func (o *Outbound) Start() error

func (*Outbound) Tag Uses

func (o *Outbound) Tag() string

type Portal Uses

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

func NewPortal Uses

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

func (*Portal) Close Uses

func (p *Portal) Close() error

func (*Portal) HandleConnection Uses

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

func (*Portal) Start Uses

func (p *Portal) Start() error

type PortalConfig Uses

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"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}

func (*PortalConfig) Descriptor Uses

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

func (*PortalConfig) GetDomain Uses

func (m *PortalConfig) GetDomain() string

func (*PortalConfig) GetTag Uses

func (m *PortalConfig) GetTag() string

func (*PortalConfig) ProtoMessage Uses

func (*PortalConfig) ProtoMessage()

func (*PortalConfig) Reset Uses

func (m *PortalConfig) Reset()

func (*PortalConfig) String Uses

func (m *PortalConfig) String() string

func (*PortalConfig) XXX_DiscardUnknown Uses

func (m *PortalConfig) XXX_DiscardUnknown()

func (*PortalConfig) XXX_Marshal Uses

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

func (*PortalConfig) XXX_Merge Uses

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

func (*PortalConfig) XXX_Size Uses

func (m *PortalConfig) XXX_Size() int

func (*PortalConfig) XXX_Unmarshal Uses

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

type PortalWorker Uses

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

func NewPortalWorker Uses

func NewPortalWorker(client *mux.ClientWorker) (*PortalWorker, error)

func (*PortalWorker) Closed Uses

func (w *PortalWorker) Closed() bool

func (*PortalWorker) IsFull Uses

func (w *PortalWorker) IsFull() bool

type Reverse Uses

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

func (*Reverse) Close Uses

func (r *Reverse) Close() error

func (*Reverse) Init Uses

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

func (*Reverse) Start Uses

func (r *Reverse) Start() error

func (*Reverse) Type Uses

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

type StaticMuxPicker Uses

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

func NewStaticMuxPicker Uses

func NewStaticMuxPicker() (*StaticMuxPicker, error)

func (*StaticMuxPicker) AddWorker Uses

func (p *StaticMuxPicker) AddWorker(worker *PortalWorker)

func (*StaticMuxPicker) PickAvailable Uses

func (p *StaticMuxPicker) PickAvailable() (*mux.ClientWorker, error)

Package reverse imports 21 packages (graph) and is imported by 4 packages. Updated 2019-08-05. Refresh now. Tools for package owners.