Merge pull request #37 from necro-nemesis/exit

Add exit data entry into php gui
pull/38/head
necro-nemesis 4 years ago committed by GitHub
commit eb4d935d67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -352,9 +352,7 @@ function DisplayLokinetConfig()
} 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">
@ -363,9 +361,9 @@ function DisplayLokinetConfig()
<div class="panel-body">
<!-- Nav tabs -->
<ul class="nav nav-tabs">
<li class="active"><a href="#basic" data-toggle="tab">Daemon Control</a>
<li class="active"><a href="#basic" data-toggle="tab">Exit Node Settings</a>
</li>
<li><a href="#daemon" data-toggle="tab">Advanced Console User</a>
<li><a href="#daemon" data-toggle="tab">Daemon Settings</a>
</li>
</ul>
<!-- Tab panes -->
@ -373,59 +371,71 @@ function DisplayLokinetConfig()
<p><?php echo $status; ?></p>
<p><?php echo "Current Lokinet $lokiversion"; ?></p>
<div class="tab-pane fade in active" id="basic">
<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">
<label for="exitkey">Exit Key: (optional)</label>
<input type="url" class="form-control" placeholder="enter exit key here" id="exitkey" name="exitkey">
<br/>
<?php
if ($exitstatus[0] == 0) {
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;
}
if ($lokinetstatus[0] == 0) {
echo '<input type="submit" class="btn btn-success" name="StartDaemon" value="Start Daemon" />' , PHP_EOL;
} else {
echo '<input type="submit" class="btn btn-danger" name="StopDaemon" value="Stop Daemon" />' , PHP_EOL;
} ?><h5><?php echo _("Your development support is greatly appreciated | Loki Address:"); ?></h5>
<h5><pre><?php echo _("LA8VDcoJgiv2bSiVqyaT6hJ67LXbnQGpf9Uk3zh9ikUKPJUWeYbgsd9gxQ5ptM2hQNSsCaRETQ3GM9FLDe7BGqcm4ve69bh"); ?></pre></h5>
</div>
<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.
<button type="button" class="btn btn-info" data-toggle="collapse" data-target="#instruct">Instructions</button>
<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 id="instruct" class="collapse">
</div>
<form role="form" action="?page=save_hostapd_conf" method="POST">
<div class="row">
<div class="form-group col-lg-12">
<h5>Enter a valid bootstrap url below and apply to overwrite the current bootstrap:</h5>
<label for="usr">Bootstrap url:</label>
<label for="lokinetbootstrap">Bootstrap url:</label>
<input type="url" class="form-control" placeholder="https://seed.lokinet.org/lokinet.signed" id="lokinetbootstrap" name="lokinetbootstrap">
<li></li>
<br/>
<?php
$filename = '/var/lib/lokinet/lokinet.ini';
if ($lokinetstatus[0] == 0) {
echo '<input type="submit" class="btn btn-success" name="StartDaemon" value="Start Daemon" />' , PHP_EOL;
} else {
echo '<input type="submit" class="btn btn-danger" name="StopDaemon" value="Stop Daemon" />' , PHP_EOL;
}
$filename = '/var/lib/lokinet/lokinet.ini';
if (file_exists($filename)) {
echo '<input type="submit" class="btn btn-danger" name="ReGenerateLokinet" value="Regenerate .ini" />' , PHP_EOL;
} else {
echo '<input type="submit" class="btn btn-success" name="GenerateLokinet" value="Generate .ini" />' , PHP_EOL;
}
?>
} ?>
<input type="submit" class="btn btn-danger" name="ApplyLokinetSettings" value="Re-Bootstrap" />
<h5><?php echo _("Your development support is greatly appreciated | Loki Address:"); ?></h5>
<h5><pre><?php echo _("LA8VDcoJgiv2bSiVqyaT6hJ67LXbnQGpf9Uk3zh9ikUKPJUWeYbgsd9gxQ5ptM2hQNSsCaRETQ3GM9FLDe7BGqcm4ve69bh"); ?></pre></h5>
</form>
</div>
</div>
</div>
<div class="tab-pane fade" id="daemon">
<h4>Lokient Daemon</h4>
<div class="row">
<div class="col-lg-12">
<iframe src="includes/webconsole.php" class="webconsole"></iframe>
</div>
</form>
</div>
</div>
</div>
</div><!-- /.tab-content -->
</div><!-- /.panel-body -->
<div class="panel-footer">Contact Loki user groups for the latest bootstrap file location</div>
<div class="panel-footer">Contact Loki user groups on Session to obtain Exit Access</div>
</div><!-- /.panel-primary -->
</div><!-- /.col-lg-12 -->
</div><!-- /.row -->
<?php
}
/**
*
*

Loading…
Cancel
Save