mirror of
https://github.com/house-of-vanity/v2-uri-parser.git
synced 2025-12-16 06:57:52 +00:00
feat: add tag and protocol to vless outbound
This commit is contained in:
@@ -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,
|
||||
}],
|
||||
}],
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user