Documentation ¶
Index ¶
- Variables
- func NewClient(ctx context.Context, dialer N.Dialer, serverAddr M.Socksaddr, ...) adapter.V2RayClientTransport
- func RegisterGunServiceCustomNameServer(s *grpc.Server, srv GunServiceServer, name string)
- func RegisterGunServiceServer(s grpc.ServiceRegistrar, srv GunServiceServer)
- func ServerDesc(name string) grpc.ServiceDesc
- type Client
- type GRPCConn
- func (c *GRPCConn) Close() error
- func (c *GRPCConn) LocalAddr() net.Addr
- func (c *GRPCConn) Read(b []byte) (n int, err error)
- func (c *GRPCConn) RemoteAddr() net.Addr
- func (c *GRPCConn) SetDeadline(t time.Time) error
- func (c *GRPCConn) SetReadDeadline(t time.Time) error
- func (c *GRPCConn) SetWriteDeadline(t time.Time) error
- func (c *GRPCConn) Upstream() any
- func (c *GRPCConn) Write(b []byte) (n int, err error)
- type GunService
- type GunServiceClient
- type GunServiceCustomNameClient
- type GunServiceServer
- type GunService_TunClient
- type GunService_TunServer
- type Hunk
- type Server
- type UnimplementedGunServiceServer
- type UnsafeGunServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_transport_v2raygrpc_stream_proto protoreflect.FileDescriptor
var GunService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "transport.v2raygrpc.GunService", HandlerType: (*GunServiceServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "Tun", Handler: _GunService_Tun_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "transport/v2raygrpc/stream.proto", }
GunService_ServiceDesc is the grpc.ServiceDesc for GunService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterGunServiceCustomNameServer ¶
func RegisterGunServiceCustomNameServer(s *grpc.Server, srv GunServiceServer, name string)
func RegisterGunServiceServer ¶
func RegisterGunServiceServer(s grpc.ServiceRegistrar, srv GunServiceServer)
func ServerDesc ¶
func ServerDesc(name string) grpc.ServiceDesc
Types ¶
type GRPCConn ¶
type GRPCConn struct { GunService // contains filtered or unexported fields }
func NewGRPCConn ¶
func NewGRPCConn(service GunService, cancel context.CancelFunc) *GRPCConn
func (*GRPCConn) RemoteAddr ¶
type GunService ¶
type GunServiceClient ¶
type GunServiceClient interface {
Tun(ctx context.Context, opts ...grpc.CallOption) (GunService_TunClient, error)
}
GunServiceClient is the client API for GunService 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 NewGunServiceClient ¶
func NewGunServiceClient(cc grpc.ClientConnInterface) GunServiceClient
type GunServiceCustomNameClient ¶
type GunServiceCustomNameClient interface { TunCustomName(ctx context.Context, name string, opts ...grpc.CallOption) (GunService_TunClient, error) Tun(ctx context.Context, opts ...grpc.CallOption) (GunService_TunClient, error) }
type GunServiceServer ¶
type GunServiceServer interface { Tun(GunService_TunServer) error // contains filtered or unexported methods }
GunServiceServer is the server API for GunService service. All implementations must embed UnimplementedGunServiceServer for forward compatibility
type GunService_TunClient ¶
type GunService_TunServer ¶
type Hunk ¶
type Hunk struct { Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*Hunk) Descriptor
deprecated
func (*Hunk) ProtoMessage ¶
func (*Hunk) ProtoMessage()
func (*Hunk) ProtoReflect ¶
func (x *Hunk) ProtoReflect() protoreflect.Message
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer(ctx context.Context, options option.V2RayGRPCOptions, tlsConfig *tls.Config, handler N.TCPConnectionHandler) *Server
func (*Server) ServePacket ¶
func (s *Server) ServePacket(listener net.PacketConn) error
func (*Server) Tun ¶
func (s *Server) Tun(server GunService_TunServer) error
type UnimplementedGunServiceServer ¶
type UnimplementedGunServiceServer struct{}
UnimplementedGunServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedGunServiceServer) Tun ¶
func (UnimplementedGunServiceServer) Tun(GunService_TunServer) error
type UnsafeGunServiceServer ¶
type UnsafeGunServiceServer interface {
// contains filtered or unexported methods
}
UnsafeGunServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GunServiceServer will result in compilation errors.