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