github.com/xraypb/xray-core@v1.6.6/proxy/http/config.pb.go (about)

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