@@ -9,23 +9,6 @@ pub enum Tls {
99 Outbound ( Outbound ) ,
1010}
1111
12- #[ skip_serializing_none]
13- #[ derive( Default , Serialize , Deserialize , Debug , Clone ) ]
14- pub struct Inbound {
15- enabled : Option < bool > ,
16- server_name : Option < String > ,
17- alpn : Option < Vec < String > > ,
18- min_version : Option < String > ,
19- max_version : Option < String > ,
20- cipher_suites : Option < Vec < String > > ,
21- certificate : Option < Vec < String > > ,
22- certificate_path : Option < String > ,
23- key : Option < Vec < String > > ,
24- key_path : Option < String > ,
25- acme : Option < ACME > ,
26- ech : Option < Ech > ,
27- reality : Option < Reality > ,
28- }
2912
3013#[ skip_serializing_none]
3114#[ derive( Default , Serialize , Deserialize , Debug , Clone ) ]
@@ -103,27 +86,87 @@ pub struct RealityHandshake {
10386 fallback_delay : Option < String > ,
10487}
10588
106- #[ skip_serializing_none]
107- #[ derive( Default , Serialize , Deserialize , Debug , Clone ) ]
108- pub struct Outbound {
109- enabled : Option < bool > ,
110- disable_sni : Option < bool > ,
111- server_name : Option < String > ,
112- insecure : Option < bool > ,
113- alpn : Option < Vec < String > > ,
114- min_version : Option < String > ,
115- max_version : Option < String > ,
116- cipher_suites : Option < Vec < String > > ,
117- certificate : Option < Vec < String > > ,
118- certificate_path : Option < String > ,
119- ech : Option < Ech > ,
120- utls : Option < OutboundUtils > ,
121- reality : Option < Reality > ,
122- }
89+
12390
12491#[ skip_serializing_none]
12592#[ derive( Default , Serialize , Deserialize , Debug , Clone ) ]
12693pub struct OutboundUtils {
12794 enabled : Option < bool > ,
12895 fingerprint : Option < String > ,
12996}
97+
98+ #[ skip_serializing_none]
99+ #[ derive( Serialize , Deserialize , Debug , Clone ) ]
100+ pub struct Inbound {
101+ pub enabled : Option < bool > ,
102+ pub certificate : Option < SingleOrMultipleValue < String > > ,
103+ pub key : Option < SingleOrMultipleValue < String > > ,
104+ pub key_password : Option < String > ,
105+ pub fingerprint : Option < TlsFingerprint > ,
106+ pub alpn : Option < Vec < String > > ,
107+ pub alpn_mode : Option < AlpnMode > ,
108+ pub min_version : Option < String > ,
109+ pub max_version : Option < String > ,
110+ pub session_ticket : Option < bool > ,
111+ pub curves : Option < Vec < String > > ,
112+ pub signature_algorithms : Option < String > ,
113+ pub key_share_mode : Option < String > ,
114+ pub only_grease : Option < bool > ,
115+ pub force_ciphersuites : Option < Vec < String > > ,
116+ pub session_cache_size : Option < u32 > ,
117+ pub session_cache_timeout : Option < u64 > ,
118+ pub client_auth : Option < bool > ,
119+ pub client_ca : Option < SingleOrMultipleValue < String > > ,
120+ }
121+
122+ #[ skip_serializing_none]
123+ #[ derive( Serialize , Deserialize , Debug , Clone ) ]
124+ pub struct Outbound {
125+ pub enabled : Option < bool > ,
126+ pub insecure : Option < bool > ,
127+ pub server_name : Option < String > ,
128+ pub certificate : Option < SingleOrMultipleValue < String > > ,
129+ pub fingerprint : Option < TlsFingerprint > ,
130+ pub alpn : Option < Vec < String > > ,
131+ pub alpn_mode : Option < AlpnMode > ,
132+ pub min_version : Option < String > ,
133+ pub max_version : Option < String > ,
134+ pub session_ticket : Option < bool > ,
135+ pub curves : Option < Vec < String > > ,
136+ pub signature_algorithms : Option < String > ,
137+ pub key_share_mode : Option < String > ,
138+ pub only_grease : Option < bool > ,
139+ pub force_ciphersuites : Option < Vec < String > > ,
140+ pub early_data_size : Option < u32 > ,
141+ pub session_cache_size : Option < u32 > ,
142+ pub session_cache_timeout : Option < u64 > ,
143+ pub client_certificate : Option < ClientCertificateConfig > ,
144+ }
145+
146+ #[ derive( Debug , Clone , Serialize , Deserialize , PartialEq , Eq ) ]
147+ #[ serde( rename_all = "kebab-case" ) ]
148+ pub enum TlsFingerprint {
149+ Chrome ,
150+ Firefox ,
151+ Safari ,
152+ Ios ,
153+ Android ,
154+ Edge ,
155+ Random ,
156+ Randomized ,
157+ }
158+
159+ #[ derive( Debug , Clone , Serialize , Deserialize , PartialEq , Eq ) ]
160+ #[ serde( rename_all = "snake_case" ) ]
161+ pub enum AlpnMode {
162+ Auto ,
163+ Strict ,
164+ }
165+
166+ #[ derive( Debug , Clone , Serialize , Deserialize , Default ) ]
167+ pub struct ClientCertificateConfig {
168+ pub certificate_path : Option < String > ,
169+ pub key_path : Option < String > ,
170+ pub password : Option < String > ,
171+ pub ocsp_stapling : Option < u64 > ,
172+ }
0 commit comments