mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-30 09:18:34 +00:00
Update proto file and fix protoc version parsing
The new protoc cli return version v23.1, so we parse the file version v4.23.1 without "4."
This commit is contained in:
parent
c9f517108c
commit
d11d72be6c
73 changed files with 238 additions and 205 deletions
|
@ -1,7 +1,7 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc v3.21.12
|
||||
// protoc-gen-go v1.30.0
|
||||
// protoc v4.23.1
|
||||
// source: app/router/command/command.proto
|
||||
|
||||
package command
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.2.0
|
||||
// - protoc v3.21.12
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc v4.23.1
|
||||
// source: app/router/command/command.proto
|
||||
|
||||
package command
|
||||
|
@ -18,6 +18,11 @@ import (
|
|||
// Requires gRPC-Go v1.32.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
const (
|
||||
RoutingService_SubscribeRoutingStats_FullMethodName = "/xray.app.router.command.RoutingService/SubscribeRoutingStats"
|
||||
RoutingService_TestRoute_FullMethodName = "/xray.app.router.command.RoutingService/TestRoute"
|
||||
)
|
||||
|
||||
// RoutingServiceClient is the client API for RoutingService 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.
|
||||
|
@ -35,7 +40,7 @@ func NewRoutingServiceClient(cc grpc.ClientConnInterface) RoutingServiceClient {
|
|||
}
|
||||
|
||||
func (c *routingServiceClient) SubscribeRoutingStats(ctx context.Context, in *SubscribeRoutingStatsRequest, opts ...grpc.CallOption) (RoutingService_SubscribeRoutingStatsClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &RoutingService_ServiceDesc.Streams[0], "/xray.app.router.command.RoutingService/SubscribeRoutingStats", opts...)
|
||||
stream, err := c.cc.NewStream(ctx, &RoutingService_ServiceDesc.Streams[0], RoutingService_SubscribeRoutingStats_FullMethodName, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -68,7 +73,7 @@ func (x *routingServiceSubscribeRoutingStatsClient) Recv() (*RoutingContext, err
|
|||
|
||||
func (c *routingServiceClient) TestRoute(ctx context.Context, in *TestRouteRequest, opts ...grpc.CallOption) (*RoutingContext, error) {
|
||||
out := new(RoutingContext)
|
||||
err := c.cc.Invoke(ctx, "/xray.app.router.command.RoutingService/TestRoute", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, RoutingService_TestRoute_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -138,7 +143,7 @@ func _RoutingService_TestRoute_Handler(srv interface{}, ctx context.Context, dec
|
|||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/xray.app.router.command.RoutingService/TestRoute",
|
||||
FullMethod: RoutingService_TestRoute_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RoutingServiceServer).TestRoute(ctx, req.(*TestRouteRequest))
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc v3.21.12
|
||||
// protoc-gen-go v1.30.0
|
||||
// protoc v4.23.1
|
||||
// source: app/router/config.proto
|
||||
|
||||
package router
|
||||
|
@ -486,7 +486,7 @@ type RoutingRule struct {
|
|||
// List of CIDRs for target IP address matching.
|
||||
// Deprecated. Use geoip below.
|
||||
//
|
||||
// Deprecated: Do not use.
|
||||
// Deprecated: Marked as deprecated in app/router/config.proto.
|
||||
Cidr []*CIDR `protobuf:"bytes,3,rep,name=cidr,proto3" json:"cidr,omitempty"`
|
||||
// List of GeoIPs for target IP address matching. If this entry exists, the
|
||||
// cidr above will have no effect. GeoIP fields with the same country code are
|
||||
|
@ -496,19 +496,19 @@ type RoutingRule struct {
|
|||
// A range of port [from, to]. If the destination port is in this range, this
|
||||
// rule takes effect. Deprecated. Use port_list.
|
||||
//
|
||||
// Deprecated: Do not use.
|
||||
// Deprecated: Marked as deprecated in app/router/config.proto.
|
||||
PortRange *net.PortRange `protobuf:"bytes,4,opt,name=port_range,json=portRange,proto3" json:"port_range,omitempty"`
|
||||
// List of ports.
|
||||
PortList *net.PortList `protobuf:"bytes,14,opt,name=port_list,json=portList,proto3" json:"port_list,omitempty"`
|
||||
// List of networks. Deprecated. Use networks.
|
||||
//
|
||||
// Deprecated: Do not use.
|
||||
// Deprecated: Marked as deprecated in app/router/config.proto.
|
||||
NetworkList *net.NetworkList `protobuf:"bytes,5,opt,name=network_list,json=networkList,proto3" json:"network_list,omitempty"`
|
||||
// List of networks for matching.
|
||||
Networks []net.Network `protobuf:"varint,13,rep,packed,name=networks,proto3,enum=xray.common.net.Network" json:"networks,omitempty"`
|
||||
// List of CIDRs for source IP address matching.
|
||||
//
|
||||
// Deprecated: Do not use.
|
||||
// Deprecated: Marked as deprecated in app/router/config.proto.
|
||||
SourceCidr []*CIDR `protobuf:"bytes,6,rep,name=source_cidr,json=sourceCidr,proto3" json:"source_cidr,omitempty"`
|
||||
// List of GeoIPs for source IP address matching. If this entry exists, the
|
||||
// source_cidr above will have no effect.
|
||||
|
@ -582,7 +582,7 @@ func (x *RoutingRule) GetDomain() []*Domain {
|
|||
return nil
|
||||
}
|
||||
|
||||
// Deprecated: Do not use.
|
||||
// Deprecated: Marked as deprecated in app/router/config.proto.
|
||||
func (x *RoutingRule) GetCidr() []*CIDR {
|
||||
if x != nil {
|
||||
return x.Cidr
|
||||
|
@ -597,7 +597,7 @@ func (x *RoutingRule) GetGeoip() []*GeoIP {
|
|||
return nil
|
||||
}
|
||||
|
||||
// Deprecated: Do not use.
|
||||
// Deprecated: Marked as deprecated in app/router/config.proto.
|
||||
func (x *RoutingRule) GetPortRange() *net.PortRange {
|
||||
if x != nil {
|
||||
return x.PortRange
|
||||
|
@ -612,7 +612,7 @@ func (x *RoutingRule) GetPortList() *net.PortList {
|
|||
return nil
|
||||
}
|
||||
|
||||
// Deprecated: Do not use.
|
||||
// Deprecated: Marked as deprecated in app/router/config.proto.
|
||||
func (x *RoutingRule) GetNetworkList() *net.NetworkList {
|
||||
if x != nil {
|
||||
return x.NetworkList
|
||||
|
@ -627,7 +627,7 @@ func (x *RoutingRule) GetNetworks() []net.Network {
|
|||
return nil
|
||||
}
|
||||
|
||||
// Deprecated: Do not use.
|
||||
// Deprecated: Marked as deprecated in app/router/config.proto.
|
||||
func (x *RoutingRule) GetSourceCidr() []*CIDR {
|
||||
if x != nil {
|
||||
return x.SourceCidr
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue