libsubconverter/models/proxy_node/
vless.rs

1use serde::{Deserialize, Serialize};
2use std::collections::{HashMap, HashSet};
3
4#[derive(Debug, Clone, Serialize, Deserialize)]
5pub struct VlessProxy {
6    pub uuid: String,
7    pub flow: Option<String>,
8    pub tls: bool,
9    pub alpn: HashSet<String>,
10    pub udp: bool,
11    pub packet_addr: Option<bool>,
12    pub xudp: Option<bool>,
13    pub packet_encoding: Option<String>,
14    pub network: Option<String>,
15    pub reality_public_key: Option<String>,
16    pub reality_short_id: Option<String>,
17    pub http_method: Option<String>,
18    pub http_path: Option<String>,
19    pub http_headers: Option<HashMap<String, Vec<String>>>,
20    pub h2_host: Option<Vec<String>>,
21    pub h2_path: Option<String>,
22    pub grpc_service_name: Option<String>,
23    pub ws_path: Option<String>,
24    pub ws_headers: Option<HashMap<String, String>>,
25    pub skip_cert_verify: Option<bool>,
26    pub fingerprint: Option<String>,
27    pub servername: Option<String>,
28    pub client_fingerprint: Option<String>,
29}
30
31impl Default for VlessProxy {
32    fn default() -> Self {
33        Self {
34            uuid: String::new(),
35            flow: None,
36            tls: false,
37            alpn: HashSet::new(),
38            udp: true,
39            packet_addr: None,
40            xudp: None,
41            packet_encoding: None,
42            network: None,
43            reality_public_key: None,
44            reality_short_id: None,
45            http_method: None,
46            http_path: None,
47            http_headers: None,
48            h2_host: None,
49            h2_path: None,
50            grpc_service_name: None,
51            ws_path: None,
52            ws_headers: None,
53            skip_cert_verify: None,
54            fingerprint: None,
55            servername: None,
56            client_fingerprint: None,
57        }
58    }
59}