lite

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SpeedTestMode_name = map[int32]string{
		0: "pingonly",
		1: "speedonly",
		2: "all",
	}
	SpeedTestMode_value = map[string]int32{
		"pingonly":  0,
		"speedonly": 1,
		"all":       2,
	}
)

Enum value maps for SpeedTestMode.

View Source
var (
	PingMethod_name = map[int32]string{
		0: "googleping",
		1: "tcpping",
	}
	PingMethod_value = map[string]int32{
		"googleping": 0,
		"tcpping":    1,
	}
)

Enum value maps for PingMethod.

View Source
var (
	SortMethod_name = map[int32]string{
		0: "speed",
		1: "rspeed",
		2: "ping",
		3: "rping",
	}
	SortMethod_value = map[string]int32{
		"speed":  0,
		"rspeed": 1,
		"ping":   2,
		"rping":  3,
	}
)

Enum value maps for SortMethod.

View Source
var TestProxy_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "liteproxy.TestProxy",
	HandlerType: (*TestProxyServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "StartTest",
			Handler:       _TestProxy_StartTest_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "lite.proto",
}

TestProxy_ServiceDesc is the grpc.ServiceDesc for TestProxy service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterTestProxyServer

func RegisterTestProxyServer(s grpc.ServiceRegistrar, srv TestProxyServer)

Types

type PingMethod

type PingMethod int32
const (
	PingMethod_googleping PingMethod = 0
	PingMethod_tcpping    PingMethod = 1
)

func (PingMethod) Descriptor

func (PingMethod) Descriptor() protoreflect.EnumDescriptor

func (PingMethod) Enum

func (x PingMethod) Enum() *PingMethod

func (PingMethod) EnumDescriptor deprecated

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

Deprecated: Use PingMethod.Descriptor instead.

func (PingMethod) Number

func (x PingMethod) Number() protoreflect.EnumNumber

func (PingMethod) String

func (x PingMethod) String() string

func (PingMethod) Type

type SortMethod

type SortMethod int32
const (
	SortMethod_speed  SortMethod = 0
	SortMethod_rspeed SortMethod = 1 // reverse speed
	SortMethod_ping   SortMethod = 2
	SortMethod_rping  SortMethod = 3 // reverse ping
)

func (SortMethod) Descriptor

func (SortMethod) Descriptor() protoreflect.EnumDescriptor

func (SortMethod) Enum

func (x SortMethod) Enum() *SortMethod

func (SortMethod) EnumDescriptor deprecated

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

Deprecated: Use SortMethod.Descriptor instead.

func (SortMethod) Number

func (x SortMethod) Number() protoreflect.EnumNumber

func (SortMethod) String

func (x SortMethod) String() string

func (SortMethod) Type

type SpeedTestMode

type SpeedTestMode int32
const (
	SpeedTestMode_pingonly  SpeedTestMode = 0
	SpeedTestMode_speedonly SpeedTestMode = 1
	SpeedTestMode_all       SpeedTestMode = 2
)

func (SpeedTestMode) Descriptor

func (SpeedTestMode) Enum

func (x SpeedTestMode) Enum() *SpeedTestMode

func (SpeedTestMode) EnumDescriptor deprecated

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

Deprecated: Use SpeedTestMode.Descriptor instead.

func (SpeedTestMode) Number

func (SpeedTestMode) String

func (x SpeedTestMode) String() string

func (SpeedTestMode) Type

type TestProxyClient

type TestProxyClient interface {
	StartTest(ctx context.Context, in *TestRequest, opts ...grpc.CallOption) (TestProxy_StartTestClient, error)
}

TestProxyClient is the client API for TestProxy service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewTestProxyClient

func NewTestProxyClient(cc grpc.ClientConnInterface) TestProxyClient

type TestProxyServer

type TestProxyServer interface {
	StartTest(*TestRequest, TestProxy_StartTestServer) error
	// contains filtered or unexported methods
}

TestProxyServer is the server API for TestProxy service. All implementations must embed UnimplementedTestProxyServer for forward compatibility

type TestProxy_StartTestClient

type TestProxy_StartTestClient interface {
	Recv() (*TestReply, error)
	grpc.ClientStream
}

type TestProxy_StartTestServer

type TestProxy_StartTestServer interface {
	Send(*TestReply) error
	grpc.ServerStream
}

type TestReply

type TestReply struct {
	Id        int32  `protobuf:"varint,1,opt,name=Id,proto3" json:"Id,omitempty"`
	GroupName string `protobuf:"bytes,2,opt,name=GroupName,proto3" json:"GroupName,omitempty"`
	Remarks   string `protobuf:"bytes,3,opt,name=Remarks,proto3" json:"Remarks,omitempty"`
	Protocol  string `protobuf:"bytes,4,opt,name=Protocol,proto3" json:"Protocol,omitempty"` // v2ray trojan ss ssr
	Ping      string `protobuf:"bytes,5,opt,name=Ping,proto3" json:"Ping,omitempty"`
	AvgSpeed  int64  `protobuf:"varint,6,opt,name=AvgSpeed,proto3" json:"AvgSpeed,omitempty"`
	MaxSpeed  int64  `protobuf:"varint,7,opt,name=MaxSpeed,proto3" json:"MaxSpeed,omitempty"`
	IsOk      bool   `protobuf:"varint,8,opt,name=IsOk,proto3" json:"IsOk,omitempty"`
	Traffic   int64  `protobuf:"varint,9,opt,name=Traffic,proto3" json:"Traffic,omitempty"`
	Link      string `protobuf:"bytes,10,opt,name=Link,proto3" json:"Link,omitempty"`
	// contains filtered or unexported fields
}

reply message

func (*TestReply) Descriptor deprecated

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

Deprecated: Use TestReply.ProtoReflect.Descriptor instead.

func (*TestReply) GetAvgSpeed

func (x *TestReply) GetAvgSpeed() int64

func (*TestReply) GetGroupName

func (x *TestReply) GetGroupName() string

func (*TestReply) GetId

func (x *TestReply) GetId() int32

func (*TestReply) GetIsOk

func (x *TestReply) GetIsOk() bool
func (x *TestReply) GetLink() string

func (*TestReply) GetMaxSpeed

func (x *TestReply) GetMaxSpeed() int64

func (*TestReply) GetPing

func (x *TestReply) GetPing() string

func (*TestReply) GetProtocol

func (x *TestReply) GetProtocol() string

func (*TestReply) GetRemarks

func (x *TestReply) GetRemarks() string

func (*TestReply) GetTraffic

func (x *TestReply) GetTraffic() int64

func (*TestReply) ProtoMessage

func (*TestReply) ProtoMessage()

func (*TestReply) ProtoReflect

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

func (*TestReply) Reset

func (x *TestReply) Reset()

func (*TestReply) String

func (x *TestReply) String() string

type TestRequest

type TestRequest struct {
	GroupName     string        `protobuf:"bytes,1,opt,name=GroupName,proto3" json:"GroupName,omitempty"`
	SpeedTestMode SpeedTestMode `protobuf:"varint,2,opt,name=SpeedTestMode,proto3,enum=liteproxy.SpeedTestMode" json:"SpeedTestMode,omitempty"`
	PingMethod    PingMethod    `protobuf:"varint,3,opt,name=PingMethod,proto3,enum=liteproxy.PingMethod" json:"PingMethod,omitempty"`
	SortMethod    SortMethod    `protobuf:"varint,4,opt,name=SortMethod,proto3,enum=liteproxy.SortMethod" json:"SortMethod,omitempty"`
	Concurrency   int32         `protobuf:"varint,5,opt,name=Concurrency,proto3" json:"Concurrency,omitempty"`
	TestMode      uint32        `protobuf:"varint,6,opt,name=TestMode,proto3" json:"TestMode,omitempty"`        // 0: all 1: speed only 2: ping only
	Subscription  string        `protobuf:"bytes,7,opt,name=Subscription,proto3" json:"Subscription,omitempty"` // subscription link, clash link, profile links
	Language      string        `protobuf:"bytes,8,opt,name=Language,proto3" json:"Language,omitempty"`
	FontSize      uint32        `protobuf:"varint,9,opt,name=FontSize,proto3" json:"FontSize,omitempty"`
	Theme         string        `protobuf:"bytes,10,opt,name=Theme,proto3" json:"Theme,omitempty"`
	Timeout       int64         `protobuf:"varint,11,opt,name=Timeout,proto3" json:"Timeout,omitempty"`
	OutputMode    uint32        `protobuf:"varint,12,opt,name=OutputMode,proto3" json:"OutputMode,omitempty"` // 0: base64 1:file path 2: no pic 3: json 4: txt
	// contains filtered or unexported fields
}

The request message containing the user's name.

func (*TestRequest) Descriptor deprecated

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

Deprecated: Use TestRequest.ProtoReflect.Descriptor instead.

func (*TestRequest) GetConcurrency

func (x *TestRequest) GetConcurrency() int32

func (*TestRequest) GetFontSize

func (x *TestRequest) GetFontSize() uint32

func (*TestRequest) GetGroupName

func (x *TestRequest) GetGroupName() string

func (*TestRequest) GetLanguage

func (x *TestRequest) GetLanguage() string

func (*TestRequest) GetOutputMode added in v0.15.0

func (x *TestRequest) GetOutputMode() uint32

func (*TestRequest) GetPingMethod

func (x *TestRequest) GetPingMethod() PingMethod

func (*TestRequest) GetSortMethod

func (x *TestRequest) GetSortMethod() SortMethod

func (*TestRequest) GetSpeedTestMode

func (x *TestRequest) GetSpeedTestMode() SpeedTestMode

func (*TestRequest) GetSubscription

func (x *TestRequest) GetSubscription() string

func (*TestRequest) GetTestMode

func (x *TestRequest) GetTestMode() uint32

func (*TestRequest) GetTheme

func (x *TestRequest) GetTheme() string

func (*TestRequest) GetTimeout

func (x *TestRequest) GetTimeout() int64

func (*TestRequest) ProtoMessage

func (*TestRequest) ProtoMessage()

func (*TestRequest) ProtoReflect

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

func (*TestRequest) Reset

func (x *TestRequest) Reset()

func (*TestRequest) String

func (x *TestRequest) String() string

type UnimplementedTestProxyServer

type UnimplementedTestProxyServer struct {
}

UnimplementedTestProxyServer must be embedded to have forward compatible implementations.

func (UnimplementedTestProxyServer) StartTest

type UnsafeTestProxyServer

type UnsafeTestProxyServer interface {
	// contains filtered or unexported methods
}

UnsafeTestProxyServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TestProxyServer will result in compilation errors.

Jump to

Keyboard shortcuts

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