Documentation ¶
Index ¶
- Variables
- func NewClient(ctx context.Context, dialer N.Dialer, serverAddr M.Socksaddr, ...) (adapter.V2RayClientTransport, error)
- func NewTLSTransportCredentials(config tls.Config) credentials.TransportCredentials
- 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 TLSTransportCredentials
- func (c *TLSTransportCredentials) ClientHandshake(ctx context.Context, authority string, rawConn net.Conn) (net.Conn, credentials.AuthInfo, error)
- func (c *TLSTransportCredentials) Clone() credentials.TransportCredentials
- func (c *TLSTransportCredentials) Info() credentials.ProtocolInfo
- func (c *TLSTransportCredentials) OverrideServerName(serverNameOverride string) error
- func (c *TLSTransportCredentials) ServerHandshake(rawConn net.Conn) (net.Conn, credentials.AuthInfo, error)
- 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 NewTLSTransportCredentials ¶ added in v1.1.0
func NewTLSTransportCredentials(config tls.Config) credentials.TransportCredentials
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.ServerConfig, handler N.TCPConnectionHandler) (*Server, error)
func (*Server) ServePacket ¶
func (s *Server) ServePacket(listener net.PacketConn) error
func (*Server) Tun ¶
func (s *Server) Tun(server GunService_TunServer) error
type TLSTransportCredentials ¶ added in v1.1.0
type TLSTransportCredentials struct {
// contains filtered or unexported fields
}
func (*TLSTransportCredentials) ClientHandshake ¶ added in v1.1.0
func (*TLSTransportCredentials) Clone ¶ added in v1.1.0
func (c *TLSTransportCredentials) Clone() credentials.TransportCredentials
func (*TLSTransportCredentials) Info ¶ added in v1.1.0
func (c *TLSTransportCredentials) Info() credentials.ProtocolInfo
func (*TLSTransportCredentials) OverrideServerName ¶ added in v1.1.0
func (c *TLSTransportCredentials) OverrideServerName(serverNameOverride string) error
func (*TLSTransportCredentials) ServerHandshake ¶ added in v1.1.0
func (c *TLSTransportCredentials) ServerHandshake(rawConn net.Conn) (net.Conn, credentials.AuthInfo, 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.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package credentials defines APIs for parsing SPIFFE ID.
|
Package credentials defines APIs for parsing SPIFFE ID. |