@@ -274,27 +274,23 @@ def _transport_quic(self, config: QUICTransportConfig, path: str) -> dict:
274274 """Handle QUIC transport - only gets QUIC config"""
275275 host = config .host if isinstance (config .host , str ) else (config .host [0 ] if config .host else "" )
276276
277- return self ._normalize_and_remove_none_values (
278- {
279- "security" : host ,
280- "header" : {"type" : config .header_type },
281- "key" : path ,
282- }
283- )
277+ return self ._normalize_and_remove_none_values ({
278+ "security" : host ,
279+ "header" : {"type" : config .header_type },
280+ "key" : path ,
281+ })
284282
285283 def _transport_kcp (self , config : KCPTransportConfig , path : str ) -> dict :
286284 """Handle KCP transport - only gets KCP config"""
287- return self ._normalize_and_remove_none_values (
288- {
289- "mtu" : config .mtu if config .mtu is not None else 1350 ,
290- "tti" : config .tti if config .tti is not None else 50 ,
291- "uplinkCapacity" : config .uplink_capacity if config .uplink_capacity is not None else 5 ,
292- "downlinkCapacity" : config .downlink_capacity if config .downlink_capacity is not None else 20 ,
293- "congestion" : config .congestion ,
294- "readBufferSize" : config .read_buffer_size if config .read_buffer_size is not None else 2 ,
295- "writeBufferSize" : config .write_buffer_size if config .write_buffer_size is not None else 2 ,
296- }
297- )
285+ return self ._normalize_and_remove_none_values ({
286+ "mtu" : config .mtu if config .mtu is not None else 1350 ,
287+ "tti" : config .tti if config .tti is not None else 50 ,
288+ "uplinkCapacity" : config .uplink_capacity if config .uplink_capacity is not None else 5 ,
289+ "downlinkCapacity" : config .downlink_capacity if config .downlink_capacity is not None else 20 ,
290+ "congestion" : config .congestion ,
291+ "readBufferSize" : config .read_buffer_size if config .read_buffer_size is not None else 2 ,
292+ "writeBufferSize" : config .write_buffer_size if config .write_buffer_size is not None else 2 ,
293+ })
298294
299295 def _apply_transport (self , network : str , inbound : SubscriptionInboundData , path : str ) -> dict | None :
300296 """Apply transport settings using registry pattern"""
@@ -310,17 +306,15 @@ def _apply_tls(self, tls_config: TLSConfig, security: str) -> dict:
310306 sni = tls_config .sni if isinstance (tls_config .sni , str ) else (tls_config .sni [0 ] if tls_config .sni else None )
311307
312308 if security == "reality" :
313- return self ._normalize_and_remove_none_values (
314- {
315- "serverName" : sni ,
316- "fingerprint" : tls_config .fingerprint ,
317- "show" : False ,
318- "publicKey" : tls_config .reality_public_key ,
319- "shortId" : tls_config .reality_short_id ,
320- "spiderX" : tls_config .reality_spx ,
321- "mldsa65Verify" : tls_config .mldsa65_verify ,
322- }
323- )
309+ return self ._normalize_and_remove_none_values ({
310+ "serverName" : sni ,
311+ "fingerprint" : tls_config .fingerprint ,
312+ "show" : False ,
313+ "publicKey" : tls_config .reality_public_key ,
314+ "shortId" : tls_config .reality_short_id ,
315+ "spiderX" : tls_config .reality_spx ,
316+ "mldsa65Verify" : tls_config .mldsa65_verify ,
317+ })
324318 else : # tls
325319 config = {
326320 "serverName" : sni ,
@@ -389,13 +383,11 @@ def _download_config(self, download_settings: SubscriptionInboundData, link_form
389383 sockopt = sockopt ,
390384 )
391385
392- return self ._normalize_and_remove_none_values (
393- {
394- "address" : download_settings .address ,
395- "port" : self ._select_port (download_settings .port ),
396- ** stream_settings ,
397- }
398- )
386+ return self ._normalize_and_remove_none_values ({
387+ "address" : download_settings .address ,
388+ "port" : self ._select_port (download_settings .port ),
389+ ** stream_settings ,
390+ })
399391
400392 # ========== Protocol Builders (Registry Methods) ==========
401393
@@ -417,7 +409,7 @@ def _build_vless(self, address: str, inbound: SubscriptionInboundData, settings:
417409
418410 user_settings = {"id" : id , "encryption" : inbound .encryption }
419411
420- if inbound . flow_enabled and ( flow := inbound .inbound_flow ) :
412+ if flow := inbound .inbound_flow :
421413 user_settings ["flow" ] = flow
422414
423415 return self ._build_outbound (
0 commit comments