feat: add tag and protocol to vless outbound

This commit is contained in:
Keivan-sf
2023-10-14 11:01:28 +03:30
parent 9691f3ef9a
commit 2f9005f1e4

View File

@@ -34,6 +34,8 @@ pub struct VlessData {
address_data: VlessAddress,
}
// Outbound structs
struct VlessUser {
id: String,
encryption: String,
@@ -51,8 +53,17 @@ struct VlessOutboundSettings {
vnext: Vec<VlessServerObject>,
}
fn create_outbound_object(data: VlessData) -> VlessOutboundSettings {
return VlessOutboundSettings {
pub struct VlessOutbound {
settings: VlessOutboundSettings,
protocol: String,
tag: String,
}
fn create_outbound_object(data: VlessData) -> VlessOutbound {
return VlessOutbound {
protocol: String::from("vless"),
tag: String::from("proxy"),
settings: VlessOutboundSettings {
vnext: vec![VlessServerObject {
port: data.address_data.port,
address: data.address_data.address,
@@ -63,6 +74,7 @@ fn create_outbound_object(data: VlessData) -> VlessOutboundSettings {
level: 0,
}],
}],
},
};
}