custom_config, true); if ((int) $node_raw->sort === 11) { $v2_port = $node_custom_config['offset_port_user'] ?? ($node_custom_config['offset_port_node'] ?? 443); $security = $node_custom_config['security'] ?? 'none'; $network = $node_custom_config['network'] ?? ''; $header = $node_custom_config['header'] ?? ['type' => 'none']; $header_type = $header['type'] ?? ''; $host = $node_custom_config['header']['request']['headers']['Host'][0] ?? $node_custom_config['host'] ?? ''; $path = $node_custom_config['header']['request']['path'][0] ?? $node_custom_config['path'] ?? '/'; $v2rayn_array = [ 'v' => '2', 'ps' => $node_raw->name, 'add' => $node_raw->server, 'port' => $v2_port, 'id' => $user->uuid, 'aid' => 0, 'net' => $network, 'type' => $header_type, 'host' => $host, 'path' => $path, 'tls' => $security, ]; $links .= 'vmess://' . base64_encode(json_encode($v2rayn_array)) . PHP_EOL; } } return $links; } }