Skip to content

Commit

Permalink
[Uim] sing-box UoT & utls (#2450)
Browse files Browse the repository at this point in the history
* Update appprofile.example.php

* Update SingBox.php
  • Loading branch information
77-QiQi committed Jul 24, 2024
1 parent 4a2989a commit 2c7a1b3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions config/appprofile.example.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
],
'auto_route' => true,
'strict_route' => true,
'stack' => 'mixed',
'sniff' => true,
'sniff_override_destination' => true,
'domain_strategy' => 'prefer_ipv4',
Expand Down
9 changes: 8 additions & 1 deletion src/Services/Subscribe/SingBox.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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,
Expand Down

0 comments on commit 2c7a1b3

Please sign in to comment.