Browse Source

Merge pull request #2477 from 77-QiQi/uim

[Uim] (SingBox subscribe fix)Method of HTTP request
Anankke 11 months ago
parent
commit
d6884a7952
2 changed files with 6 additions and 3 deletions
  1. 0 1
      config/appprofile.example.php
  2. 6 2
      src/Services/Subscribe/SingBox.php

+ 0 - 1
config/appprofile.example.php

@@ -109,7 +109,6 @@ $_ENV['SingBox_Config'] = [
             'stack' => 'mixed',
             'sniff' => true,
             'sniff_override_destination' => true,
-            'domain_strategy' => 'prefer_ipv4',
             'udp_timeout' => 60,
         ],
     ],

+ 6 - 2
src/Services/Subscribe/SingBox.php

@@ -93,6 +93,9 @@ final class SingBox extends Base
                     $headers = $node_custom_config['header']['request']['headers'] ?? [];
                     $service_name = $node_custom_config['servicename'] ?? '';
                     $utls = $node_custom_config['utls'] ?? false;
+                    $method = $node_custom_config['method'] ?? '';
+                    $max_early_data = $node_custom_config['max_early_data'] ?? '';
+                    $early_data_header_name = $node_custom_config['early_data_header_name'] ?? '';
 
                     $node = [
                         'type' => 'vmess',
@@ -116,10 +119,11 @@ final class SingBox extends Base
                         'transport' => [
                             'type' => $transport,
                             'path' => $path,
+                            'method' => $method,
                             'headers' => $headers,
                             'service_name' => $service_name,
-                            'max_early_data' => 2048,
-                            'early_data_header_name' => 'Sec-WebSocket-Protocol',
+                            'max_early_data' => (int) $max_early_data,
+                            'early_data_header_name' => $early_data_header_name,
                         ],
                     ];