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:
yuhan6665 2023-05-21 12:03:42 -04:00
parent c9f517108c
commit d11d72be6c
73 changed files with 238 additions and 205 deletions

View file

@ -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