1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-07-14 13:10:13 -04:00

update proto def

This commit is contained in:
Darien Raymond
2017-04-02 14:24:10 +02:00
parent 9d6513d3d3
commit 2111c7e9ca
8 changed files with 93 additions and 120 deletions

View File

@@ -15,6 +15,7 @@ var _ = math.Inf
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
// Address of a network host. It may be either an IP address or a domain address.
type IPOrDomain struct {
// Types that are valid to be assigned to Address:
// *IPOrDomain_Ip

View File

@@ -9,6 +9,7 @@ var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// Endpoint of a network connection.
type Endpoint struct {
Network Network `protobuf:"varint,1,opt,name=network,enum=v2ray.core.common.net.Network" json:"network,omitempty"`
Address *IPOrDomain `protobuf:"bytes,2,opt,name=address" json:"address,omitempty"`

View File

@@ -13,11 +13,9 @@ type Network int32
const (
Network_Unknown Network = 0
// Native TCP provided by system.
Network_RawTCP Network = 1
// V2Ray specific TCP.
Network_TCP Network = 2
Network_UDP Network = 3
Network_RawTCP Network = 1
Network_TCP Network = 2
Network_UDP Network = 3
)
var Network_name = map[int32]string{
@@ -38,6 +36,7 @@ func (x Network) String() string {
}
func (Network) EnumDescriptor() ([]byte, []int) { return fileDescriptor2, []int{0} }
// NetworkList is a list of Networks.
type NetworkList struct {
Network []Network `protobuf:"varint,1,rep,packed,name=network,enum=v2ray.core.common.net.Network" json:"network,omitempty"`
}

View File

@@ -11,8 +11,10 @@ var _ = math.Inf
// PortRange represents a range of ports.
type PortRange struct {
// The port that this range starts from.
From uint32 `protobuf:"varint,1,opt,name=From" json:"From,omitempty"`
To uint32 `protobuf:"varint,2,opt,name=To" json:"To,omitempty"`
// The port that this range ends with (inclusive).
To uint32 `protobuf:"varint,2,opt,name=To" json:"To,omitempty"`
}
func (m *PortRange) Reset() { *m = PortRange{} }