- Implement `remoteAccess` functionality in `ApiCLI` for Veyon integration. - Create `selectIP.php` view and associated form for remote access inputs. - Add JSON configuration for lab setups (`labList.json`). - Introduce reusable `home-button` web component. - Update project router and controller to support new `/remoteAccess` and `/conn` routes. - Add custom styles and icons to enhance UI.
37 lines
1.4 KiB
PHP
37 lines
1.4 KiB
PHP
<?php
|
|
/*
|
|
* Copyright (c) 2025. Brusegan Samuele, Davanzo Andrea
|
|
* Questo file fa parte di VeyonCtrl ed è rilasciato
|
|
* sotto la licenza MIT. Vedere il file LICENSE per i dettagli.
|
|
*/
|
|
|
|
class ApiCLI {
|
|
static $SET_WD = "cd 'C:\\Program Files\\Veyon' 2>&1 &&";
|
|
|
|
public static function testConnection() {
|
|
$cmd = "curl -I 127.0.0.1 && cd";
|
|
$response = shell_exec($cmd." 2>&1");
|
|
echo "<pre>"; echo $response; echo "</pre>";
|
|
}
|
|
// Veyon Modules
|
|
// [N] 1. authkeys - Commands for managing authentication keys
|
|
// [N] 2. config - Commands for managing the configuration of Veyon
|
|
// [?] 3. ldap - Commands for configuring and testing LDAP/AD integration
|
|
// [?] 4. networkobjects - Commands for managing the builtin network object directory
|
|
// [Y] 5. power - Commands for controlling power status of computers
|
|
// [Y] 6. remoteaccess - Remote view or control a computer
|
|
// [N] 7. service - Commands for configuring and controlling Veyon Service
|
|
// [N] 8. shell - Commands for shell functionalities
|
|
// [Y] 9. functions - Commands for managing functions
|
|
public static function remoteAccess($ip, $connectionType='view') {
|
|
global $SET_WD;
|
|
|
|
echo "Executing: ".EXE_NAME." remoteaccess ".$connectionType." ".$ip;
|
|
echo "<br>";
|
|
|
|
$response = shell_exec($SET_WD . " ". EXE_NAME ." remoteaccess ".$connectionType." ".$ip." 2>&1");
|
|
if ($response != "[OK]") {
|
|
echo "<pre>"; echo $response; echo "</pre>";
|
|
}
|
|
}
|
|
} |