config.pb.go 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // versions:
  3. // protoc-gen-go v1.25.0
  4. // protoc v3.13.0
  5. // source: transport/internet/tls/config.proto
  6. package tls
  7. import (
  8. proto "github.com/golang/protobuf/proto"
  9. protoreflect "google.golang.org/protobuf/reflect/protoreflect"
  10. protoimpl "google.golang.org/protobuf/runtime/protoimpl"
  11. reflect "reflect"
  12. sync "sync"
  13. )
  14. const (
  15. // Verify that this generated code is sufficiently up-to-date.
  16. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  17. // Verify that runtime/protoimpl is sufficiently up-to-date.
  18. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  19. )
  20. // This is a compile-time assertion that a sufficiently up-to-date version
  21. // of the legacy proto package is being used.
  22. const _ = proto.ProtoPackageIsVersion4
  23. type Certificate_Usage int32
  24. const (
  25. Certificate_ENCIPHERMENT Certificate_Usage = 0
  26. Certificate_AUTHORITY_VERIFY Certificate_Usage = 1
  27. Certificate_AUTHORITY_ISSUE Certificate_Usage = 2
  28. )
  29. // Enum value maps for Certificate_Usage.
  30. var (
  31. Certificate_Usage_name = map[int32]string{
  32. 0: "ENCIPHERMENT",
  33. 1: "AUTHORITY_VERIFY",
  34. 2: "AUTHORITY_ISSUE",
  35. }
  36. Certificate_Usage_value = map[string]int32{
  37. "ENCIPHERMENT": 0,
  38. "AUTHORITY_VERIFY": 1,
  39. "AUTHORITY_ISSUE": 2,
  40. }
  41. )
  42. func (x Certificate_Usage) Enum() *Certificate_Usage {
  43. p := new(Certificate_Usage)
  44. *p = x
  45. return p
  46. }
  47. func (x Certificate_Usage) String() string {
  48. return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
  49. }
  50. func (Certificate_Usage) Descriptor() protoreflect.EnumDescriptor {
  51. return file_transport_internet_tls_config_proto_enumTypes[0].Descriptor()
  52. }
  53. func (Certificate_Usage) Type() protoreflect.EnumType {
  54. return &file_transport_internet_tls_config_proto_enumTypes[0]
  55. }
  56. func (x Certificate_Usage) Number() protoreflect.EnumNumber {
  57. return protoreflect.EnumNumber(x)
  58. }
  59. // Deprecated: Use Certificate_Usage.Descriptor instead.
  60. func (Certificate_Usage) EnumDescriptor() ([]byte, []int) {
  61. return file_transport_internet_tls_config_proto_rawDescGZIP(), []int{0, 0}
  62. }
  63. type Certificate struct {
  64. state protoimpl.MessageState
  65. sizeCache protoimpl.SizeCache
  66. unknownFields protoimpl.UnknownFields
  67. // TLS certificate in x509 format.
  68. Certificate []byte `protobuf:"bytes,1,opt,name=Certificate,proto3" json:"Certificate,omitempty"`
  69. // TLS key in x509 format.
  70. Key []byte `protobuf:"bytes,2,opt,name=Key,proto3" json:"Key,omitempty"`
  71. Usage Certificate_Usage `protobuf:"varint,3,opt,name=usage,proto3,enum=v2ray.core.transport.internet.tls.Certificate_Usage" json:"usage,omitempty"`
  72. }
  73. func (x *Certificate) Reset() {
  74. *x = Certificate{}
  75. if protoimpl.UnsafeEnabled {
  76. mi := &file_transport_internet_tls_config_proto_msgTypes[0]
  77. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  78. ms.StoreMessageInfo(mi)
  79. }
  80. }
  81. func (x *Certificate) String() string {
  82. return protoimpl.X.MessageStringOf(x)
  83. }
  84. func (*Certificate) ProtoMessage() {}
  85. func (x *Certificate) ProtoReflect() protoreflect.Message {
  86. mi := &file_transport_internet_tls_config_proto_msgTypes[0]
  87. if protoimpl.UnsafeEnabled && x != nil {
  88. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  89. if ms.LoadMessageInfo() == nil {
  90. ms.StoreMessageInfo(mi)
  91. }
  92. return ms
  93. }
  94. return mi.MessageOf(x)
  95. }
  96. // Deprecated: Use Certificate.ProtoReflect.Descriptor instead.
  97. func (*Certificate) Descriptor() ([]byte, []int) {
  98. return file_transport_internet_tls_config_proto_rawDescGZIP(), []int{0}
  99. }
  100. func (x *Certificate) GetCertificate() []byte {
  101. if x != nil {
  102. return x.Certificate
  103. }
  104. return nil
  105. }
  106. func (x *Certificate) GetKey() []byte {
  107. if x != nil {
  108. return x.Key
  109. }
  110. return nil
  111. }
  112. func (x *Certificate) GetUsage() Certificate_Usage {
  113. if x != nil {
  114. return x.Usage
  115. }
  116. return Certificate_ENCIPHERMENT
  117. }
  118. type Config struct {
  119. state protoimpl.MessageState
  120. sizeCache protoimpl.SizeCache
  121. unknownFields protoimpl.UnknownFields
  122. // Whether or not to allow self-signed certificates.
  123. AllowInsecure bool `protobuf:"varint,1,opt,name=allow_insecure,json=allowInsecure,proto3" json:"allow_insecure,omitempty"`
  124. // Whether or not to allow insecure cipher suites.
  125. AllowInsecureCiphers bool `protobuf:"varint,5,opt,name=allow_insecure_ciphers,json=allowInsecureCiphers,proto3" json:"allow_insecure_ciphers,omitempty"`
  126. // List of certificates to be served on server.
  127. Certificate []*Certificate `protobuf:"bytes,2,rep,name=certificate,proto3" json:"certificate,omitempty"`
  128. // Override server name.
  129. ServerName string `protobuf:"bytes,3,opt,name=server_name,json=serverName,proto3" json:"server_name,omitempty"`
  130. // Lists of string as ALPN values.
  131. NextProtocol []string `protobuf:"bytes,4,rep,name=next_protocol,json=nextProtocol,proto3" json:"next_protocol,omitempty"`
  132. // Whether or not to disable session (ticket) resumption.
  133. DisableSessionResumption bool `protobuf:"varint,6,opt,name=disable_session_resumption,json=disableSessionResumption,proto3" json:"disable_session_resumption,omitempty"`
  134. // If true, root certificates on the system will not be loaded for verification.
  135. DisableSystemRoot bool `protobuf:"varint,7,opt,name=disable_system_root,json=disableSystemRoot,proto3" json:"disable_system_root,omitempty"`
  136. }
  137. func (x *Config) Reset() {
  138. *x = Config{}
  139. if protoimpl.UnsafeEnabled {
  140. mi := &file_transport_internet_tls_config_proto_msgTypes[1]
  141. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  142. ms.StoreMessageInfo(mi)
  143. }
  144. }
  145. func (x *Config) String() string {
  146. return protoimpl.X.MessageStringOf(x)
  147. }
  148. func (*Config) ProtoMessage() {}
  149. func (x *Config) ProtoReflect() protoreflect.Message {
  150. mi := &file_transport_internet_tls_config_proto_msgTypes[1]
  151. if protoimpl.UnsafeEnabled && x != nil {
  152. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  153. if ms.LoadMessageInfo() == nil {
  154. ms.StoreMessageInfo(mi)
  155. }
  156. return ms
  157. }
  158. return mi.MessageOf(x)
  159. }
  160. // Deprecated: Use Config.ProtoReflect.Descriptor instead.
  161. func (*Config) Descriptor() ([]byte, []int) {
  162. return file_transport_internet_tls_config_proto_rawDescGZIP(), []int{1}
  163. }
  164. func (x *Config) GetAllowInsecure() bool {
  165. if x != nil {
  166. return x.AllowInsecure
  167. }
  168. return false
  169. }
  170. func (x *Config) GetAllowInsecureCiphers() bool {
  171. if x != nil {
  172. return x.AllowInsecureCiphers
  173. }
  174. return false
  175. }
  176. func (x *Config) GetCertificate() []*Certificate {
  177. if x != nil {
  178. return x.Certificate
  179. }
  180. return nil
  181. }
  182. func (x *Config) GetServerName() string {
  183. if x != nil {
  184. return x.ServerName
  185. }
  186. return ""
  187. }
  188. func (x *Config) GetNextProtocol() []string {
  189. if x != nil {
  190. return x.NextProtocol
  191. }
  192. return nil
  193. }
  194. func (x *Config) GetDisableSessionResumption() bool {
  195. if x != nil {
  196. return x.DisableSessionResumption
  197. }
  198. return false
  199. }
  200. func (x *Config) GetDisableSystemRoot() bool {
  201. if x != nil {
  202. return x.DisableSystemRoot
  203. }
  204. return false
  205. }
  206. var File_transport_internet_tls_config_proto protoreflect.FileDescriptor
  207. var file_transport_internet_tls_config_proto_rawDesc = []byte{
  208. 0x0a, 0x23, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65,
  209. 0x72, 0x6e, 0x65, 0x74, 0x2f, 0x74, 0x6c, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e,
  210. 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x21, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72,
  211. 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65,
  212. 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x6c, 0x73, 0x22, 0xd3, 0x01, 0x0a, 0x0b, 0x43, 0x65, 0x72,
  213. 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x43, 0x65, 0x72, 0x74,
  214. 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x43,
  215. 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x4b, 0x65,
  216. 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x4b, 0x65, 0x79, 0x12, 0x4a, 0x0a, 0x05,
  217. 0x75, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x34, 0x2e, 0x76, 0x32,
  218. 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f,
  219. 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x6c, 0x73, 0x2e,
  220. 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x55, 0x73, 0x61, 0x67,
  221. 0x65, 0x52, 0x05, 0x75, 0x73, 0x61, 0x67, 0x65, 0x22, 0x44, 0x0a, 0x05, 0x55, 0x73, 0x61, 0x67,
  222. 0x65, 0x12, 0x10, 0x0a, 0x0c, 0x45, 0x4e, 0x43, 0x49, 0x50, 0x48, 0x45, 0x52, 0x4d, 0x45, 0x4e,
  223. 0x54, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x41, 0x55, 0x54, 0x48, 0x4f, 0x52, 0x49, 0x54, 0x59,
  224. 0x5f, 0x56, 0x45, 0x52, 0x49, 0x46, 0x59, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x41, 0x55, 0x54,
  225. 0x48, 0x4f, 0x52, 0x49, 0x54, 0x59, 0x5f, 0x49, 0x53, 0x53, 0x55, 0x45, 0x10, 0x02, 0x22, 0xeb,
  226. 0x02, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x6c, 0x6c,
  227. 0x6f, 0x77, 0x5f, 0x69, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
  228. 0x08, 0x52, 0x0d, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65,
  229. 0x12, 0x34, 0x0a, 0x16, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x69, 0x6e, 0x73, 0x65, 0x63, 0x75,
  230. 0x72, 0x65, 0x5f, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08,
  231. 0x52, 0x14, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x43,
  232. 0x69, 0x70, 0x68, 0x65, 0x72, 0x73, 0x12, 0x50, 0x0a, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66,
  233. 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x76, 0x32,
  234. 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f,
  235. 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x6c, 0x73, 0x2e,
  236. 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x0b, 0x63, 0x65, 0x72,
  237. 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76,
  238. 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73,
  239. 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x6e, 0x65, 0x78,
  240. 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09,
  241. 0x52, 0x0c, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x3c,
  242. 0x0a, 0x1a, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f,
  243. 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01,
  244. 0x28, 0x08, 0x52, 0x18, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69,
  245. 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2e, 0x0a, 0x13,
  246. 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x72,
  247. 0x6f, 0x6f, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x64, 0x69, 0x73, 0x61, 0x62,
  248. 0x6c, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x52, 0x6f, 0x6f, 0x74, 0x42, 0x74, 0x0a, 0x25,
  249. 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74,
  250. 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65,
  251. 0x74, 0x2e, 0x74, 0x6c, 0x73, 0x50, 0x01, 0x5a, 0x25, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63,
  252. 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72,
  253. 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2f, 0x74, 0x6c, 0x73, 0xaa, 0x02,
  254. 0x21, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x6e,
  255. 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x54,
  256. 0x6c, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
  257. }
  258. var (
  259. file_transport_internet_tls_config_proto_rawDescOnce sync.Once
  260. file_transport_internet_tls_config_proto_rawDescData = file_transport_internet_tls_config_proto_rawDesc
  261. )
  262. func file_transport_internet_tls_config_proto_rawDescGZIP() []byte {
  263. file_transport_internet_tls_config_proto_rawDescOnce.Do(func() {
  264. file_transport_internet_tls_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_transport_internet_tls_config_proto_rawDescData)
  265. })
  266. return file_transport_internet_tls_config_proto_rawDescData
  267. }
  268. var file_transport_internet_tls_config_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
  269. var file_transport_internet_tls_config_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
  270. var file_transport_internet_tls_config_proto_goTypes = []interface{}{
  271. (Certificate_Usage)(0), // 0: v2ray.core.transport.internet.tls.Certificate.Usage
  272. (*Certificate)(nil), // 1: v2ray.core.transport.internet.tls.Certificate
  273. (*Config)(nil), // 2: v2ray.core.transport.internet.tls.Config
  274. }
  275. var file_transport_internet_tls_config_proto_depIdxs = []int32{
  276. 0, // 0: v2ray.core.transport.internet.tls.Certificate.usage:type_name -> v2ray.core.transport.internet.tls.Certificate.Usage
  277. 1, // 1: v2ray.core.transport.internet.tls.Config.certificate:type_name -> v2ray.core.transport.internet.tls.Certificate
  278. 2, // [2:2] is the sub-list for method output_type
  279. 2, // [2:2] is the sub-list for method input_type
  280. 2, // [2:2] is the sub-list for extension type_name
  281. 2, // [2:2] is the sub-list for extension extendee
  282. 0, // [0:2] is the sub-list for field type_name
  283. }
  284. func init() { file_transport_internet_tls_config_proto_init() }
  285. func file_transport_internet_tls_config_proto_init() {
  286. if File_transport_internet_tls_config_proto != nil {
  287. return
  288. }
  289. if !protoimpl.UnsafeEnabled {
  290. file_transport_internet_tls_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
  291. switch v := v.(*Certificate); i {
  292. case 0:
  293. return &v.state
  294. case 1:
  295. return &v.sizeCache
  296. case 2:
  297. return &v.unknownFields
  298. default:
  299. return nil
  300. }
  301. }
  302. file_transport_internet_tls_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
  303. switch v := v.(*Config); i {
  304. case 0:
  305. return &v.state
  306. case 1:
  307. return &v.sizeCache
  308. case 2:
  309. return &v.unknownFields
  310. default:
  311. return nil
  312. }
  313. }
  314. }
  315. type x struct{}
  316. out := protoimpl.TypeBuilder{
  317. File: protoimpl.DescBuilder{
  318. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  319. RawDescriptor: file_transport_internet_tls_config_proto_rawDesc,
  320. NumEnums: 1,
  321. NumMessages: 2,
  322. NumExtensions: 0,
  323. NumServices: 0,
  324. },
  325. GoTypes: file_transport_internet_tls_config_proto_goTypes,
  326. DependencyIndexes: file_transport_internet_tls_config_proto_depIdxs,
  327. EnumInfos: file_transport_internet_tls_config_proto_enumTypes,
  328. MessageInfos: file_transport_internet_tls_config_proto_msgTypes,
  329. }.Build()
  330. File_transport_internet_tls_config_proto = out.File
  331. file_transport_internet_tls_config_proto_rawDesc = nil
  332. file_transport_internet_tls_config_proto_goTypes = nil
  333. file_transport_internet_tls_config_proto_depIdxs = nil
  334. }