github.com/v2fly/v2ray-core/v5@v5.16.2-0.20240507031116-8191faa6e095/proxy/http/config.pb.go (about) 1 package http 2 3 import ( 4 protocol "github.com/v2fly/v2ray-core/v5/common/protocol" 5 protoreflect "google.golang.org/protobuf/reflect/protoreflect" 6 protoimpl "google.golang.org/protobuf/runtime/protoimpl" 7 reflect "reflect" 8 sync "sync" 9 ) 10 11 const ( 12 // Verify that this generated code is sufficiently up-to-date. 13 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 14 // Verify that runtime/protoimpl is sufficiently up-to-date. 15 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 16 ) 17 18 type Account struct { 19 state protoimpl.MessageState 20 sizeCache protoimpl.SizeCache 21 unknownFields protoimpl.UnknownFields 22 23 Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` 24 Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` 25 } 26 27 func (x *Account) Reset() { 28 *x = Account{} 29 if protoimpl.UnsafeEnabled { 30 mi := &file_proxy_http_config_proto_msgTypes[0] 31 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 32 ms.StoreMessageInfo(mi) 33 } 34 } 35 36 func (x *Account) String() string { 37 return protoimpl.X.MessageStringOf(x) 38 } 39 40 func (*Account) ProtoMessage() {} 41 42 func (x *Account) ProtoReflect() protoreflect.Message { 43 mi := &file_proxy_http_config_proto_msgTypes[0] 44 if protoimpl.UnsafeEnabled && x != nil { 45 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 46 if ms.LoadMessageInfo() == nil { 47 ms.StoreMessageInfo(mi) 48 } 49 return ms 50 } 51 return mi.MessageOf(x) 52 } 53 54 // Deprecated: Use Account.ProtoReflect.Descriptor instead. 55 func (*Account) Descriptor() ([]byte, []int) { 56 return file_proxy_http_config_proto_rawDescGZIP(), []int{0} 57 } 58 59 func (x *Account) GetUsername() string { 60 if x != nil { 61 return x.Username 62 } 63 return "" 64 } 65 66 func (x *Account) GetPassword() string { 67 if x != nil { 68 return x.Password 69 } 70 return "" 71 } 72 73 // Config for HTTP proxy server. 74 type ServerConfig struct { 75 state protoimpl.MessageState 76 sizeCache protoimpl.SizeCache 77 unknownFields protoimpl.UnknownFields 78 79 // Deprecated: Marked as deprecated in proxy/http/config.proto. 80 Timeout uint32 `protobuf:"varint,1,opt,name=timeout,proto3" json:"timeout,omitempty"` 81 Accounts map[string]string `protobuf:"bytes,2,rep,name=accounts,proto3" json:"accounts,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` 82 AllowTransparent bool `protobuf:"varint,3,opt,name=allow_transparent,json=allowTransparent,proto3" json:"allow_transparent,omitempty"` 83 UserLevel uint32 `protobuf:"varint,4,opt,name=user_level,json=userLevel,proto3" json:"user_level,omitempty"` 84 } 85 86 func (x *ServerConfig) Reset() { 87 *x = ServerConfig{} 88 if protoimpl.UnsafeEnabled { 89 mi := &file_proxy_http_config_proto_msgTypes[1] 90 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 91 ms.StoreMessageInfo(mi) 92 } 93 } 94 95 func (x *ServerConfig) String() string { 96 return protoimpl.X.MessageStringOf(x) 97 } 98 99 func (*ServerConfig) ProtoMessage() {} 100 101 func (x *ServerConfig) ProtoReflect() protoreflect.Message { 102 mi := &file_proxy_http_config_proto_msgTypes[1] 103 if protoimpl.UnsafeEnabled && x != nil { 104 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 105 if ms.LoadMessageInfo() == nil { 106 ms.StoreMessageInfo(mi) 107 } 108 return ms 109 } 110 return mi.MessageOf(x) 111 } 112 113 // Deprecated: Use ServerConfig.ProtoReflect.Descriptor instead. 114 func (*ServerConfig) Descriptor() ([]byte, []int) { 115 return file_proxy_http_config_proto_rawDescGZIP(), []int{1} 116 } 117 118 // Deprecated: Marked as deprecated in proxy/http/config.proto. 119 func (x *ServerConfig) GetTimeout() uint32 { 120 if x != nil { 121 return x.Timeout 122 } 123 return 0 124 } 125 126 func (x *ServerConfig) GetAccounts() map[string]string { 127 if x != nil { 128 return x.Accounts 129 } 130 return nil 131 } 132 133 func (x *ServerConfig) GetAllowTransparent() bool { 134 if x != nil { 135 return x.AllowTransparent 136 } 137 return false 138 } 139 140 func (x *ServerConfig) GetUserLevel() uint32 { 141 if x != nil { 142 return x.UserLevel 143 } 144 return 0 145 } 146 147 // ClientConfig is the protobuf config for HTTP proxy client. 148 type ClientConfig struct { 149 state protoimpl.MessageState 150 sizeCache protoimpl.SizeCache 151 unknownFields protoimpl.UnknownFields 152 153 // Sever is a list of HTTP server addresses. 154 Server []*protocol.ServerEndpoint `protobuf:"bytes,1,rep,name=server,proto3" json:"server,omitempty"` 155 H1SkipWaitForReply bool `protobuf:"varint,2,opt,name=h1_skip_wait_for_reply,json=h1SkipWaitForReply,proto3" json:"h1_skip_wait_for_reply,omitempty"` 156 } 157 158 func (x *ClientConfig) Reset() { 159 *x = ClientConfig{} 160 if protoimpl.UnsafeEnabled { 161 mi := &file_proxy_http_config_proto_msgTypes[2] 162 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 163 ms.StoreMessageInfo(mi) 164 } 165 } 166 167 func (x *ClientConfig) String() string { 168 return protoimpl.X.MessageStringOf(x) 169 } 170 171 func (*ClientConfig) ProtoMessage() {} 172 173 func (x *ClientConfig) ProtoReflect() protoreflect.Message { 174 mi := &file_proxy_http_config_proto_msgTypes[2] 175 if protoimpl.UnsafeEnabled && x != nil { 176 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 177 if ms.LoadMessageInfo() == nil { 178 ms.StoreMessageInfo(mi) 179 } 180 return ms 181 } 182 return mi.MessageOf(x) 183 } 184 185 // Deprecated: Use ClientConfig.ProtoReflect.Descriptor instead. 186 func (*ClientConfig) Descriptor() ([]byte, []int) { 187 return file_proxy_http_config_proto_rawDescGZIP(), []int{2} 188 } 189 190 func (x *ClientConfig) GetServer() []*protocol.ServerEndpoint { 191 if x != nil { 192 return x.Server 193 } 194 return nil 195 } 196 197 func (x *ClientConfig) GetH1SkipWaitForReply() bool { 198 if x != nil { 199 return x.H1SkipWaitForReply 200 } 201 return false 202 } 203 204 var File_proxy_http_config_proto protoreflect.FileDescriptor 205 206 var file_proxy_http_config_proto_rawDesc = []byte{ 207 0x0a, 0x17, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x63, 0x6f, 0x6e, 208 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x76, 0x32, 0x72, 0x61, 0x79, 209 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x68, 0x74, 0x74, 0x70, 210 0x1a, 0x21, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 211 0x6c, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x70, 0x72, 212 0x6f, 0x74, 0x6f, 0x22, 0x41, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1a, 213 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 214 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 215 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 216 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x84, 0x02, 0x0a, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x65, 217 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1c, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 218 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x02, 0x18, 0x01, 0x52, 0x07, 0x74, 0x69, 219 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x4d, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 220 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 221 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 222 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x41, 0x63, 0x63, 223 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x61, 0x63, 0x63, 0x6f, 224 0x75, 0x6e, 0x74, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x72, 225 0x61, 0x6e, 0x73, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 226 0x10, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x61, 0x72, 0x65, 0x6e, 227 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 228 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, 0x4c, 0x65, 0x76, 0x65, 0x6c, 229 0x1a, 0x3b, 0x0a, 0x0d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 230 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 231 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 232 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x86, 0x01, 233 0x0a, 0x0c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x42, 234 0x0a, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 235 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 236 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x65, 0x72, 0x76, 237 0x65, 0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x73, 0x65, 0x72, 0x76, 238 0x65, 0x72, 0x12, 0x32, 0x0a, 0x16, 0x68, 0x31, 0x5f, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x77, 0x61, 239 0x69, 0x74, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x18, 0x02, 0x20, 0x01, 240 0x28, 0x08, 0x52, 0x12, 0x68, 0x31, 0x53, 0x6b, 0x69, 0x70, 0x57, 0x61, 0x69, 0x74, 0x46, 0x6f, 241 0x72, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x42, 0x60, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 242 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x68, 243 0x74, 0x74, 0x70, 0x50, 0x01, 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 244 0x6d, 0x2f, 0x76, 0x32, 0x66, 0x6c, 0x79, 0x2f, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, 245 0x72, 0x65, 0x2f, 0x76, 0x35, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x68, 0x74, 0x74, 0x70, 246 0xaa, 0x02, 0x15, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x72, 247 0x6f, 0x78, 0x79, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 248 } 249 250 var ( 251 file_proxy_http_config_proto_rawDescOnce sync.Once 252 file_proxy_http_config_proto_rawDescData = file_proxy_http_config_proto_rawDesc 253 ) 254 255 func file_proxy_http_config_proto_rawDescGZIP() []byte { 256 file_proxy_http_config_proto_rawDescOnce.Do(func() { 257 file_proxy_http_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_proxy_http_config_proto_rawDescData) 258 }) 259 return file_proxy_http_config_proto_rawDescData 260 } 261 262 var file_proxy_http_config_proto_msgTypes = make([]protoimpl.MessageInfo, 4) 263 var file_proxy_http_config_proto_goTypes = []interface{}{ 264 (*Account)(nil), // 0: v2ray.core.proxy.http.Account 265 (*ServerConfig)(nil), // 1: v2ray.core.proxy.http.ServerConfig 266 (*ClientConfig)(nil), // 2: v2ray.core.proxy.http.ClientConfig 267 nil, // 3: v2ray.core.proxy.http.ServerConfig.AccountsEntry 268 (*protocol.ServerEndpoint)(nil), // 4: v2ray.core.common.protocol.ServerEndpoint 269 } 270 var file_proxy_http_config_proto_depIdxs = []int32{ 271 3, // 0: v2ray.core.proxy.http.ServerConfig.accounts:type_name -> v2ray.core.proxy.http.ServerConfig.AccountsEntry 272 4, // 1: v2ray.core.proxy.http.ClientConfig.server:type_name -> v2ray.core.common.protocol.ServerEndpoint 273 2, // [2:2] is the sub-list for method output_type 274 2, // [2:2] is the sub-list for method input_type 275 2, // [2:2] is the sub-list for extension type_name 276 2, // [2:2] is the sub-list for extension extendee 277 0, // [0:2] is the sub-list for field type_name 278 } 279 280 func init() { file_proxy_http_config_proto_init() } 281 func file_proxy_http_config_proto_init() { 282 if File_proxy_http_config_proto != nil { 283 return 284 } 285 if !protoimpl.UnsafeEnabled { 286 file_proxy_http_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 287 switch v := v.(*Account); 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_http_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { 299 switch v := v.(*ServerConfig); 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 file_proxy_http_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { 311 switch v := v.(*ClientConfig); i { 312 case 0: 313 return &v.state 314 case 1: 315 return &v.sizeCache 316 case 2: 317 return &v.unknownFields 318 default: 319 return nil 320 } 321 } 322 } 323 type x struct{} 324 out := protoimpl.TypeBuilder{ 325 File: protoimpl.DescBuilder{ 326 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 327 RawDescriptor: file_proxy_http_config_proto_rawDesc, 328 NumEnums: 0, 329 NumMessages: 4, 330 NumExtensions: 0, 331 NumServices: 0, 332 }, 333 GoTypes: file_proxy_http_config_proto_goTypes, 334 DependencyIndexes: file_proxy_http_config_proto_depIdxs, 335 MessageInfos: file_proxy_http_config_proto_msgTypes, 336 }.Build() 337 File_proxy_http_config_proto = out.File 338 file_proxy_http_config_proto_rawDesc = nil 339 file_proxy_http_config_proto_goTypes = nil 340 file_proxy_http_config_proto_depIdxs = nil 341 }