Darien Raymond před 8 roky
rodič
revize
e66a787782

+ 88 - 0
common/protocol/command.pb.go

@@ -0,0 +1,88 @@
+// Code generated by protoc-gen-go.
+// source: v2ray.com/core/common/protocol/command.proto
+// DO NOT EDIT!
+
+/*
+Package protocol is a generated protocol buffer package.
+
+It is generated from these files:
+	v2ray.com/core/common/protocol/command.proto
+	v2ray.com/core/common/protocol/headers.proto
+	v2ray.com/core/common/protocol/server_spec.proto
+	v2ray.com/core/common/protocol/user.proto
+
+It has these top-level messages:
+	AlternativeOutboundConfig
+	SecurityConfig
+	ServerEndpoint
+	User
+*/
+package protocol
+
+import proto "github.com/golang/protobuf/proto"
+import fmt "fmt"
+import math "math"
+import v2ray_core_common_serial "v2ray.com/core/common/serial"
+import v2ray_core_transport_internet "v2ray.com/core/transport/internet"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+
+type AlternativeOutboundConfig struct {
+	Settings       *v2ray_core_common_serial.TypedMessage      `protobuf:"bytes,1,opt,name=settings" json:"settings,omitempty"`
+	StreamSettings *v2ray_core_transport_internet.StreamConfig `protobuf:"bytes,3,opt,name=stream_settings,json=streamSettings" json:"stream_settings,omitempty"`
+}
+
+func (m *AlternativeOutboundConfig) Reset()                    { *m = AlternativeOutboundConfig{} }
+func (m *AlternativeOutboundConfig) String() string            { return proto.CompactTextString(m) }
+func (*AlternativeOutboundConfig) ProtoMessage()               {}
+func (*AlternativeOutboundConfig) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
+
+func (m *AlternativeOutboundConfig) GetSettings() *v2ray_core_common_serial.TypedMessage {
+	if m != nil {
+		return m.Settings
+	}
+	return nil
+}
+
+func (m *AlternativeOutboundConfig) GetStreamSettings() *v2ray_core_transport_internet.StreamConfig {
+	if m != nil {
+		return m.StreamSettings
+	}
+	return nil
+}
+
+func init() {
+	proto.RegisterType((*AlternativeOutboundConfig)(nil), "v2ray.core.common.protocol.AlternativeOutboundConfig")
+}
+
+func init() { proto.RegisterFile("v2ray.com/core/common/protocol/command.proto", fileDescriptor0) }
+
+var fileDescriptor0 = []byte{
+	// 266 bytes of a gzipped FileDescriptorProto
+	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x74, 0x90, 0xc1, 0x4a, 0xc4, 0x30,
+	0x10, 0x86, 0xa9, 0x82, 0x2c, 0x55, 0x14, 0x7a, 0xd2, 0x1e, 0x44, 0x3c, 0x88, 0xa0, 0x4c, 0xa4,
+	0x3e, 0x81, 0xed, 0x59, 0x5c, 0xba, 0xab, 0x07, 0x2f, 0x4b, 0x36, 0x1d, 0x4b, 0xa1, 0xc9, 0x94,
+	0x64, 0x76, 0xa1, 0xaf, 0xe4, 0xdd, 0xf7, 0x93, 0x26, 0xdb, 0x22, 0xea, 0x1e, 0xf3, 0xe7, 0xff,
+	0x3f, 0x3e, 0x26, 0xbe, 0xdf, 0x66, 0x56, 0xf6, 0xa0, 0x48, 0x0b, 0x45, 0x16, 0x85, 0x22, 0xad,
+	0xc9, 0x88, 0xce, 0x12, 0x93, 0xa2, 0xd6, 0xbf, 0xa5, 0xa9, 0xc0, 0x07, 0x49, 0x3a, 0xb6, 0x2d,
+	0x42, 0x68, 0xc2, 0xd8, 0x4c, 0x1f, 0xfe, 0x27, 0x39, 0xb4, 0x8d, 0x6c, 0x05, 0xf7, 0x1d, 0x56,
+	0x2b, 0x8d, 0xce, 0xc9, 0x1a, 0xc3, 0x28, 0x85, 0x5f, 0x0b, 0xb6, 0xd2, 0xb8, 0x8e, 0x2c, 0x8b,
+	0xc6, 0x30, 0x5a, 0x83, 0x2c, 0x14, 0x99, 0x8f, 0xa6, 0x0e, 0xfd, 0xeb, 0xaf, 0x28, 0xbe, 0x78,
+	0x6a, 0x87, 0x1f, 0xc9, 0xcd, 0x16, 0x5f, 0x36, 0xbc, 0xa6, 0x8d, 0xa9, 0x0a, 0xdf, 0x49, 0xf2,
+	0x78, 0xe6, 0x90, 0xb9, 0x31, 0xb5, 0x3b, 0x8f, 0xae, 0xa2, 0xdb, 0xe3, 0xec, 0x06, 0xfe, 0xea,
+	0x06, 0x1d, 0x58, 0x0e, 0x3a, 0xcf, 0xc1, 0xa6, 0x9c, 0x76, 0xc9, 0x32, 0x3e, 0x73, 0x6c, 0x51,
+	0xea, 0xd5, 0x84, 0x3a, 0xf4, 0xa8, 0xbb, 0x9f, 0xa8, 0xc9, 0x13, 0x46, 0x4f, 0x58, 0xf8, 0x55,
+	0x30, 0x29, 0x4f, 0x03, 0x63, 0xb1, 0x43, 0xe4, 0xaf, 0xf1, 0xa5, 0x22, 0x0d, 0xfb, 0x6f, 0x97,
+	0x9f, 0x14, 0xe1, 0xcc, 0xf3, 0x21, 0x78, 0x9f, 0x8d, 0xf9, 0xe7, 0x41, 0xfa, 0x96, 0x95, 0xb2,
+	0x87, 0x62, 0x18, 0x15, 0x61, 0x34, 0xdf, 0x7d, 0xae, 0x8f, 0x7c, 0xed, 0xf1, 0x3b, 0x00, 0x00,
+	0xff, 0xff, 0xea, 0x88, 0xd0, 0xa5, 0xc3, 0x01, 0x00, 0x00,
+}

+ 15 - 0
common/protocol/command.proto

@@ -0,0 +1,15 @@
+syntax = "proto3";
+
+package v2ray.core.common.protocol;
+option csharp_namespace = "V2Ray.Core.Common.Protocol";
+option go_package = "protocol";
+option java_package = "com.v2ray.core.common.protocol";
+option java_outer_classname = "CommandProto";
+
+import "v2ray.com/core/common/serial/typed_message.proto";
+import "v2ray.com/core/transport/internet/config.proto";
+
+message AlternativeOutboundConfig {
+  v2ray.core.common.serial.TypedMessage settings = 1;
+  v2ray.core.transport.internet.StreamConfig stream_settings = 3;
+}

+ 4 - 23
common/protocol/headers.pb.go

@@ -2,19 +2,6 @@
 // source: v2ray.com/core/common/protocol/headers.proto
 // DO NOT EDIT!
 
-/*
-Package protocol is a generated protocol buffer package.
-
-It is generated from these files:
-	v2ray.com/core/common/protocol/headers.proto
-	v2ray.com/core/common/protocol/server_spec.proto
-	v2ray.com/core/common/protocol/user.proto
-
-It has these top-level messages:
-	SecurityConfig
-	ServerEndpoint
-	User
-*/
 package protocol
 
 import proto "github.com/golang/protobuf/proto"
@@ -26,12 +13,6 @@ var _ = proto.Marshal
 var _ = fmt.Errorf
 var _ = math.Inf
 
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
-
 type SecurityType int32
 
 const (
@@ -63,7 +44,7 @@ var SecurityType_value = map[string]int32{
 func (x SecurityType) String() string {
 	return proto.EnumName(SecurityType_name, int32(x))
 }
-func (SecurityType) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
+func (SecurityType) EnumDescriptor() ([]byte, []int) { return fileDescriptor1, []int{0} }
 
 type SecurityConfig struct {
 	Type SecurityType `protobuf:"varint,1,opt,name=type,enum=v2ray.core.common.protocol.SecurityType" json:"type,omitempty"`
@@ -72,16 +53,16 @@ type SecurityConfig struct {
 func (m *SecurityConfig) Reset()                    { *m = SecurityConfig{} }
 func (m *SecurityConfig) String() string            { return proto.CompactTextString(m) }
 func (*SecurityConfig) ProtoMessage()               {}
-func (*SecurityConfig) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
+func (*SecurityConfig) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0} }
 
 func init() {
 	proto.RegisterType((*SecurityConfig)(nil), "v2ray.core.common.protocol.SecurityConfig")
 	proto.RegisterEnum("v2ray.core.common.protocol.SecurityType", SecurityType_name, SecurityType_value)
 }
 
-func init() { proto.RegisterFile("v2ray.com/core/common/protocol/headers.proto", fileDescriptor0) }
+func init() { proto.RegisterFile("v2ray.com/core/common/protocol/headers.proto", fileDescriptor1) }
 
-var fileDescriptor0 = []byte{
+var fileDescriptor1 = []byte{
 	// 241 bytes of a gzipped FileDescriptorProto
 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xd2, 0x29, 0x33, 0x2a, 0x4a,
 	0xac, 0xd4, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xce, 0x2f, 0x4a, 0xd5, 0x4f, 0xce, 0xcf, 0xcd, 0xcd,

+ 8 - 8
common/protocol/server_spec.pb.go

@@ -7,7 +7,7 @@ package protocol
 import proto "github.com/golang/protobuf/proto"
 import fmt "fmt"
 import math "math"
-import v2ray_core_common_net "v2ray.com/core/common/net"
+import v2ray_core_common_net1 "v2ray.com/core/common/net"
 
 // Reference imports to suppress errors if they are not otherwise used.
 var _ = proto.Marshal
@@ -15,17 +15,17 @@ var _ = fmt.Errorf
 var _ = math.Inf
 
 type ServerEndpoint struct {
-	Address *v2ray_core_common_net.IPOrDomain `protobuf:"bytes,1,opt,name=address" json:"address,omitempty"`
-	Port    uint32                            `protobuf:"varint,2,opt,name=port" json:"port,omitempty"`
-	User    []*User                           `protobuf:"bytes,3,rep,name=user" json:"user,omitempty"`
+	Address *v2ray_core_common_net1.IPOrDomain `protobuf:"bytes,1,opt,name=address" json:"address,omitempty"`
+	Port    uint32                             `protobuf:"varint,2,opt,name=port" json:"port,omitempty"`
+	User    []*User                            `protobuf:"bytes,3,rep,name=user" json:"user,omitempty"`
 }
 
 func (m *ServerEndpoint) Reset()                    { *m = ServerEndpoint{} }
 func (m *ServerEndpoint) String() string            { return proto.CompactTextString(m) }
 func (*ServerEndpoint) ProtoMessage()               {}
-func (*ServerEndpoint) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0} }
+func (*ServerEndpoint) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{0} }
 
-func (m *ServerEndpoint) GetAddress() *v2ray_core_common_net.IPOrDomain {
+func (m *ServerEndpoint) GetAddress() *v2ray_core_common_net1.IPOrDomain {
 	if m != nil {
 		return m.Address
 	}
@@ -43,9 +43,9 @@ func init() {
 	proto.RegisterType((*ServerEndpoint)(nil), "v2ray.core.common.protocol.ServerEndpoint")
 }
 
-func init() { proto.RegisterFile("v2ray.com/core/common/protocol/server_spec.proto", fileDescriptor1) }
+func init() { proto.RegisterFile("v2ray.com/core/common/protocol/server_spec.proto", fileDescriptor2) }
 
-var fileDescriptor1 = []byte{
+var fileDescriptor2 = []byte{
 	// 230 bytes of a gzipped FileDescriptorProto
 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x84, 0x8f, 0x3d, 0x4b, 0x04, 0x31,
 	0x10, 0x86, 0x59, 0xef, 0x50, 0xc9, 0xa1, 0x42, 0xaa, 0x65, 0x0b, 0x89, 0x36, 0xae, 0xcd, 0x44,

+ 3 - 3
common/protocol/user.pb.go

@@ -24,7 +24,7 @@ type User struct {
 func (m *User) Reset()                    { *m = User{} }
 func (m *User) String() string            { return proto.CompactTextString(m) }
 func (*User) ProtoMessage()               {}
-func (*User) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{0} }
+func (*User) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{0} }
 
 func (m *User) GetAccount() *v2ray_core_common_serial.TypedMessage {
 	if m != nil {
@@ -37,9 +37,9 @@ func init() {
 	proto.RegisterType((*User)(nil), "v2ray.core.common.protocol.User")
 }
 
-func init() { proto.RegisterFile("v2ray.com/core/common/protocol/user.proto", fileDescriptor2) }
+func init() { proto.RegisterFile("v2ray.com/core/common/protocol/user.proto", fileDescriptor3) }
 
-var fileDescriptor2 = []byte{
+var fileDescriptor3 = []byte{
 	// 204 bytes of a gzipped FileDescriptorProto
 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xd2, 0x2c, 0x33, 0x2a, 0x4a,
 	0xac, 0xd4, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xce, 0x2f, 0x4a, 0xd5, 0x4f, 0xce, 0xcf, 0xcd, 0xcd,

+ 5 - 2
proxy/vmess/account.pb.go

@@ -30,8 +30,11 @@ var _ = math.Inf
 const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
 
 type Account struct {
-	Id               string                                     `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
-	AlterId          uint32                                     `protobuf:"varint,2,opt,name=alter_id,json=alterId" json:"alter_id,omitempty"`
+	// ID of the account, in the form of an UUID, e.g., "66ad4540-b58c-4ad2-9926-ea63445a9b57".
+	Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
+	// Number of alternative IDs. Client and server must share the same number.
+	AlterId uint32 `protobuf:"varint,2,opt,name=alter_id,json=alterId" json:"alter_id,omitempty"`
+	// Security settings. Only applies to client side.
 	SecuritySettings *v2ray_core_common_protocol.SecurityConfig `protobuf:"bytes,3,opt,name=security_settings,json=securitySettings" json:"security_settings,omitempty"`
 }