mirror of
https://github.com/XTLS/Xray-core.git
synced 2026-07-06 19:58:47 +00:00
Refine proto usage
This commit is contained in:
@@ -92,10 +92,8 @@ type Certificate struct {
|
||||
// If true, one-Time Loading
|
||||
OneTimeLoading bool `protobuf:"varint,7,opt,name=One_time_loading,json=OneTimeLoading,proto3" json:"One_time_loading,omitempty"`
|
||||
BuildChain bool `protobuf:"varint,8,opt,name=build_chain,json=buildChain,proto3" json:"build_chain,omitempty"`
|
||||
// Abuse proto data for storage hotreload data
|
||||
ParsedCache []byte `protobuf:"bytes,9,opt,name=parsed_cache,json=parsedCache,proto3" json:"parsed_cache,omitempty"`
|
||||
OcspData []byte `protobuf:"bytes,10,opt,name=ocsp_data,json=ocspData,proto3" json:"ocsp_data,omitempty"`
|
||||
LastReload int64 `protobuf:"varint,11,opt,name=last_reload,json=lastReload,proto3" json:"last_reload,omitempty"`
|
||||
// Abused proto data to storage some runtime data
|
||||
ExtraData []byte `protobuf:"bytes,9,opt,name=extra_data,json=extraData,proto3" json:"extra_data,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
@@ -186,27 +184,13 @@ func (x *Certificate) GetBuildChain() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *Certificate) GetParsedCache() []byte {
|
||||
func (x *Certificate) GetExtraData() []byte {
|
||||
if x != nil {
|
||||
return x.ParsedCache
|
||||
return x.ExtraData
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Certificate) GetOcspData() []byte {
|
||||
if x != nil {
|
||||
return x.OcspData
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Certificate) GetLastReload() int64 {
|
||||
if x != nil {
|
||||
return x.LastReload
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type Config struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
// List of certificates to be served on server.
|
||||
@@ -402,7 +386,7 @@ var File_transport_internet_tls_config_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_transport_internet_tls_config_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"#transport/internet/tls/config.proto\x12\x1bxray.transport.internet.tls\x1a\x1ftransport/internet/config.proto\"\x8e\x04\n" +
|
||||
"#transport/internet/tls/config.proto\x12\x1bxray.transport.internet.tls\x1a\x1ftransport/internet/config.proto\"\xcc\x03\n" +
|
||||
"\vCertificate\x12 \n" +
|
||||
"\vcertificate\x18\x01 \x01(\fR\vcertificate\x12\x10\n" +
|
||||
"\x03key\x18\x02 \x01(\fR\x03key\x12D\n" +
|
||||
@@ -412,12 +396,9 @@ const file_transport_internet_tls_config_proto_rawDesc = "" +
|
||||
"\bkey_path\x18\x06 \x01(\tR\akeyPath\x12(\n" +
|
||||
"\x10One_time_loading\x18\a \x01(\bR\x0eOneTimeLoading\x12\x1f\n" +
|
||||
"\vbuild_chain\x18\b \x01(\bR\n" +
|
||||
"buildChain\x12!\n" +
|
||||
"\fparsed_cache\x18\t \x01(\fR\vparsedCache\x12\x1b\n" +
|
||||
"\tocsp_data\x18\n" +
|
||||
" \x01(\fR\bocspData\x12\x1f\n" +
|
||||
"\vlast_reload\x18\v \x01(\x03R\n" +
|
||||
"lastReload\"n\n" +
|
||||
"buildChain\x12\x1d\n" +
|
||||
"\n" +
|
||||
"extra_data\x18\t \x01(\fR\textraData\"n\n" +
|
||||
"\x05Usage\x12\x10\n" +
|
||||
"\fENCIPHERMENT\x10\x00\x12\x14\n" +
|
||||
"\x10AUTHORITY_VERIFY\x10\x01\x12\x13\n" +
|
||||
|
||||
Reference in New Issue
Block a user