config.pb.go 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  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.ProtoPackageIsVersion3 // 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. // If true, root certificates on the system will not be loaded for verification.
  102. DisableSystemRoot bool `protobuf:"varint,7,opt,name=disable_system_root,json=disableSystemRoot,proto3" json:"disable_system_root,omitempty"`
  103. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  104. XXX_unrecognized []byte `json:"-"`
  105. XXX_sizecache int32 `json:"-"`
  106. }
  107. func (m *Config) Reset() { *m = Config{} }
  108. func (m *Config) String() string { return proto.CompactTextString(m) }
  109. func (*Config) ProtoMessage() {}
  110. func (*Config) Descriptor() ([]byte, []int) {
  111. return fileDescriptor_42ed70cad60a2736, []int{1}
  112. }
  113. func (m *Config) XXX_Unmarshal(b []byte) error {
  114. return xxx_messageInfo_Config.Unmarshal(m, b)
  115. }
  116. func (m *Config) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  117. return xxx_messageInfo_Config.Marshal(b, m, deterministic)
  118. }
  119. func (m *Config) XXX_Merge(src proto.Message) {
  120. xxx_messageInfo_Config.Merge(m, src)
  121. }
  122. func (m *Config) XXX_Size() int {
  123. return xxx_messageInfo_Config.Size(m)
  124. }
  125. func (m *Config) XXX_DiscardUnknown() {
  126. xxx_messageInfo_Config.DiscardUnknown(m)
  127. }
  128. var xxx_messageInfo_Config proto.InternalMessageInfo
  129. func (m *Config) GetAllowInsecure() bool {
  130. if m != nil {
  131. return m.AllowInsecure
  132. }
  133. return false
  134. }
  135. func (m *Config) GetAllowInsecureCiphers() bool {
  136. if m != nil {
  137. return m.AllowInsecureCiphers
  138. }
  139. return false
  140. }
  141. func (m *Config) GetCertificate() []*Certificate {
  142. if m != nil {
  143. return m.Certificate
  144. }
  145. return nil
  146. }
  147. func (m *Config) GetServerName() string {
  148. if m != nil {
  149. return m.ServerName
  150. }
  151. return ""
  152. }
  153. func (m *Config) GetNextProtocol() []string {
  154. if m != nil {
  155. return m.NextProtocol
  156. }
  157. return nil
  158. }
  159. func (m *Config) GetDisableSessionResumption() bool {
  160. if m != nil {
  161. return m.DisableSessionResumption
  162. }
  163. return false
  164. }
  165. func (m *Config) GetDisableSystemRoot() bool {
  166. if m != nil {
  167. return m.DisableSystemRoot
  168. }
  169. return false
  170. }
  171. func init() {
  172. proto.RegisterEnum("v2ray.core.transport.internet.tls.Certificate_Usage", Certificate_Usage_name, Certificate_Usage_value)
  173. proto.RegisterType((*Certificate)(nil), "v2ray.core.transport.internet.tls.Certificate")
  174. proto.RegisterType((*Config)(nil), "v2ray.core.transport.internet.tls.Config")
  175. }
  176. func init() {
  177. proto.RegisterFile("v2ray.com/core/transport/internet/tls/config.proto", fileDescriptor_42ed70cad60a2736)
  178. }
  179. var fileDescriptor_42ed70cad60a2736 = []byte{
  180. // 435 bytes of a gzipped FileDescriptorProto
  181. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x91, 0xd1, 0x6e, 0xd3, 0x30,
  182. 0x14, 0x86, 0x49, 0x43, 0x0b, 0x3b, 0xed, 0x46, 0xf0, 0x26, 0x14, 0x71, 0x43, 0x56, 0x34, 0xa9,
  183. 0x57, 0x8e, 0x14, 0x76, 0xc9, 0x0d, 0x84, 0xa0, 0x05, 0x44, 0xa9, 0xdc, 0x74, 0xd2, 0xb8, 0x89,
  184. 0x32, 0x73, 0x36, 0x2c, 0x25, 0x76, 0x65, 0xbb, 0x83, 0xbe, 0x12, 0xaf, 0xc3, 0x63, 0xf0, 0x12,
  185. 0xa8, 0x4e, 0x5b, 0xda, 0xab, 0x69, 0x77, 0x39, 0xff, 0xff, 0xfd, 0x27, 0xfa, 0x8f, 0x21, 0xb9,
  186. 0x4b, 0x74, 0xb5, 0xa4, 0x5c, 0x35, 0x31, 0x57, 0x1a, 0x63, 0xab, 0x2b, 0x69, 0xe6, 0x4a, 0xdb,
  187. 0x58, 0x48, 0x8b, 0x5a, 0xa2, 0x8d, 0x6d, 0x6d, 0x62, 0xae, 0xe4, 0x8d, 0xb8, 0xa5, 0x73, 0xad,
  188. 0xac, 0x22, 0xa7, 0x9b, 0x8c, 0x46, 0xba, 0xe5, 0xe9, 0x86, 0xa7, 0xb6, 0x36, 0xc3, 0x3f, 0x1e,
  189. 0xf4, 0x53, 0xd4, 0x56, 0xdc, 0x08, 0x5e, 0x59, 0x24, 0xd1, 0xde, 0x18, 0x7a, 0x91, 0x37, 0x1a,
  190. 0xb0, 0x3d, 0x22, 0x00, 0xff, 0x33, 0x2e, 0xc3, 0x8e, 0x73, 0x56, 0x9f, 0xe4, 0x13, 0x74, 0x17,
  191. 0xa6, 0xba, 0xc5, 0xd0, 0x8f, 0xbc, 0xd1, 0x51, 0x72, 0x4e, 0xef, 0xfd, 0x2d, 0xdd, 0x59, 0x48,
  192. 0x67, 0xab, 0x2c, 0x6b, 0x57, 0x0c, 0x3f, 0x40, 0xd7, 0xcd, 0x24, 0x80, 0x41, 0x36, 0x4e, 0xf3,
  193. 0xc9, 0x45, 0xc6, 0xbe, 0x64, 0xe3, 0x22, 0x78, 0x44, 0x4e, 0x20, 0x78, 0x37, 0x2b, 0x2e, 0xbe,
  194. 0xb2, 0xbc, 0xb8, 0x2a, 0x2f, 0x33, 0x96, 0x7f, 0xbc, 0x0a, 0x3c, 0x72, 0x0c, 0xcf, 0xfe, 0xab,
  195. 0xf9, 0x74, 0x3a, 0xcb, 0x82, 0xce, 0xf0, 0x6f, 0x07, 0x7a, 0xa9, 0xbb, 0x04, 0x39, 0x83, 0xa3,
  196. 0xaa, 0xae, 0xd5, 0xcf, 0x52, 0x48, 0x83, 0x7c, 0xa1, 0xdb, 0x4e, 0x4f, 0xd9, 0xa1, 0x53, 0xf3,
  197. 0xb5, 0x48, 0xce, 0xe1, 0xc5, 0x3e, 0x56, 0x72, 0x31, 0xff, 0x81, 0xda, 0x84, 0x5d, 0x87, 0x9f,
  198. 0xec, 0xe1, 0x69, 0xeb, 0x91, 0x09, 0xf4, 0xf9, 0xce, 0xb5, 0x3a, 0x91, 0x3f, 0xea, 0x27, 0xf4,
  199. 0x61, 0xfd, 0xd9, 0xee, 0x0a, 0xf2, 0x0a, 0xfa, 0x06, 0xf5, 0x1d, 0xea, 0x52, 0x56, 0x4d, 0x7b,
  200. 0xd1, 0x03, 0x06, 0xad, 0x34, 0xae, 0x1a, 0x24, 0xaf, 0xe1, 0x50, 0xe2, 0x2f, 0x5b, 0xba, 0x17,
  201. 0xe6, 0xaa, 0x0e, 0x1f, 0x47, 0xfe, 0xe8, 0x80, 0x0d, 0x56, 0xe2, 0x64, 0xad, 0x91, 0xb7, 0xf0,
  202. 0xf2, 0xbb, 0x30, 0xd5, 0x75, 0x8d, 0xa5, 0x41, 0x63, 0x84, 0x92, 0xa5, 0x46, 0xb3, 0x68, 0xe6,
  203. 0x56, 0x28, 0x19, 0xf6, 0x5c, 0xa3, 0x70, 0x4d, 0x4c, 0x5b, 0x80, 0x6d, 0x7d, 0x42, 0xe1, 0x78,
  204. 0x9b, 0x5e, 0x1a, 0x8b, 0x4d, 0xa9, 0x95, 0xb2, 0xe1, 0x13, 0x17, 0x7b, 0xbe, 0x89, 0x39, 0x87,
  205. 0x29, 0x65, 0xdf, 0x33, 0x38, 0xe3, 0xaa, 0xb9, 0xbf, 0xf5, 0xc4, 0xfb, 0xe6, 0xdb, 0xda, 0xfc,
  206. 0xee, 0x9c, 0x5e, 0x26, 0xac, 0x5a, 0xd2, 0x74, 0x85, 0x16, 0x5b, 0x34, 0xdf, 0xa0, 0x45, 0x6d,
  207. 0xae, 0x7b, 0xae, 0xdf, 0x9b, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xb6, 0x58, 0x74, 0x54, 0xf7,
  208. 0x02, 0x00, 0x00,
  209. }