proto

package
v0.0.0-...-7938e08 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_tunnel_proto protoreflect.FileDescriptor
View Source
var Tunnel_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "tunnel.Tunnel",
	HandlerType: (*TunnelServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Http",
			Handler:       _Tunnel_Http_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
		{
			StreamName:    "Socks5",
			Handler:       _Tunnel_Socks5_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "tunnel.proto",
}

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

Functions

func RegisterTunnelServer

func RegisterTunnelServer(s grpc.ServiceRegistrar, srv TunnelServer)

Types

type Chunk

type Chunk struct {
	Body []byte `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"`
	Size int32  `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
	// contains filtered or unexported fields
}

func (*Chunk) Descriptor deprecated

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

Deprecated: Use Chunk.ProtoReflect.Descriptor instead.

func (*Chunk) GetBody

func (x *Chunk) GetBody() []byte

func (*Chunk) GetSize

func (x *Chunk) GetSize() int32

func (*Chunk) ProtoMessage

func (*Chunk) ProtoMessage()

func (*Chunk) ProtoReflect

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

func (*Chunk) Reset

func (x *Chunk) Reset()

func (*Chunk) String

func (x *Chunk) String() string

type TunnelClient

type TunnelClient interface {
	Http(ctx context.Context, opts ...grpc.CallOption) (Tunnel_HttpClient, error)
	Socks5(ctx context.Context, opts ...grpc.CallOption) (Tunnel_Socks5Client, error)
}

TunnelClient is the client API for Tunnel 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 NewTunnelClient

func NewTunnelClient(cc grpc.ClientConnInterface) TunnelClient

type TunnelServer

type TunnelServer interface {
	Http(Tunnel_HttpServer) error
	Socks5(Tunnel_Socks5Server) error
	// contains filtered or unexported methods
}

TunnelServer is the server API for Tunnel service. All implementations must embed UnimplementedTunnelServer for forward compatibility

type Tunnel_HttpClient

type Tunnel_HttpClient interface {
	Send(*Chunk) error
	Recv() (*Chunk, error)
	grpc.ClientStream
}

type Tunnel_HttpServer

type Tunnel_HttpServer interface {
	Send(*Chunk) error
	Recv() (*Chunk, error)
	grpc.ServerStream
}

type Tunnel_Socks5Client

type Tunnel_Socks5Client interface {
	Send(*Chunk) error
	Recv() (*Chunk, error)
	grpc.ClientStream
}

type Tunnel_Socks5Server

type Tunnel_Socks5Server interface {
	Send(*Chunk) error
	Recv() (*Chunk, error)
	grpc.ServerStream
}

type UnimplementedTunnelServer

type UnimplementedTunnelServer struct {
}

UnimplementedTunnelServer must be embedded to have forward compatible implementations.

func (UnimplementedTunnelServer) Http

func (UnimplementedTunnelServer) Socks5

type UnsafeTunnelServer

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

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

Jump to

Keyboard shortcuts

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