|
|
|
@ -262,7 +262,7 @@ function DisplayOpenVPNConfig() {
|
|
|
|
|
<h4>Server settings</h4>
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="form-group col-md-4">
|
|
|
|
|
<label for="code">Port</label>
|
|
|
|
|
<label for="code">Port</label>
|
|
|
|
|
<input type="text" class="form-control" name="openvpn_port" value="<?php echo htmlspecialchars($arrServerConfig['port'], ENT_QUOTES); ?>" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -350,14 +350,16 @@ function DisplayLokinetConfig(){
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-lg-12">
|
|
|
|
|
<div class="panel panel-primary">
|
|
|
|
|
<div class="panel-heading"><i class="fa fa-eye-slash fa-fw"></i> Configure TOR proxy</div>
|
|
|
|
|
<div class="panel-heading"><i class="fa fa-eye-slash fa-fw"></i> Configure Lokinet</div>
|
|
|
|
|
<!-- /.panel-heading -->
|
|
|
|
|
<div class="panel-body">
|
|
|
|
|
<!-- Nav tabs -->
|
|
|
|
|
<ul class="nav nav-tabs">
|
|
|
|
|
<li class="active"><a href="#basic" data-toggle="tab">Basic</a>
|
|
|
|
|
<li class="active"><a href="#basic" data-toggle="tab">Daemon Control</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li><a href="#relay" data-toggle="tab">Relay</a>
|
|
|
|
|
<li><a href="#daemon" data-toggle="tab">Advanced Console User</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li><a href="#youtube" data-toggle="tab">This is Loki</a>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
@ -368,100 +370,59 @@ function DisplayLokinetConfig(){
|
|
|
|
|
<div class="tab-pane fade in active" id="basic">
|
|
|
|
|
<h4>Basic settings</h4>
|
|
|
|
|
<form role="form" action="?page=save_hostapd_conf" method="POST">
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="form-group col-md-4">
|
|
|
|
|
<label for="code">VirtualAddrNetwork</label>
|
|
|
|
|
<input type="text" class="form-control" name="virtualaddrnetwork" value="<?php echo htmlspecialchars($arrConfig['VirtualAddrNetwork'], ENT_QUOTES); ?>" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="form-group col-md-4">
|
|
|
|
|
<label for="code">AutomapHostsSuffixes</label>
|
|
|
|
|
<input type="text" class="form-control" name="automaphostssuffixes" value="<?php echo htmlspecialchars($arrConfig['AutomapHostsSuffixes'], ENT_QUOTES); ?>" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="form-group col-md-4">
|
|
|
|
|
<label for="code">AutomapHostsOnResolve</label>
|
|
|
|
|
<input type="text" class="form-control" name="automaphostsonresolve" value="<?php echo htmlspecialchars($arrConfig['AutomapHostsOnResolve'], ENT_QUOTES); ?>" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="form-group col-md-4">
|
|
|
|
|
<label for="code">TransListenAddress</label>
|
|
|
|
|
<input type="text" class="form-control" name="translistenaddress" value="<?php echo htmlspecialchars($arrConfig['TransListenAddress'], ENT_QUOTES); ?>" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="form-group col-md-4">
|
|
|
|
|
<label for="code">DNSPort</label>
|
|
|
|
|
<input type="text" class="form-control" name="dnsport" value="<?php echo htmlspecialchars($arrConfig['DNSPort'], ENT_QUOTES); ?>" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="form-group col-md-4">
|
|
|
|
|
<label for="code">DNSListenAddress</label>
|
|
|
|
|
<input type="text" class="form-control" name="dnslistenaddress" value="<?php echo htmlspecialchars($arrConfig['DNSListenAddress'], ENT_QUOTES); ?>" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="tab-pane fade" id="relay">
|
|
|
|
|
<h4>Relay settings</h4>
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="form-group col-md-4">
|
|
|
|
|
<label for="code">ORPort</label>
|
|
|
|
|
<input type="text" class="form-control" name="orport" value="<?php echo htmlspecialchars($arrConfig['ORPort'], ENT_QUOTES); ?>" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="form-group col-md-4">
|
|
|
|
|
<label for="code">ORListenAddress</label>
|
|
|
|
|
<input type="text" class="form-control" name="orlistenaddress" value="<?php echo htmlspecialchars($arrConfig['ORListenAddress'], ENT_QUOTES); ?>" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="form-group col-md-4">
|
|
|
|
|
<label for="code">Nickname</label>
|
|
|
|
|
<input type="text" class="form-control" name="nickname" value="<?php echo htmlspecialchars($arrConfig['Nickname'], ENT_QUOTES); ?>" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="form-group col-md-4">
|
|
|
|
|
<label for="code">Address</label>
|
|
|
|
|
<input type="text" class="form-control" name="address" value="<?php echo htmlspecialchars($arrConfig['Address'], ENT_QUOTES); ?>" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="form-group col-md-4">
|
|
|
|
|
<label for="code">RelayBandwidthRate</label>
|
|
|
|
|
<input type="text" class="form-control" name="relaybandwidthrate" value="<?php echo htmlspecialchars($arrConfig['RelayBandwidthRate'], ENT_QUOTES); ?>" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="form-group col-md-4">
|
|
|
|
|
<label for="code">RelayBandwidthBurst</label>
|
|
|
|
|
<input type="text" class="form-control" name="relaybandwidthburst" value="<?php echo htmlspecialchars($arrConfig['RelayBandwidthBurst'], ENT_QUOTES); ?>" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="form-group col-lg-12">
|
|
|
|
|
<label for="code">Update lokinet-bootstrap settings</label>
|
|
|
|
|
<input type="text" class="form-control" name="loinetbootstrap" placeholder="http://206.81.100.174/n-st-5.signed" value="<?php echo htmlspecialchars($arrConfig['lokinetbootstrap'], ENT_QUOTES); ?>" />
|
|
|
|
|
<h5>Contact Loki user groups for the latest bootstrap file location</h5>
|
|
|
|
|
<input type="submit" class="btn btn-success" name="ApplyLokinetSettings" value="Apply Bootstrap" />
|
|
|
|
|
<?php
|
|
|
|
|
if( $lokinetstatus[0] == 0 ) {
|
|
|
|
|
echo '<input type="submit" class="btn btn-success" name="StartLokinet" value="Start Lokinet" />' , PHP_EOL;
|
|
|
|
|
} else {
|
|
|
|
|
echo '<input type="submit" class="btn btn-danger" name="StopLokient" value="Stop Lokinet" />' , PHP_EOL;
|
|
|
|
|
};
|
|
|
|
|
$filename = '/home/pi/.lokinet/lokinet.ini';
|
|
|
|
|
if (!file_exists($filename)) {
|
|
|
|
|
echo '<input tpe="submit" class="btn btn-success" name="GenerateLokinet" value="Gnerate .ini" />' , PHP_EOL;
|
|
|
|
|
} else {
|
|
|
|
|
echo '<input type="submit" class="btn btn-danger" name="ReGenerateLokinet" value="Regenerate .ini" />' , PHP_EOL;
|
|
|
|
|
};
|
|
|
|
|
?>
|
|
|
|
|
</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>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="tab-pane fade" id="youtube">
|
|
|
|
|
<div class="container">
|
|
|
|
|
<h2>This is Loki</h2>
|
|
|
|
|
<div class="embed-responsive embed-responsive-16by9">
|
|
|
|
|
<iframe class="embed-responsive-item" src="https://www.youtube.com/embed/Lykh-NqkKys"></iframe>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</form>
|
|
|
|
|
</div><!-- /.tab-content -->
|
|
|
|
|
</div><!-- /.panel-body -->
|
|
|
|
|
<div class="panel-footer"> Information provided by Lokinet</div>
|
|
|
|
|
</div><!-- /.panel-primary -->
|
|
|
|
|
</div><!-- /.col-lg-12 -->
|
|
|
|
|
</div><!-- /.row -->
|
|
|
|
|
<?php
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
<input type="submit" class="btn btn-outline btn-primary" name="SaveTORProxySettings" value="Save settings" />
|
|
|
|
|
<?php
|
|
|
|
|
if( $torproxystatus[0] == 0 ) {
|
|
|
|
|
echo '<input type="submit" class="btn btn-success" name="StartTOR" value="Start TOR" />' , PHP_EOL;
|
|
|
|
|
} else {
|
|
|
|
|
echo '<input type="submit" class="btn btn-warning" name="StopTOR" value="Stop TOR" />' , PHP_EOL;
|
|
|
|
|
};
|
|
|
|
|
?>
|
|
|
|
|
</form>
|
|
|
|
|
</div><!-- /.tab-content -->
|
|
|
|
|
</div><!-- /.panel-body -->
|
|
|
|
|
<div class="panel-footer"> Information provided by tor</div>
|
|
|
|
|
</div><!-- /.panel-primary -->
|
|
|
|
|
</div><!-- /.col-lg-12 -->
|
|
|
|
|
</div><!-- /.row -->
|
|
|
|
|
<?php
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
@ -527,13 +488,13 @@ function DisplayTorProxyConfig(){
|
|
|
|
|
<label for="code">AutomapHostsOnResolve</label>
|
|
|
|
|
<input type="text" class="form-control" name="automaphostsonresolve" value="<?php echo htmlspecialchars($arrConfig['AutomapHostsOnResolve'], ENT_QUOTES); ?>" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="form-group col-md-4">
|
|
|
|
|
<label for="code">TransListenAddress</label>
|
|
|
|
|
<input type="text" class="form-control" name="translistenaddress" value="<?php echo htmlspecialchars($arrConfig['TransListenAddress'], ENT_QUOTES); ?>" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="form-group col-md-4">
|
|
|
|
|
<label for="code">DNSPort</label>
|
|
|
|
@ -588,7 +549,7 @@ function DisplayTorProxyConfig(){
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<input type="submit" class="btn btn-outline btn-primary" name="SaveTORProxySettings" value="Save settings" />
|
|
|
|
|
<?php
|
|
|
|
|
<?php
|
|
|
|
|
if( $torproxystatus[0] == 0 ) {
|
|
|
|
|
echo '<input type="submit" class="btn btn-success" name="StartTOR" value="Start TOR" />' , PHP_EOL;
|
|
|
|
|
} else {
|
|
|
|
@ -602,7 +563,7 @@ function DisplayTorProxyConfig(){
|
|
|
|
|
</div><!-- /.panel-primary -->
|
|
|
|
|
</div><!-- /.col-lg-12 -->
|
|
|
|
|
</div><!-- /.row -->
|
|
|
|
|
<?php
|
|
|
|
|
<?php
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -638,5 +599,5 @@ function SaveTORAndVPNConfig(){
|
|
|
|
|
foreach( $return as $line ) {
|
|
|
|
|
echo htmlspecialchars($line, ENT_QUOTES).'<br />' , PHP_EOL;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|