config.pb.go 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // versions:
  3. // protoc-gen-go v1.30.0
  4. // protoc v3.21.12
  5. // source: app/tun/config.proto
  6. package tun
  7. import (
  8. routercommon "github.com/v2fly/v2ray-core/v5/app/router/routercommon"
  9. _ "github.com/v2fly/v2ray-core/v5/common/protoext"
  10. internet "github.com/v2fly/v2ray-core/v5/transport/internet"
  11. protoreflect "google.golang.org/protobuf/reflect/protoreflect"
  12. protoimpl "google.golang.org/protobuf/runtime/protoimpl"
  13. reflect "reflect"
  14. sync "sync"
  15. )
  16. const (
  17. // Verify that this generated code is sufficiently up-to-date.
  18. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  19. // Verify that runtime/protoimpl is sufficiently up-to-date.
  20. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  21. )
  22. type Config struct {
  23. state protoimpl.MessageState
  24. sizeCache protoimpl.SizeCache
  25. unknownFields protoimpl.UnknownFields
  26. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
  27. Mtu uint32 `protobuf:"varint,2,opt,name=mtu,proto3" json:"mtu,omitempty"`
  28. UserLevel uint32 `protobuf:"varint,3,opt,name=user_level,json=userLevel,proto3" json:"user_level,omitempty"`
  29. Tag string `protobuf:"bytes,5,opt,name=tag,proto3" json:"tag,omitempty"`
  30. Ips []*routercommon.CIDR `protobuf:"bytes,6,rep,name=ips,proto3" json:"ips,omitempty"`
  31. Routes []*routercommon.CIDR `protobuf:"bytes,7,rep,name=routes,proto3" json:"routes,omitempty"`
  32. EnablePromiscuousMode bool `protobuf:"varint,8,opt,name=enable_promiscuous_mode,json=enablePromiscuousMode,proto3" json:"enable_promiscuous_mode,omitempty"`
  33. EnableSpoofing bool `protobuf:"varint,9,opt,name=enable_spoofing,json=enableSpoofing,proto3" json:"enable_spoofing,omitempty"`
  34. SocketSettings *internet.SocketConfig `protobuf:"bytes,10,opt,name=socket_settings,json=socketSettings,proto3" json:"socket_settings,omitempty"`
  35. }
  36. func (x *Config) Reset() {
  37. *x = Config{}
  38. if protoimpl.UnsafeEnabled {
  39. mi := &file_app_tun_config_proto_msgTypes[0]
  40. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  41. ms.StoreMessageInfo(mi)
  42. }
  43. }
  44. func (x *Config) String() string {
  45. return protoimpl.X.MessageStringOf(x)
  46. }
  47. func (*Config) ProtoMessage() {}
  48. func (x *Config) ProtoReflect() protoreflect.Message {
  49. mi := &file_app_tun_config_proto_msgTypes[0]
  50. if protoimpl.UnsafeEnabled && x != nil {
  51. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  52. if ms.LoadMessageInfo() == nil {
  53. ms.StoreMessageInfo(mi)
  54. }
  55. return ms
  56. }
  57. return mi.MessageOf(x)
  58. }
  59. // Deprecated: Use Config.ProtoReflect.Descriptor instead.
  60. func (*Config) Descriptor() ([]byte, []int) {
  61. return file_app_tun_config_proto_rawDescGZIP(), []int{0}
  62. }
  63. func (x *Config) GetName() string {
  64. if x != nil {
  65. return x.Name
  66. }
  67. return ""
  68. }
  69. func (x *Config) GetMtu() uint32 {
  70. if x != nil {
  71. return x.Mtu
  72. }
  73. return 0
  74. }
  75. func (x *Config) GetUserLevel() uint32 {
  76. if x != nil {
  77. return x.UserLevel
  78. }
  79. return 0
  80. }
  81. func (x *Config) GetTag() string {
  82. if x != nil {
  83. return x.Tag
  84. }
  85. return ""
  86. }
  87. func (x *Config) GetIps() []*routercommon.CIDR {
  88. if x != nil {
  89. return x.Ips
  90. }
  91. return nil
  92. }
  93. func (x *Config) GetRoutes() []*routercommon.CIDR {
  94. if x != nil {
  95. return x.Routes
  96. }
  97. return nil
  98. }
  99. func (x *Config) GetEnablePromiscuousMode() bool {
  100. if x != nil {
  101. return x.EnablePromiscuousMode
  102. }
  103. return false
  104. }
  105. func (x *Config) GetEnableSpoofing() bool {
  106. if x != nil {
  107. return x.EnableSpoofing
  108. }
  109. return false
  110. }
  111. func (x *Config) GetSocketSettings() *internet.SocketConfig {
  112. if x != nil {
  113. return x.SocketSettings
  114. }
  115. return nil
  116. }
  117. var File_app_tun_config_proto protoreflect.FileDescriptor
  118. var file_app_tun_config_proto_rawDesc = []byte{
  119. 0x0a, 0x14, 0x61, 0x70, 0x70, 0x2f, 0x74, 0x75, 0x6e, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67,
  120. 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f,
  121. 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x74, 0x75, 0x6e, 0x1a, 0x24, 0x61, 0x70, 0x70, 0x2f,
  122. 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d,
  123. 0x6d, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
  124. 0x1a, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x65, 0x78,
  125. 0x74, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f,
  126. 0x74, 0x6f, 0x1a, 0x1f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e,
  127. 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72,
  128. 0x6f, 0x74, 0x6f, 0x22, 0xae, 0x03, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x12,
  129. 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,
  130. 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x74, 0x75, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52,
  131. 0x03, 0x6d, 0x74, 0x75, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6c, 0x65, 0x76,
  132. 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, 0x4c, 0x65,
  133. 0x76, 0x65, 0x6c, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09,
  134. 0x52, 0x03, 0x74, 0x61, 0x67, 0x12, 0x3a, 0x0a, 0x03, 0x69, 0x70, 0x73, 0x18, 0x06, 0x20, 0x03,
  135. 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e,
  136. 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65,
  137. 0x72, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x43, 0x49, 0x44, 0x52, 0x52, 0x03, 0x69, 0x70,
  138. 0x73, 0x12, 0x40, 0x0a, 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28,
  139. 0x0b, 0x32, 0x28, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61,
  140. 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72,
  141. 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x43, 0x49, 0x44, 0x52, 0x52, 0x06, 0x72, 0x6f, 0x75,
  142. 0x74, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x17, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x70, 0x72,
  143. 0x6f, 0x6d, 0x69, 0x73, 0x63, 0x75, 0x6f, 0x75, 0x73, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x08,
  144. 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x6d,
  145. 0x69, 0x73, 0x63, 0x75, 0x6f, 0x75, 0x73, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x65,
  146. 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x70, 0x6f, 0x6f, 0x66, 0x69, 0x6e, 0x67, 0x18, 0x09,
  147. 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x70, 0x6f, 0x6f,
  148. 0x66, 0x69, 0x6e, 0x67, 0x12, 0x54, 0x0a, 0x0f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x73,
  149. 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e,
  150. 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73,
  151. 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x53, 0x6f,
  152. 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0e, 0x73, 0x6f, 0x63, 0x6b,
  153. 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x3a, 0x12, 0x82, 0xb5, 0x18, 0x0e,
  154. 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x03, 0x74, 0x75, 0x6e, 0x4a, 0x04,
  155. 0x08, 0x04, 0x10, 0x05, 0x42, 0x57, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61,
  156. 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x74, 0x75, 0x6e, 0x50, 0x01,
  157. 0x5a, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x32, 0x66,
  158. 0x6c, 0x79, 0x2f, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x35,
  159. 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x74, 0x75, 0x6e, 0xaa, 0x02, 0x12, 0x56, 0x32, 0x52, 0x61, 0x79,
  160. 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x70, 0x70, 0x2e, 0x54, 0x75, 0x6e, 0x62, 0x06, 0x70,
  161. 0x72, 0x6f, 0x74, 0x6f, 0x33,
  162. }
  163. var (
  164. file_app_tun_config_proto_rawDescOnce sync.Once
  165. file_app_tun_config_proto_rawDescData = file_app_tun_config_proto_rawDesc
  166. )
  167. func file_app_tun_config_proto_rawDescGZIP() []byte {
  168. file_app_tun_config_proto_rawDescOnce.Do(func() {
  169. file_app_tun_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_app_tun_config_proto_rawDescData)
  170. })
  171. return file_app_tun_config_proto_rawDescData
  172. }
  173. var file_app_tun_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
  174. var file_app_tun_config_proto_goTypes = []interface{}{
  175. (*Config)(nil), // 0: v2ray.core.app.tun.Config
  176. (*routercommon.CIDR)(nil), // 1: v2ray.core.app.router.routercommon.CIDR
  177. (*internet.SocketConfig)(nil), // 2: v2ray.core.transport.internet.SocketConfig
  178. }
  179. var file_app_tun_config_proto_depIdxs = []int32{
  180. 1, // 0: v2ray.core.app.tun.Config.ips:type_name -> v2ray.core.app.router.routercommon.CIDR
  181. 1, // 1: v2ray.core.app.tun.Config.routes:type_name -> v2ray.core.app.router.routercommon.CIDR
  182. 2, // 2: v2ray.core.app.tun.Config.socket_settings:type_name -> v2ray.core.transport.internet.SocketConfig
  183. 3, // [3:3] is the sub-list for method output_type
  184. 3, // [3:3] is the sub-list for method input_type
  185. 3, // [3:3] is the sub-list for extension type_name
  186. 3, // [3:3] is the sub-list for extension extendee
  187. 0, // [0:3] is the sub-list for field type_name
  188. }
  189. func init() { file_app_tun_config_proto_init() }
  190. func file_app_tun_config_proto_init() {
  191. if File_app_tun_config_proto != nil {
  192. return
  193. }
  194. if !protoimpl.UnsafeEnabled {
  195. file_app_tun_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
  196. switch v := v.(*Config); i {
  197. case 0:
  198. return &v.state
  199. case 1:
  200. return &v.sizeCache
  201. case 2:
  202. return &v.unknownFields
  203. default:
  204. return nil
  205. }
  206. }
  207. }
  208. type x struct{}
  209. out := protoimpl.TypeBuilder{
  210. File: protoimpl.DescBuilder{
  211. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  212. RawDescriptor: file_app_tun_config_proto_rawDesc,
  213. NumEnums: 0,
  214. NumMessages: 1,
  215. NumExtensions: 0,
  216. NumServices: 0,
  217. },
  218. GoTypes: file_app_tun_config_proto_goTypes,
  219. DependencyIndexes: file_app_tun_config_proto_depIdxs,
  220. MessageInfos: file_app_tun_config_proto_msgTypes,
  221. }.Build()
  222. File_app_tun_config_proto = out.File
  223. file_app_tun_config_proto_rawDesc = nil
  224. file_app_tun_config_proto_goTypes = nil
  225. file_app_tun_config_proto_depIdxs = nil
  226. }