From 0acaa113f9c4e9870b390d1b9912638bf03075d1 Mon Sep 17 00:00:00 2001 From: glen Date: Thu, 13 Aug 2020 19:00:10 -0400 Subject: [PATCH] Add exit data entry into php gui --- includes/functions.php | 152 ++++++++++++++++++++++------------------- 1 file changed, 81 insertions(+), 71 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index 4383015..ac0d525 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -348,84 +348,94 @@ function DisplayLokinetConfig() $lokiversion = exec("dpkg -s lokinet | grep '^Version:'", $output); if ($lokinetstatus[0] == 0) { $status = '
Lokinet daemon is not running -
'; + '; } else { $status = '
Lokinet daemon is running -
'; - } - - ?> -
-
-
-
Configure Lokinet
+
'; + } ?> +
+
+
+
Configure Lokinet
-
- - + +
+

+

+
-
-
-
Enter a valid bootstrap url below and apply to overwrite the current bootstrap:
- - -
  • - ' , PHP_EOL; - } else { - echo '' , PHP_EOL; - } - +
    Enter Exit Node Data to activate:
    + + + + +
    + ' , PHP_EOL; + } else { + echo '' , PHP_EOL; + } + if ($lokinetstatus[0] == 0) { + echo '' , PHP_EOL; + } else { + echo '' , PHP_EOL; + } ?>
    +
    +
    +
    +

    Lokient Daemon

    +
    +
    The 3 buttons below must be armed (red) to connect to Lokinet. If there isn't a current lokinet.ini file found on the system the "Generate.ini" button will be green. The .ini file must be generated prior to connecting to Lokinet by pressing the button which will automatically write the required .ini file. Similarly the absense of a valid bootstrap will be indicated by a green "Bootstrap" button. Applying a bootstrap by pressing the apply button without submitting a valid URL in the textbox area will apply the original default bootstrap in place of one being provided. Stopping the daemon also exits Lokinet. To summarize, if necessary generate the .ini and bootstrap Lokinet then you are able to connect to Lokinet by starting the daemon and letting the network establish itself. + +
    +
    +
    +
    +
    Enter a valid bootstrap url below and apply to overwrite the current bootstrap:
    + + +
    +' , PHP_EOL; + } else { + echo '' , PHP_EOL; + } - if (file_exists($filename)) { - echo '' , PHP_EOL; - } else { - echo '' , PHP_EOL; - } - ?> + if (file_exists($filename)) { + echo '' , PHP_EOL; + } else { + echo '' , PHP_EOL; + } ?>
    -
    -
    -
    -
    -

    Lokient Daemon

    -
    -
    - -
    +
    +
    +
    -
    -
    -
    - +
    +
    +
    ' , PHP_EOL; } -/* Lokinet script commands start HERE -//// -//// LOKINET -//// -//*/ + /* Lokinet script commands start HERE + //// + //// LOKINET + //// + //*/ //START } elseif (isset($_POST['StartDaemon'])) { - exec('sudo /var/lib/lokinet/lokilaunch.sh start'); + exec('sudo /var/lib/lokinet/lokilaunch.sh start'); //STOP } elseif (isset($_POST['StopDaemon'])) { - exec('sudo /var/lib/lokinet/lokilaunch.sh stop'); + exec('sudo /var/lib/lokinet/lokilaunch.sh stop'); //GENERATE LOKINET.INI } elseif (isset($_POST['GenerateLokinet'])) { - ?> + ?>
    Generating Lokinet Configuration
    $output"; + echo "
    $output
    "; //REGENERATE LOKINET.INI } elseif (isset($_POST['ReGenerateLokinet'])) { - ?> + ?>
    Regenerating Lokinet Configuration
    $output"; + echo "
    $output
    "; //APPLY LOKINET-BOOTSTRAP } elseif (isset($_POST['ApplyLokinetSettings'])) { - ?> + ?>
    Stopping Lokinet background daemon process.
    @@ -644,8 +654,8 @@ function SaveTORAndVPNConfig() $output"; }