mirror of
				https://github.com/v2board/v2board.git
				synced 2025-10-31 09:21:46 +08:00 
			
		
		
		
	update: opt code
This commit is contained in:
		| @@ -67,18 +67,18 @@ class AnXray | ||||
|         ]; | ||||
|         if ($server['tls']) { | ||||
|             if ($server['tlsSettings']) { | ||||
|                 $tlsSettings = json_decode($server['tlsSettings'], true); | ||||
|                 $tlsSettings = $server['tlsSettings']; | ||||
|                 if (isset($tlsSettings['serverName']) && !empty($tlsSettings['serverName'])) | ||||
|                     $config['sni'] = urlencode($tlsSettings['serverName']); | ||||
|             } | ||||
|         } | ||||
|         if ((string)$server['network'] === 'ws') { | ||||
|             $wsSettings = json_decode($server['networkSettings'], true); | ||||
|             $wsSettings = $server['networkSettings']; | ||||
|             if (isset($wsSettings['path'])) $config['path'] = urlencode($wsSettings['path']); | ||||
|             if (isset($wsSettings['headers']['Host'])) $config['host'] = urlencode($wsSettings['headers']['Host']); | ||||
|         } | ||||
|         if ((string)$server['network'] === 'grpc') { | ||||
|             $grpcSettings = json_decode($server['networkSettings'], true); | ||||
|             $grpcSettings = $server['networkSettings']; | ||||
|             if (isset($grpcSettings['serviceName'])) $config['serviceName'] = urlencode($grpcSettings['serviceName']); | ||||
|         } | ||||
|         return "vmess://" . $uuid . "@" . $server['host'] . ":" . $server['port'] . "?" . http_build_query($config) . "#" . urlencode($server['name']) . "\r\n"; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user