diff --git a/config/appprofile.example.php b/config/appprofile.example.php index cb3a935cb3..9cb64aabff 100644 --- a/config/appprofile.example.php +++ b/config/appprofile.example.php @@ -97,6 +97,7 @@ ], 'auto_route' => true, 'strict_route' => true, + 'stack' => 'mixed', 'sniff' => true, 'sniff_override_destination' => true, 'domain_strategy' => 'prefer_ipv4', diff --git a/src/Services/Subscribe/SingBox.php b/src/Services/Subscribe/SingBox.php index 5423247477..1123532d4b 100644 --- a/src/Services/Subscribe/SingBox.php +++ b/src/Services/Subscribe/SingBox.php @@ -92,6 +92,7 @@ public function getContent($user): string $path = $node_custom_config['header']['request']['path'][0] ?? $node_custom_config['path'] ?? ''; $headers = $node_custom_config['header']['request']['headers'] ?? []; $service_name = $node_custom_config['servicename'] ?? ''; + $utls = $node_custom_config['utls'] ?? false; $node = [ 'type' => 'vmess', @@ -104,8 +105,14 @@ public function getContent($user): string 'tls' => [ 'enabled' => true, 'server_name' => $host, + 'utls' => [ + 'enabled' => $utls, + 'fingerprint' => 'chrome', + ], ], - 'packet_encoding' => 'packetaddr', + 'packet_encoding' => 'xudp', + 'global_padding' => true, + 'authenticated_length' => true, 'transport' => [ 'type' => $transport, 'path' => $path,