Merge pull request #38 from necro-nemesis/master

Move latest working exit ver to exit branch
exit
necro-nemesis 5 years ago committed by GitHub
commit 13dab3f04b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,8 +1,8 @@
![](https://i.imgur.com/mXuacOH.jpg)
# `$ Lokiap-webgui` [![Release 1.8](https://img.shields.io/badge/Release-1.8-green.svg)](https://github.com/necro-nemesis/raspap-webgui/releases)
# `$ Lokiap-webgui` [![Release 1.9](https://img.shields.io/badge/Release-1.9-green.svg)](https://github.com/necro-nemesis/raspap-webgui/releases)
LokiAP interfaces witht Lokinet daemon to facilitate connections to the the Lokinet global privacy network. LokiAP provides a simple, responsive web interface to control wifi, hostapd, Lokinet daemon and related services necessary to access Lokinet on the Raspberry Pi or Orange Pi.
LokiAP interfaces witht Lokinet daemon to facilitate connections to the Lokinet global privacy network. LokiAP provides a simple, responsive web interface to control wifi, hostapd, Lokinet daemon and related services necessary to access Lokinet on the Raspberry Pi or Orange Pi.
### WHAT IS LOKI?
@ -28,7 +28,7 @@ Loki
- [License](#license)
## Prerequisites
Start with a clean install of [Armbian](https://www.armbian.com/) or [Raspbian](https://www.raspberrypi.org/downloads/raspbian/) (currently Buster and Stretch are verified as working). Lite versions are recommended. If using Raspbian Buster you will need to run the command ```sudo apt-get update --allow-releaseinfo-change``` then elevate to root with ```sudo su``` before running the LokiAP installer script. These additional steps are not required when using Armbian.
Start with a clean install of [Armbian](https://www.armbian.com/) or [Raspbian](https://www.raspberrypi.org/downloads/raspbian/) (currently Buster and Stretch are verified as working). Lite versions are recommended as all additional dependencies are added by the installer. If using Raspbian you will need to elevate to root with ```sudo su``` before running the LokiAP installer script. This additional step is not required when using Armbian.
For Orange Pi R1 use Armbian Buster found here: https://www.armbian.com/orange-pi-r1/. Recommend using "minimal" which is available for direct download at the bottom of the page or much faster download by .torrent also linked there.
@ -97,6 +97,10 @@ configured as an access point as follows:
To test the connection navigate to Loki's wiki page found at
http://dw68y1xhptqbhcm5s8aaaip6dbopykagig5q5u1za4c7pzxto77y.loki/wiki/index.php?title=Main_Page
## Connecting to an Exit Node
Exit nodes provide privacy on the internet through onion routing connections via the global network of Lokinet relay nodes and dedicated exit nodes. In order to connect to an exit node you will require the exit address from the exit node provider. These can be found through various social media linked at https://loki.network/. From the GUI this information can be entered and activated.
## Support us
LokiAP is free software, but powered by your support. If you find it beneficial or wish to contribute to inspire ongoing development your donations of any amount; be they even symbolic, are a show of approval and are greatly appreciated.

@ -30,15 +30,25 @@ case "$1" in
bootstrap)
echo -n "Lokinet daemon shutdown for bootstrapping\n"
systemctl stop lokinet
pidof lokinet >/dev/null && echo "Daemon shutdown failure\n" || echo "Daemon is stopped\n"
pidof lokinet >/dev/null && echo "Daemon shutdown failure" || echo "Daemon is stopped"
echo -n "Fetching bootstrap <---- "
lokinet-bootstrap "$2"
echo -n "Bootstrapped with ---> $2\n\n"
systemclt start lokinet
systemctl start lokinet
echo -n "Lokinet daemon restarted"
;;
exitup)
lokinet-vpn --up --exit "$2" --token "$3"
echo -n "lokinet-vpn --up --exit ""$2"" --token ""$3"
;;
exitdown)
echo -n "Stopping Exit"
lokinet-vpn --down
;;
*)
echo "Usage: "$1" {start|stop|gen|bootstrap}"
echo "Usage: "$1" {start|stop|gen|bootstrap|exitup|exitdown}"
exit 1
;;
esac

@ -1,6 +1,6 @@
<?php
define('RASPI_VERSION', '1.8');
define('RASPI_VERSION', '1.9');
define('RASPI_CONFIG', '/etc/raspap');
define('RASPI_CONFIG_NETWORKING',RASPI_CONFIG.'/networking');
define('RASPI_ADMIN_DETAILS', RASPI_CONFIG.'/raspap.auth');

@ -346,13 +346,7 @@ function DisplayLokinetConfig()
exec('pidof lokinet | wc -l', $lokinetstatus);
$rulestate = exec("ip rule show default | grep lokinet | awk {'print $5'}", $output);
$lokiversion = exec("dpkg -s lokinet | grep '^Version:'", $output);
if ($lokinetstatus[0] == 0) {
$status = '<div class="alert alert-danger alert-dismissable">Lokinet daemon is not running
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button></div>';
} else {
$status = '<div class="alert alert-success alert-dismissable">Lokinet daemon is running
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button></div>';
} ?>
?>
<div class="row">
<div class="col-lg-12">
<div class="panel panel-primary">
@ -374,12 +368,13 @@ function DisplayLokinetConfig()
<form role="form" action="?page=save_hostapd_conf" method="POST">
<h5>Enter Exit Node Data to activate:</h5>
<label for="exitaddress">Exit Address:</label>
<input type="url" class="form-control" placeholder="enter exit address here" id="exitaddress" name="exitaddress">
<input type="text" class="form-control" placeholder="enter exit address here" id="exitaddress" name="exitaddress">
<label for="exitkey">Exit Key: (optional)</label>
<input type="url" class="form-control" placeholder="enter exit key here" id="exitkey" name="exitkey">
<input type="text" class="form-control" placeholder="enter exit key here" id="exitkey" name="exitkey">
<br/>
<?php
if ($exitstatus[0] == 0) {
GLOBAL $exitstatus;
if ($exitstatus == FALSE) {
echo '<input type="submit" class="btn btn-success" name="StartExit" value="Start Exit" />' , PHP_EOL;
} else {
echo '<input type="submit" class="btn btn-danger" name="StopExit" value="Stop Exit" />' , PHP_EOL;
@ -394,9 +389,9 @@ function DisplayLokinetConfig()
<div class="tab-pane fade" id="daemon">
<h4>Lokient Daemon</h4>
<div class="row">
<div class="col-lg-12">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.
<div class="col-lg-12">
<button type="button" class="btn btn-info" data-toggle="collapse" data-target="#instruct">Instructions</button>
<div id="instruct" class="collapse">
<div id="instruct" class="collapse">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.
</div>
<div class="row">
<div class="form-group col-lg-12">
@ -623,6 +618,23 @@ function SaveTORAndVPNConfig()
} elseif (isset($_POST['StopDaemon'])) {
exec('sudo /var/lib/lokinet/lokilaunch.sh stop');
//START EXIT
} elseif (isset($_POST['StartExit'])) {
$exit = $_POST['exitaddress'];
$token = $_POST['exitkey'];
$exit=str_replace("'", "", $exit);
$token=str_replace("'", "", $token);
$output = shell_exec("sudo /var/lib/lokinet/lokilaunch.sh exitup '".$exit."''" .$token."'");
echo "<pre><strong>$output</strong></pre>";
GLOBAL $exitstatus;
$exitstatus = TRUE;
//STOP EXIT
} elseif (isset($_POST['StopExit'])) {
exec ('sudo /var/lib/lokinet/lokilaunch.sh exitdown');
GLOBAL $exitstatus;
$exitstatus = FALSE;
//GENERATE LOKINET.INI
} elseif (isset($_POST['GenerateLokinet'])) {
?>
@ -645,17 +657,10 @@ function SaveTORAndVPNConfig()
//APPLY LOKINET-BOOTSTRAP
} elseif (isset($_POST['ApplyLokinetSettings'])) {
?>
<div class="alert alert-danger">
Stopping Lokinet background daemon process.
</div>
<div class="alert alert-success">
Applying Bootstrap
</div>
<?php
$bootstrap = $_POST['lokinetbootstrap'];
$bootstrap=str_replace("'", "", $bootstrap);
$output = shell_exec('sudo /var/lib/lokinet/lokilaunch.sh bootstrap '.$bootstrap.'');
$output = preg_replace('#\\x1b[[][^A-Za-z]*[A-Za-z]#', '', $output);
echo "<pre><strong>$output</strong></pre>";
}

@ -12,7 +12,7 @@
*
* @author TechnicalTumbleweed (Loki->Discord/Telegram)
* @license GNU General Public License, version 3 (GPL-3.0)
* @version 1.8
* @version 1.9
* @link https://github.com/necro-nemesis/Lokiap-webgui
*/

Loading…
Cancel
Save