config.pb.go 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. package tls
  2. import proto "github.com/golang/protobuf/proto"
  3. import fmt "fmt"
  4. import math "math"
  5. // Reference imports to suppress errors if they are not otherwise used.
  6. var _ = proto.Marshal
  7. var _ = fmt.Errorf
  8. var _ = math.Inf
  9. // This is a compile-time assertion to ensure that this generated file
  10. // is compatible with the proto package it is being compiled against.
  11. // A compilation error at this line likely means your copy of the
  12. // proto package needs to be updated.
  13. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
  14. type Certificate_Usage int32
  15. const (
  16. Certificate_ENCIPHERMENT Certificate_Usage = 0
  17. Certificate_AUTHORITY_VERIFY Certificate_Usage = 1
  18. Certificate_AUTHORITY_ISSUE Certificate_Usage = 2
  19. )
  20. var Certificate_Usage_name = map[int32]string{
  21. 0: "ENCIPHERMENT",
  22. 1: "AUTHORITY_VERIFY",
  23. 2: "AUTHORITY_ISSUE",
  24. }
  25. var Certificate_Usage_value = map[string]int32{
  26. "ENCIPHERMENT": 0,
  27. "AUTHORITY_VERIFY": 1,
  28. "AUTHORITY_ISSUE": 2,
  29. }
  30. func (x Certificate_Usage) String() string {
  31. return proto.EnumName(Certificate_Usage_name, int32(x))
  32. }
  33. func (Certificate_Usage) EnumDescriptor() ([]byte, []int) {
  34. return fileDescriptor_config_094edd58cf826f66, []int{0, 0}
  35. }
  36. type Certificate struct {
  37. // TLS certificate in x509 format.
  38. Certificate []byte `protobuf:"bytes,1,opt,name=Certificate,proto3" json:"Certificate,omitempty"`
  39. // TLS key in x509 format.
  40. Key []byte `protobuf:"bytes,2,opt,name=Key,proto3" json:"Key,omitempty"`
  41. Usage Certificate_Usage `protobuf:"varint,3,opt,name=usage,enum=v2ray.core.transport.internet.tls.Certificate_Usage" json:"usage,omitempty"`
  42. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  43. XXX_unrecognized []byte `json:"-"`
  44. XXX_sizecache int32 `json:"-"`
  45. }
  46. func (m *Certificate) Reset() { *m = Certificate{} }
  47. func (m *Certificate) String() string { return proto.CompactTextString(m) }
  48. func (*Certificate) ProtoMessage() {}
  49. func (*Certificate) Descriptor() ([]byte, []int) {
  50. return fileDescriptor_config_094edd58cf826f66, []int{0}
  51. }
  52. func (m *Certificate) XXX_Unmarshal(b []byte) error {
  53. return xxx_messageInfo_Certificate.Unmarshal(m, b)
  54. }
  55. func (m *Certificate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  56. return xxx_messageInfo_Certificate.Marshal(b, m, deterministic)
  57. }
  58. func (dst *Certificate) XXX_Merge(src proto.Message) {
  59. xxx_messageInfo_Certificate.Merge(dst, src)
  60. }
  61. func (m *Certificate) XXX_Size() int {
  62. return xxx_messageInfo_Certificate.Size(m)
  63. }
  64. func (m *Certificate) XXX_DiscardUnknown() {
  65. xxx_messageInfo_Certificate.DiscardUnknown(m)
  66. }
  67. var xxx_messageInfo_Certificate proto.InternalMessageInfo
  68. func (m *Certificate) GetCertificate() []byte {
  69. if m != nil {
  70. return m.Certificate
  71. }
  72. return nil
  73. }
  74. func (m *Certificate) GetKey() []byte {
  75. if m != nil {
  76. return m.Key
  77. }
  78. return nil
  79. }
  80. func (m *Certificate) GetUsage() Certificate_Usage {
  81. if m != nil {
  82. return m.Usage
  83. }
  84. return Certificate_ENCIPHERMENT
  85. }
  86. type Config struct {
  87. // Whether or not to allow self-signed certificates.
  88. AllowInsecure bool `protobuf:"varint,1,opt,name=allow_insecure,json=allowInsecure" json:"allow_insecure,omitempty"`
  89. // List of certificates to be served on server.
  90. Certificate []*Certificate `protobuf:"bytes,2,rep,name=certificate" json:"certificate,omitempty"`
  91. // Override server name.
  92. ServerName string `protobuf:"bytes,3,opt,name=server_name,json=serverName" json:"server_name,omitempty"`
  93. // Lists of string as ALPN values.
  94. NextProtocol []string `protobuf:"bytes,4,rep,name=next_protocol,json=nextProtocol" json:"next_protocol,omitempty"`
  95. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  96. XXX_unrecognized []byte `json:"-"`
  97. XXX_sizecache int32 `json:"-"`
  98. }
  99. func (m *Config) Reset() { *m = Config{} }
  100. func (m *Config) String() string { return proto.CompactTextString(m) }
  101. func (*Config) ProtoMessage() {}
  102. func (*Config) Descriptor() ([]byte, []int) {
  103. return fileDescriptor_config_094edd58cf826f66, []int{1}
  104. }
  105. func (m *Config) XXX_Unmarshal(b []byte) error {
  106. return xxx_messageInfo_Config.Unmarshal(m, b)
  107. }
  108. func (m *Config) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  109. return xxx_messageInfo_Config.Marshal(b, m, deterministic)
  110. }
  111. func (dst *Config) XXX_Merge(src proto.Message) {
  112. xxx_messageInfo_Config.Merge(dst, src)
  113. }
  114. func (m *Config) XXX_Size() int {
  115. return xxx_messageInfo_Config.Size(m)
  116. }
  117. func (m *Config) XXX_DiscardUnknown() {
  118. xxx_messageInfo_Config.DiscardUnknown(m)
  119. }
  120. var xxx_messageInfo_Config proto.InternalMessageInfo
  121. func (m *Config) GetAllowInsecure() bool {
  122. if m != nil {
  123. return m.AllowInsecure
  124. }
  125. return false
  126. }
  127. func (m *Config) GetCertificate() []*Certificate {
  128. if m != nil {
  129. return m.Certificate
  130. }
  131. return nil
  132. }
  133. func (m *Config) GetServerName() string {
  134. if m != nil {
  135. return m.ServerName
  136. }
  137. return ""
  138. }
  139. func (m *Config) GetNextProtocol() []string {
  140. if m != nil {
  141. return m.NextProtocol
  142. }
  143. return nil
  144. }
  145. func init() {
  146. proto.RegisterType((*Certificate)(nil), "v2ray.core.transport.internet.tls.Certificate")
  147. proto.RegisterType((*Config)(nil), "v2ray.core.transport.internet.tls.Config")
  148. proto.RegisterEnum("v2ray.core.transport.internet.tls.Certificate_Usage", Certificate_Usage_name, Certificate_Usage_value)
  149. }
  150. func init() {
  151. proto.RegisterFile("v2ray.com/core/transport/internet/tls/config.proto", fileDescriptor_config_094edd58cf826f66)
  152. }
  153. var fileDescriptor_config_094edd58cf826f66 = []byte{
  154. // 358 bytes of a gzipped FileDescriptorProto
  155. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x91, 0xd1, 0x6e, 0xda, 0x30,
  156. 0x14, 0x40, 0x97, 0x64, 0xa0, 0xe1, 0x00, 0x8b, 0xbc, 0x3d, 0xe4, 0x6d, 0x81, 0x09, 0x29, 0x4f,
  157. 0x8e, 0x94, 0xed, 0x07, 0xb6, 0x34, 0x15, 0x69, 0x55, 0x1a, 0x99, 0x80, 0x44, 0x5f, 0x22, 0xd7,
  158. 0x32, 0x28, 0x52, 0x12, 0x23, 0xdb, 0xd0, 0xf2, 0x4b, 0xfd, 0x91, 0x7e, 0x40, 0x7f, 0xa8, 0x4a,
  159. 0x02, 0x14, 0x9e, 0x50, 0xdf, 0x7c, 0x8f, 0xcf, 0xbd, 0xd7, 0xf7, 0x1a, 0xf8, 0x5b, 0x5f, 0x90,
  160. 0x1d, 0xa2, 0xbc, 0xf0, 0x28, 0x17, 0xcc, 0x53, 0x82, 0x94, 0x72, 0xcd, 0x85, 0xf2, 0xb2, 0x52,
  161. 0x31, 0x51, 0x32, 0xe5, 0xa9, 0x5c, 0x7a, 0x94, 0x97, 0xcb, 0x6c, 0x85, 0xd6, 0x82, 0x2b, 0x0e,
  162. 0x07, 0x87, 0x1c, 0xc1, 0xd0, 0xd1, 0x47, 0x07, 0x1f, 0xa9, 0x5c, 0x0e, 0xdf, 0x34, 0x60, 0x06,
  163. 0x4c, 0xa8, 0x6c, 0x99, 0x51, 0xa2, 0x18, 0x74, 0xce, 0x42, 0x5b, 0x73, 0x34, 0xb7, 0x8b, 0xcf,
  164. 0x0c, 0x0b, 0x18, 0xb7, 0x6c, 0x67, 0xeb, 0xf5, 0x4d, 0x75, 0x84, 0x37, 0xa0, 0xb5, 0x91, 0x64,
  165. 0xc5, 0x6c, 0xc3, 0xd1, 0xdc, 0xbe, 0xff, 0x17, 0x5d, 0x6c, 0x8b, 0x4e, 0x0a, 0xa2, 0x59, 0x95,
  166. 0x8b, 0x9b, 0x12, 0xc3, 0x2b, 0xd0, 0xaa, 0x63, 0x68, 0x81, 0x6e, 0x38, 0x09, 0xa2, 0x78, 0x1c,
  167. 0xe2, 0xbb, 0x70, 0x92, 0x58, 0x5f, 0xe0, 0x4f, 0x60, 0xfd, 0x9b, 0x25, 0xe3, 0x7b, 0x1c, 0x25,
  168. 0x8b, 0x74, 0x1e, 0xe2, 0xe8, 0x7a, 0x61, 0x69, 0xf0, 0x07, 0xf8, 0xfe, 0x41, 0xa3, 0xe9, 0x74,
  169. 0x16, 0x5a, 0xfa, 0xf0, 0x55, 0x03, 0xed, 0xa0, 0xde, 0x04, 0x1c, 0x81, 0x3e, 0xc9, 0x73, 0xfe,
  170. 0x94, 0x66, 0xa5, 0x64, 0x74, 0x23, 0x9a, 0x99, 0xbe, 0xe1, 0x5e, 0x4d, 0xa3, 0x3d, 0x84, 0x31,
  171. 0x30, 0xe9, 0xc9, 0xdc, 0xba, 0x63, 0xb8, 0xa6, 0x8f, 0x3e, 0x37, 0x09, 0x3e, 0x2d, 0x01, 0x7f,
  172. 0x01, 0x53, 0x32, 0xb1, 0x65, 0x22, 0x2d, 0x49, 0xd1, 0xec, 0xa6, 0x83, 0x41, 0x83, 0x26, 0xa4,
  173. 0x60, 0xf0, 0x37, 0xe8, 0x95, 0xec, 0x59, 0xa5, 0xf5, 0x5f, 0x51, 0x9e, 0xdb, 0x5f, 0x1d, 0xc3,
  174. 0xed, 0xe0, 0x6e, 0x05, 0xe3, 0x3d, 0xfb, 0x8f, 0xc1, 0x88, 0xf2, 0xe2, 0xf2, 0x3b, 0x62, 0xed,
  175. 0xc1, 0x50, 0xb9, 0x7c, 0xd1, 0x07, 0x73, 0x1f, 0x93, 0x1d, 0x0a, 0x2a, 0x35, 0x39, 0xaa, 0xd1,
  176. 0x41, 0x4d, 0x72, 0xf9, 0xd8, 0xae, 0x3b, 0xfe, 0x79, 0x0f, 0x00, 0x00, 0xff, 0xff, 0x0b, 0xcd,
  177. 0x2a, 0x68, 0x53, 0x02, 0x00, 0x00,
  178. }