config.pb.go 14 KB

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