point

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2024 License: MIT Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Origin_name = map[int32]string{
		0:   "reserve",
		101: "remote",
		102: "manual",
	}
	Origin_value = map[string]int32{
		"reserve": 0,
		"remote":  101,
		"manual":  102,
	}
)

Enum value maps for Origin.

View Source
var File_node_point_point_proto protoreflect.FileDescriptor

Functions

func Dialer added in v0.3.3

func Dialer(p *Point) (r netapi.Proxy, err error)

func IsBootstrap added in v0.3.4

func IsBootstrap(p netapi.Proxy) bool

func ParseTLSConfig added in v0.3.3

func ParseTLSConfig(t *protocol.TlsConfig) *tls.Config

func RegisterProtocol added in v0.3.3

func RegisterProtocol[T protocol.IsProtocol_Protocol](wrap func(T) WrapProxy)

func SetBootstrap added in v0.3.4

func SetBootstrap(p netapi.Proxy)

Types

type Origin

type Origin int32
const (
	Origin_reserve Origin = 0
	Origin_remote  Origin = 101
	Origin_manual  Origin = 102
)

func (Origin) Descriptor

func (Origin) Descriptor() protoreflect.EnumDescriptor

func (Origin) Enum

func (x Origin) Enum() *Origin

func (Origin) EnumDescriptor deprecated

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

Deprecated: Use Origin.Descriptor instead.

func (Origin) Number

func (x Origin) Number() protoreflect.EnumNumber

func (Origin) String

func (x Origin) String() string

func (Origin) Type

func (Origin) Type() protoreflect.EnumType

type Point

type Point struct {
	Hash   string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
	Name   string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Group  string `protobuf:"bytes,3,opt,name=group,proto3" json:"group,omitempty"`
	Origin Origin `protobuf:"varint,4,opt,name=origin,proto3,enum=yuhaiin.point.Origin" json:"origin,omitempty"`
	// will use protocols' order to create dialer
	Protocols []*protocol.Protocol `protobuf:"bytes,5,rep,name=protocols,proto3" json:"protocols,omitempty"`
	// contains filtered or unexported fields
}

func (*Point) Descriptor deprecated

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

Deprecated: Use Point.ProtoReflect.Descriptor instead.

func (*Point) GetGroup

func (x *Point) GetGroup() string

func (*Point) GetHash

func (x *Point) GetHash() string

func (*Point) GetName

func (x *Point) GetName() string

func (*Point) GetOrigin

func (x *Point) GetOrigin() Origin

func (*Point) GetProtocols

func (x *Point) GetProtocols() []*protocol.Protocol

func (*Point) ProtoMessage

func (*Point) ProtoMessage()

func (*Point) ProtoReflect

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

func (*Point) Reset

func (x *Point) Reset()

func (*Point) String

func (x *Point) String() string

type WrapProxy added in v0.3.3

type WrapProxy func(p netapi.Proxy) (netapi.Proxy, error)

func ErrConn added in v0.3.3

func ErrConn(err error) WrapProxy

func Wrap added in v0.3.3

Jump to

Keyboard shortcuts

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