config.pb.go 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320
  1. package freedom
  2. import (
  3. proto "github.com/golang/protobuf/proto"
  4. protoreflect "google.golang.org/protobuf/reflect/protoreflect"
  5. protoimpl "google.golang.org/protobuf/runtime/protoimpl"
  6. reflect "reflect"
  7. sync "sync"
  8. protocol "v2ray.com/core/common/protocol"
  9. )
  10. const (
  11. // Verify that this generated code is sufficiently up-to-date.
  12. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  13. // Verify that runtime/protoimpl is sufficiently up-to-date.
  14. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  15. )
  16. // This is a compile-time assertion that a sufficiently up-to-date version
  17. // of the legacy proto package is being used.
  18. const _ = proto.ProtoPackageIsVersion4
  19. type Config_DomainStrategy int32
  20. const (
  21. Config_AS_IS Config_DomainStrategy = 0
  22. Config_USE_IP Config_DomainStrategy = 1
  23. Config_USE_IP4 Config_DomainStrategy = 2
  24. Config_USE_IP6 Config_DomainStrategy = 3
  25. )
  26. // Enum value maps for Config_DomainStrategy.
  27. var (
  28. Config_DomainStrategy_name = map[int32]string{
  29. 0: "AS_IS",
  30. 1: "USE_IP",
  31. 2: "USE_IP4",
  32. 3: "USE_IP6",
  33. }
  34. Config_DomainStrategy_value = map[string]int32{
  35. "AS_IS": 0,
  36. "USE_IP": 1,
  37. "USE_IP4": 2,
  38. "USE_IP6": 3,
  39. }
  40. )
  41. func (x Config_DomainStrategy) Enum() *Config_DomainStrategy {
  42. p := new(Config_DomainStrategy)
  43. *p = x
  44. return p
  45. }
  46. func (x Config_DomainStrategy) String() string {
  47. return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
  48. }
  49. func (Config_DomainStrategy) Descriptor() protoreflect.EnumDescriptor {
  50. return file_v2ray_com_core_proxy_freedom_config_proto_enumTypes[0].Descriptor()
  51. }
  52. func (Config_DomainStrategy) Type() protoreflect.EnumType {
  53. return &file_v2ray_com_core_proxy_freedom_config_proto_enumTypes[0]
  54. }
  55. func (x Config_DomainStrategy) Number() protoreflect.EnumNumber {
  56. return protoreflect.EnumNumber(x)
  57. }
  58. // Deprecated: Use Config_DomainStrategy.Descriptor instead.
  59. func (Config_DomainStrategy) EnumDescriptor() ([]byte, []int) {
  60. return file_v2ray_com_core_proxy_freedom_config_proto_rawDescGZIP(), []int{1, 0}
  61. }
  62. type DestinationOverride struct {
  63. state protoimpl.MessageState
  64. sizeCache protoimpl.SizeCache
  65. unknownFields protoimpl.UnknownFields
  66. Server *protocol.ServerEndpoint `protobuf:"bytes,1,opt,name=server,proto3" json:"server,omitempty"`
  67. }
  68. func (x *DestinationOverride) Reset() {
  69. *x = DestinationOverride{}
  70. if protoimpl.UnsafeEnabled {
  71. mi := &file_v2ray_com_core_proxy_freedom_config_proto_msgTypes[0]
  72. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  73. ms.StoreMessageInfo(mi)
  74. }
  75. }
  76. func (x *DestinationOverride) String() string {
  77. return protoimpl.X.MessageStringOf(x)
  78. }
  79. func (*DestinationOverride) ProtoMessage() {}
  80. func (x *DestinationOverride) ProtoReflect() protoreflect.Message {
  81. mi := &file_v2ray_com_core_proxy_freedom_config_proto_msgTypes[0]
  82. if protoimpl.UnsafeEnabled && x != nil {
  83. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  84. if ms.LoadMessageInfo() == nil {
  85. ms.StoreMessageInfo(mi)
  86. }
  87. return ms
  88. }
  89. return mi.MessageOf(x)
  90. }
  91. // Deprecated: Use DestinationOverride.ProtoReflect.Descriptor instead.
  92. func (*DestinationOverride) Descriptor() ([]byte, []int) {
  93. return file_v2ray_com_core_proxy_freedom_config_proto_rawDescGZIP(), []int{0}
  94. }
  95. func (x *DestinationOverride) GetServer() *protocol.ServerEndpoint {
  96. if x != nil {
  97. return x.Server
  98. }
  99. return nil
  100. }
  101. type Config struct {
  102. state protoimpl.MessageState
  103. sizeCache protoimpl.SizeCache
  104. unknownFields protoimpl.UnknownFields
  105. DomainStrategy Config_DomainStrategy `protobuf:"varint,1,opt,name=domain_strategy,json=domainStrategy,proto3,enum=v2ray.core.proxy.freedom.Config_DomainStrategy" json:"domain_strategy,omitempty"`
  106. // Deprecated: Do not use.
  107. Timeout uint32 `protobuf:"varint,2,opt,name=timeout,proto3" json:"timeout,omitempty"`
  108. DestinationOverride *DestinationOverride `protobuf:"bytes,3,opt,name=destination_override,json=destinationOverride,proto3" json:"destination_override,omitempty"`
  109. UserLevel uint32 `protobuf:"varint,4,opt,name=user_level,json=userLevel,proto3" json:"user_level,omitempty"`
  110. }
  111. func (x *Config) Reset() {
  112. *x = Config{}
  113. if protoimpl.UnsafeEnabled {
  114. mi := &file_v2ray_com_core_proxy_freedom_config_proto_msgTypes[1]
  115. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  116. ms.StoreMessageInfo(mi)
  117. }
  118. }
  119. func (x *Config) String() string {
  120. return protoimpl.X.MessageStringOf(x)
  121. }
  122. func (*Config) ProtoMessage() {}
  123. func (x *Config) ProtoReflect() protoreflect.Message {
  124. mi := &file_v2ray_com_core_proxy_freedom_config_proto_msgTypes[1]
  125. if protoimpl.UnsafeEnabled && x != nil {
  126. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  127. if ms.LoadMessageInfo() == nil {
  128. ms.StoreMessageInfo(mi)
  129. }
  130. return ms
  131. }
  132. return mi.MessageOf(x)
  133. }
  134. // Deprecated: Use Config.ProtoReflect.Descriptor instead.
  135. func (*Config) Descriptor() ([]byte, []int) {
  136. return file_v2ray_com_core_proxy_freedom_config_proto_rawDescGZIP(), []int{1}
  137. }
  138. func (x *Config) GetDomainStrategy() Config_DomainStrategy {
  139. if x != nil {
  140. return x.DomainStrategy
  141. }
  142. return Config_AS_IS
  143. }
  144. // Deprecated: Do not use.
  145. func (x *Config) GetTimeout() uint32 {
  146. if x != nil {
  147. return x.Timeout
  148. }
  149. return 0
  150. }
  151. func (x *Config) GetDestinationOverride() *DestinationOverride {
  152. if x != nil {
  153. return x.DestinationOverride
  154. }
  155. return nil
  156. }
  157. func (x *Config) GetUserLevel() uint32 {
  158. if x != nil {
  159. return x.UserLevel
  160. }
  161. return 0
  162. }
  163. var File_v2ray_com_core_proxy_freedom_config_proto protoreflect.FileDescriptor
  164. var file_v2ray_com_core_proxy_freedom_config_proto_rawDesc = []byte{
  165. 0x0a, 0x29, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65,
  166. 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x66, 0x72, 0x65, 0x65, 0x64, 0x6f, 0x6d, 0x2f, 0x63,
  167. 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x18, 0x76, 0x32, 0x72,
  168. 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x66, 0x72,
  169. 0x65, 0x65, 0x64, 0x6f, 0x6d, 0x1a, 0x30, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d,
  170. 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f,
  171. 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x73, 0x70, 0x65,
  172. 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x59, 0x0a, 0x13, 0x44, 0x65, 0x73, 0x74, 0x69,
  173. 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x42,
  174. 0x0a, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a,
  175. 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d,
  176. 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x65, 0x72, 0x76,
  177. 0x65, 0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x73, 0x65, 0x72, 0x76,
  178. 0x65, 0x72, 0x22, 0xc4, 0x02, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x58, 0x0a,
  179. 0x0f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79,
  180. 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63,
  181. 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x66, 0x72, 0x65, 0x65, 0x64, 0x6f,
  182. 0x6d, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x53,
  183. 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x52, 0x0e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x53,
  184. 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x1c, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f,
  185. 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x02, 0x18, 0x01, 0x52, 0x07, 0x74, 0x69,
  186. 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x60, 0x0a, 0x14, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61,
  187. 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x18, 0x03, 0x20,
  188. 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65,
  189. 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x66, 0x72, 0x65, 0x65, 0x64, 0x6f, 0x6d, 0x2e, 0x44,
  190. 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69,
  191. 0x64, 0x65, 0x52, 0x13, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f,
  192. 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x5f,
  193. 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x75, 0x73, 0x65,
  194. 0x72, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x22, 0x41, 0x0a, 0x0e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e,
  195. 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x53, 0x5f, 0x49,
  196. 0x53, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x53, 0x45, 0x5f, 0x49, 0x50, 0x10, 0x01, 0x12,
  197. 0x0b, 0x0a, 0x07, 0x55, 0x53, 0x45, 0x5f, 0x49, 0x50, 0x34, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07,
  198. 0x55, 0x53, 0x45, 0x5f, 0x49, 0x50, 0x36, 0x10, 0x03, 0x42, 0x44, 0x0a, 0x1c, 0x63, 0x6f, 0x6d,
  199. 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78,
  200. 0x79, 0x2e, 0x66, 0x72, 0x65, 0x65, 0x64, 0x6f, 0x6d, 0x50, 0x01, 0x5a, 0x07, 0x66, 0x72, 0x65,
  201. 0x65, 0x64, 0x6f, 0x6d, 0xaa, 0x02, 0x18, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72,
  202. 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x46, 0x72, 0x65, 0x65, 0x64, 0x6f, 0x6d, 0x62,
  203. 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
  204. }
  205. var (
  206. file_v2ray_com_core_proxy_freedom_config_proto_rawDescOnce sync.Once
  207. file_v2ray_com_core_proxy_freedom_config_proto_rawDescData = file_v2ray_com_core_proxy_freedom_config_proto_rawDesc
  208. )
  209. func file_v2ray_com_core_proxy_freedom_config_proto_rawDescGZIP() []byte {
  210. file_v2ray_com_core_proxy_freedom_config_proto_rawDescOnce.Do(func() {
  211. file_v2ray_com_core_proxy_freedom_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_v2ray_com_core_proxy_freedom_config_proto_rawDescData)
  212. })
  213. return file_v2ray_com_core_proxy_freedom_config_proto_rawDescData
  214. }
  215. var file_v2ray_com_core_proxy_freedom_config_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
  216. var file_v2ray_com_core_proxy_freedom_config_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
  217. var file_v2ray_com_core_proxy_freedom_config_proto_goTypes = []interface{}{
  218. (Config_DomainStrategy)(0), // 0: v2ray.core.proxy.freedom.Config.DomainStrategy
  219. (*DestinationOverride)(nil), // 1: v2ray.core.proxy.freedom.DestinationOverride
  220. (*Config)(nil), // 2: v2ray.core.proxy.freedom.Config
  221. (*protocol.ServerEndpoint)(nil), // 3: v2ray.core.common.protocol.ServerEndpoint
  222. }
  223. var file_v2ray_com_core_proxy_freedom_config_proto_depIdxs = []int32{
  224. 3, // 0: v2ray.core.proxy.freedom.DestinationOverride.server:type_name -> v2ray.core.common.protocol.ServerEndpoint
  225. 0, // 1: v2ray.core.proxy.freedom.Config.domain_strategy:type_name -> v2ray.core.proxy.freedom.Config.DomainStrategy
  226. 1, // 2: v2ray.core.proxy.freedom.Config.destination_override:type_name -> v2ray.core.proxy.freedom.DestinationOverride
  227. 3, // [3:3] is the sub-list for method output_type
  228. 3, // [3:3] is the sub-list for method input_type
  229. 3, // [3:3] is the sub-list for extension type_name
  230. 3, // [3:3] is the sub-list for extension extendee
  231. 0, // [0:3] is the sub-list for field type_name
  232. }
  233. func init() { file_v2ray_com_core_proxy_freedom_config_proto_init() }
  234. func file_v2ray_com_core_proxy_freedom_config_proto_init() {
  235. if File_v2ray_com_core_proxy_freedom_config_proto != nil {
  236. return
  237. }
  238. if !protoimpl.UnsafeEnabled {
  239. file_v2ray_com_core_proxy_freedom_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
  240. switch v := v.(*DestinationOverride); i {
  241. case 0:
  242. return &v.state
  243. case 1:
  244. return &v.sizeCache
  245. case 2:
  246. return &v.unknownFields
  247. default:
  248. return nil
  249. }
  250. }
  251. file_v2ray_com_core_proxy_freedom_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
  252. switch v := v.(*Config); i {
  253. case 0:
  254. return &v.state
  255. case 1:
  256. return &v.sizeCache
  257. case 2:
  258. return &v.unknownFields
  259. default:
  260. return nil
  261. }
  262. }
  263. }
  264. type x struct{}
  265. out := protoimpl.TypeBuilder{
  266. File: protoimpl.DescBuilder{
  267. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  268. RawDescriptor: file_v2ray_com_core_proxy_freedom_config_proto_rawDesc,
  269. NumEnums: 1,
  270. NumMessages: 2,
  271. NumExtensions: 0,
  272. NumServices: 0,
  273. },
  274. GoTypes: file_v2ray_com_core_proxy_freedom_config_proto_goTypes,
  275. DependencyIndexes: file_v2ray_com_core_proxy_freedom_config_proto_depIdxs,
  276. EnumInfos: file_v2ray_com_core_proxy_freedom_config_proto_enumTypes,
  277. MessageInfos: file_v2ray_com_core_proxy_freedom_config_proto_msgTypes,
  278. }.Build()
  279. File_v2ray_com_core_proxy_freedom_config_proto = out.File
  280. file_v2ray_com_core_proxy_freedom_config_proto_rawDesc = nil
  281. file_v2ray_com_core_proxy_freedom_config_proto_goTypes = nil
  282. file_v2ray_com_core_proxy_freedom_config_proto_depIdxs = nil
  283. }