config.pb.go 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. package tls
  2. import (
  3. fmt "fmt"
  4. proto "github.com/golang/protobuf/proto"
  5. math "math"
  6. )
  7. // Reference imports to suppress errors if they are not otherwise used.
  8. var _ = proto.Marshal
  9. var _ = fmt.Errorf
  10. var _ = math.Inf
  11. // This is a compile-time assertion to ensure that this generated file
  12. // is compatible with the proto package it is being compiled against.
  13. // A compilation error at this line likely means your copy of the
  14. // proto package needs to be updated.
  15. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
  16. type Certificate_Usage int32
  17. const (
  18. Certificate_ENCIPHERMENT Certificate_Usage = 0
  19. Certificate_AUTHORITY_VERIFY Certificate_Usage = 1
  20. Certificate_AUTHORITY_ISSUE Certificate_Usage = 2
  21. )
  22. var Certificate_Usage_name = map[int32]string{
  23. 0: "ENCIPHERMENT",
  24. 1: "AUTHORITY_VERIFY",
  25. 2: "AUTHORITY_ISSUE",
  26. }
  27. var Certificate_Usage_value = map[string]int32{
  28. "ENCIPHERMENT": 0,
  29. "AUTHORITY_VERIFY": 1,
  30. "AUTHORITY_ISSUE": 2,
  31. }
  32. func (x Certificate_Usage) String() string {
  33. return proto.EnumName(Certificate_Usage_name, int32(x))
  34. }
  35. func (Certificate_Usage) EnumDescriptor() ([]byte, []int) {
  36. return fileDescriptor_42ed70cad60a2736, []int{0, 0}
  37. }
  38. type Certificate struct {
  39. // TLS certificate in x509 format.
  40. Certificate []byte `protobuf:"bytes,1,opt,name=Certificate,proto3" json:"Certificate,omitempty"`
  41. // TLS key in x509 format.
  42. Key []byte `protobuf:"bytes,2,opt,name=Key,proto3" json:"Key,omitempty"`
  43. Usage Certificate_Usage `protobuf:"varint,3,opt,name=usage,proto3,enum=v2ray.core.transport.internet.tls.Certificate_Usage" json:"usage,omitempty"`
  44. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  45. XXX_unrecognized []byte `json:"-"`
  46. XXX_sizecache int32 `json:"-"`
  47. }
  48. func (m *Certificate) Reset() { *m = Certificate{} }
  49. func (m *Certificate) String() string { return proto.CompactTextString(m) }
  50. func (*Certificate) ProtoMessage() {}
  51. func (*Certificate) Descriptor() ([]byte, []int) {
  52. return fileDescriptor_42ed70cad60a2736, []int{0}
  53. }
  54. func (m *Certificate) XXX_Unmarshal(b []byte) error {
  55. return xxx_messageInfo_Certificate.Unmarshal(m, b)
  56. }
  57. func (m *Certificate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  58. return xxx_messageInfo_Certificate.Marshal(b, m, deterministic)
  59. }
  60. func (m *Certificate) XXX_Merge(src proto.Message) {
  61. xxx_messageInfo_Certificate.Merge(m, src)
  62. }
  63. func (m *Certificate) XXX_Size() int {
  64. return xxx_messageInfo_Certificate.Size(m)
  65. }
  66. func (m *Certificate) XXX_DiscardUnknown() {
  67. xxx_messageInfo_Certificate.DiscardUnknown(m)
  68. }
  69. var xxx_messageInfo_Certificate proto.InternalMessageInfo
  70. func (m *Certificate) GetCertificate() []byte {
  71. if m != nil {
  72. return m.Certificate
  73. }
  74. return nil
  75. }
  76. func (m *Certificate) GetKey() []byte {
  77. if m != nil {
  78. return m.Key
  79. }
  80. return nil
  81. }
  82. func (m *Certificate) GetUsage() Certificate_Usage {
  83. if m != nil {
  84. return m.Usage
  85. }
  86. return Certificate_ENCIPHERMENT
  87. }
  88. type Config struct {
  89. // Whether or not to allow self-signed certificates.
  90. AllowInsecure bool `protobuf:"varint,1,opt,name=allow_insecure,json=allowInsecure,proto3" json:"allow_insecure,omitempty"`
  91. // Whether or not to allow insecure cipher suites.
  92. AllowInsecureCiphers bool `protobuf:"varint,5,opt,name=allow_insecure_ciphers,json=allowInsecureCiphers,proto3" json:"allow_insecure_ciphers,omitempty"`
  93. // List of certificates to be served on server.
  94. Certificate []*Certificate `protobuf:"bytes,2,rep,name=certificate,proto3" json:"certificate,omitempty"`
  95. // Override server name.
  96. ServerName string `protobuf:"bytes,3,opt,name=server_name,json=serverName,proto3" json:"server_name,omitempty"`
  97. // Lists of string as ALPN values.
  98. NextProtocol []string `protobuf:"bytes,4,rep,name=next_protocol,json=nextProtocol,proto3" json:"next_protocol,omitempty"`
  99. // Whether or not to disable session (ticket) resumption.
  100. DisableSessionResumption bool `protobuf:"varint,6,opt,name=disable_session_resumption,json=disableSessionResumption,proto3" json:"disable_session_resumption,omitempty"`
  101. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  102. XXX_unrecognized []byte `json:"-"`
  103. XXX_sizecache int32 `json:"-"`
  104. }
  105. func (m *Config) Reset() { *m = Config{} }
  106. func (m *Config) String() string { return proto.CompactTextString(m) }
  107. func (*Config) ProtoMessage() {}
  108. func (*Config) Descriptor() ([]byte, []int) {
  109. return fileDescriptor_42ed70cad60a2736, []int{1}
  110. }
  111. func (m *Config) XXX_Unmarshal(b []byte) error {
  112. return xxx_messageInfo_Config.Unmarshal(m, b)
  113. }
  114. func (m *Config) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  115. return xxx_messageInfo_Config.Marshal(b, m, deterministic)
  116. }
  117. func (m *Config) XXX_Merge(src proto.Message) {
  118. xxx_messageInfo_Config.Merge(m, src)
  119. }
  120. func (m *Config) XXX_Size() int {
  121. return xxx_messageInfo_Config.Size(m)
  122. }
  123. func (m *Config) XXX_DiscardUnknown() {
  124. xxx_messageInfo_Config.DiscardUnknown(m)
  125. }
  126. var xxx_messageInfo_Config proto.InternalMessageInfo
  127. func (m *Config) GetAllowInsecure() bool {
  128. if m != nil {
  129. return m.AllowInsecure
  130. }
  131. return false
  132. }
  133. func (m *Config) GetAllowInsecureCiphers() bool {
  134. if m != nil {
  135. return m.AllowInsecureCiphers
  136. }
  137. return false
  138. }
  139. func (m *Config) GetCertificate() []*Certificate {
  140. if m != nil {
  141. return m.Certificate
  142. }
  143. return nil
  144. }
  145. func (m *Config) GetServerName() string {
  146. if m != nil {
  147. return m.ServerName
  148. }
  149. return ""
  150. }
  151. func (m *Config) GetNextProtocol() []string {
  152. if m != nil {
  153. return m.NextProtocol
  154. }
  155. return nil
  156. }
  157. func (m *Config) GetDisableSessionResumption() bool {
  158. if m != nil {
  159. return m.DisableSessionResumption
  160. }
  161. return false
  162. }
  163. func init() {
  164. proto.RegisterType((*Certificate)(nil), "v2ray.core.transport.internet.tls.Certificate")
  165. proto.RegisterType((*Config)(nil), "v2ray.core.transport.internet.tls.Config")
  166. proto.RegisterEnum("v2ray.core.transport.internet.tls.Certificate_Usage", Certificate_Usage_name, Certificate_Usage_value)
  167. }
  168. func init() {
  169. proto.RegisterFile("v2ray.com/core/transport/internet/tls/config.proto", fileDescriptor_42ed70cad60a2736)
  170. }
  171. var fileDescriptor_42ed70cad60a2736 = []byte{
  172. // 413 bytes of a gzipped FileDescriptorProto
  173. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x91, 0xd1, 0x6e, 0xd3, 0x30,
  174. 0x14, 0x86, 0x49, 0x42, 0x2b, 0x76, 0xda, 0x8d, 0xc8, 0x4c, 0x28, 0xe2, 0x86, 0xac, 0x68, 0x52,
  175. 0xaf, 0x1c, 0x29, 0xec, 0x92, 0x1b, 0x08, 0x41, 0x0b, 0x88, 0x52, 0xb9, 0xe9, 0xa4, 0x71, 0x13,
  176. 0x79, 0xe6, 0x6c, 0x58, 0x4a, 0xec, 0xca, 0x76, 0x07, 0x7d, 0x25, 0x5e, 0x81, 0xc7, 0xe0, 0x85,
  177. 0x50, 0x93, 0xb6, 0xb4, 0x57, 0x13, 0x77, 0x3e, 0xff, 0xf9, 0xce, 0xb1, 0xff, 0xdf, 0x90, 0xde,
  178. 0xa7, 0x86, 0xaf, 0xa8, 0xd0, 0x4d, 0x22, 0xb4, 0xc1, 0xc4, 0x19, 0xae, 0xec, 0x42, 0x1b, 0x97,
  179. 0x48, 0xe5, 0xd0, 0x28, 0x74, 0x89, 0xab, 0x6d, 0x22, 0xb4, 0xba, 0x95, 0x77, 0x74, 0x61, 0xb4,
  180. 0xd3, 0xe4, 0x6c, 0x3b, 0x63, 0x90, 0xee, 0x78, 0xba, 0xe5, 0xa9, 0xab, 0xed, 0xe8, 0x8f, 0x07,
  181. 0x83, 0x0c, 0x8d, 0x93, 0xb7, 0x52, 0x70, 0x87, 0x24, 0x3e, 0x28, 0x23, 0x2f, 0xf6, 0xc6, 0x43,
  182. 0x76, 0x40, 0x84, 0x10, 0x7c, 0xc2, 0x55, 0xe4, 0xb7, 0x9d, 0xf5, 0x91, 0x7c, 0x84, 0xde, 0xd2,
  183. 0xf2, 0x3b, 0x8c, 0x82, 0xd8, 0x1b, 0x9f, 0xa4, 0x17, 0xf4, 0xc1, 0x6b, 0xe9, 0xde, 0x42, 0x3a,
  184. 0x5f, 0xcf, 0xb2, 0x6e, 0xc5, 0xe8, 0x3d, 0xf4, 0xda, 0x9a, 0x84, 0x30, 0xcc, 0x27, 0x59, 0x31,
  185. 0xbd, 0xcc, 0xd9, 0xe7, 0x7c, 0x52, 0x86, 0x8f, 0xc8, 0x29, 0x84, 0x6f, 0xe7, 0xe5, 0xe5, 0x17,
  186. 0x56, 0x94, 0xd7, 0xd5, 0x55, 0xce, 0x8a, 0x0f, 0xd7, 0xa1, 0x47, 0x9e, 0xc1, 0xd3, 0x7f, 0x6a,
  187. 0x31, 0x9b, 0xcd, 0xf3, 0xd0, 0x1f, 0xfd, 0xf6, 0xa1, 0x9f, 0xb5, 0x49, 0x90, 0x73, 0x38, 0xe1,
  188. 0x75, 0xad, 0x7f, 0x54, 0x52, 0x59, 0x14, 0x4b, 0xd3, 0x79, 0x7a, 0xc2, 0x8e, 0x5b, 0xb5, 0xd8,
  189. 0x88, 0xe4, 0x02, 0x9e, 0x1f, 0x62, 0x95, 0x90, 0x8b, 0xef, 0x68, 0x6c, 0xd4, 0x6b, 0xf1, 0xd3,
  190. 0x03, 0x3c, 0xeb, 0x7a, 0x64, 0x0a, 0x03, 0xb1, 0x97, 0x96, 0x1f, 0x07, 0xe3, 0x41, 0x4a, 0xff,
  191. 0xcf, 0x3f, 0xdb, 0x5f, 0x41, 0x5e, 0xc2, 0xc0, 0xa2, 0xb9, 0x47, 0x53, 0x29, 0xde, 0x74, 0x89,
  192. 0x1e, 0x31, 0xe8, 0xa4, 0x09, 0x6f, 0x90, 0xbc, 0x82, 0x63, 0x85, 0x3f, 0x5d, 0xd5, 0xfe, 0xb0,
  193. 0xd0, 0x75, 0xf4, 0x38, 0x0e, 0xc6, 0x47, 0x6c, 0xb8, 0x16, 0xa7, 0x1b, 0x8d, 0xbc, 0x81, 0x17,
  194. 0xdf, 0xa4, 0xe5, 0x37, 0x35, 0x56, 0x16, 0xad, 0x95, 0x5a, 0x55, 0x06, 0xed, 0xb2, 0x59, 0x38,
  195. 0xa9, 0x55, 0xd4, 0x6f, 0x1d, 0x45, 0x1b, 0x62, 0xd6, 0x01, 0x6c, 0xd7, 0x7f, 0xc7, 0xe0, 0x5c,
  196. 0xe8, 0xe6, 0x61, 0x17, 0x53, 0xef, 0x6b, 0xe0, 0x6a, 0xfb, 0xcb, 0x3f, 0xbb, 0x4a, 0x19, 0x5f,
  197. 0xd1, 0x6c, 0x8d, 0x96, 0x3b, 0xb4, 0xd8, 0xa2, 0x65, 0x6d, 0x6f, 0xfa, 0xed, 0x7b, 0x5f, 0xff,
  198. 0x0d, 0x00, 0x00, 0xff, 0xff, 0x80, 0x63, 0x12, 0xa7, 0xc7, 0x02, 0x00, 0x00,
  199. }