chore: add peerfinder assets

This commit is contained in:
Jon Lundy
2022-10-30 10:00:53 -06:00
parent 6569c58e37
commit 12716ae972
8 changed files with 416 additions and 1 deletions

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,58 @@
/* Space out content a bit */
body {
padding-top: 20px;
padding-bottom: 20px;
}
/* Everything but the jumbotron gets side spacing for mobile first views */
.header,
.footer {
padding-right: 15px;
padding-left: 15px;
}
/* Custom page header */
.header {
padding-bottom: 20px;
border-bottom: 1px solid #e5e5e5;
}
/* Make the masthead heading the same height as the navigation */
.header h3 {
margin-top: 0;
margin-bottom: 0;
line-height: 40px;
}
/* Custom page footer */
.footer {
padding-top: 19px;
color: #777;
border-top: 1px solid #e5e5e5;
}
/* Customize container */
@media (min-width: 768px) {
.container {
max-width: 730px;
}
}
.container-narrow > hr {
margin: 30px 0;
}
/* Responsive: Portrait tablets and up */
@media screen and (min-width: 768px) {
/* Remove the padding we set earlier */
.header,
.footer {
padding-right: 0;
padding-left: 0;
}
/* Space out the masthead */
.header {
margin-bottom: 30px;
}
}
.panel-primary a { color: white; font-weight:bold }

View File

@@ -0,0 +1,21 @@
<div class="form-group"><label class="col-sm-2 control-label" >Peer Name</label><div class='col-sm-10'><input class="form-control" type=text name=peer_name value="{$o.peer_name|default:''|escape}"/></div></div>
<div class="form-group"><label class="col-sm-2 control-label" >IRC Nick</label><div class='col-sm-10'><input class="form-control" type=text name=peer_nick value="{$o.peer_nick|default:''|escape}"/></div></div>
<div class="form-group"><label class="col-sm-2 control-label" >Note</label><div class='col-sm-10'><input class="form-control" type=text name=peer_note value="{$o.peer_note|default:''|escape}"/></div></div>
<div class="form-group"><label class="col-sm-2 control-label" >Country</label><div class='col-sm-2'><input class="form-control" type=text name=peer_country maxlength=3 value="{$o.peer_country|default:''|escape}"/></div></div>
<div class="form-group"><label class="col-sm-2 control-label" >VPN Types</label><div class='col-sm-10'><select class="form-control" size=12 multiple name="peer_type[]">
<option {$types['openvpn']|default:''} value="openvpn">openvpn</option>
<option {$types['gre/ipsec']|default:''} value="gre/ipsec">gre/ipsec</option>
<option {$types['gre/plain']|default:''} value="gre/plain">gre/plain</option>
<option {$types['fastd']|default:''} value="fastd">fastd</option>
<option {$types['tinc']|default:''} value="tinc">tinc</option>
<option {$types['zerotier']|default:''} value="zerotier">zerotier</option>
<option {$types['wireguard']|default:''} value="wireguard">wireguard</option>
<option {$types['pptp']|default:''} value="pptp">pptp</option>
<option {$types['l2tp']|default:''} value="l2tp">l2tp</option>
<option {$types['other']|default:''} value="other">other</option>
</select></div></div>
<div class="form-group"><label class="col-sm-2 control-label" >Address Family</label><div class='col-sm-10'>
<label><input type="radio" name="peer_family" value="1" {$fam[0]|default:''} /> ipv4 </label>
<label><input type="radio" name="peer_family" value="2" {$fam[1]|default:''} /> ipv6 </label>
<label><input type="radio" name="peer_family" value="3" {$fam[2]|default:''} /> both </label>
</div></div>

View File

@@ -0,0 +1,41 @@
{{define "main"}}
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
{{template "meta" .}}
<title>DN42 PingFinder</title>
<link href="/peers/assets/bootstrap.min.css" rel="stylesheet" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<link href="/peers/assets/peerfinder.css" rel="stylesheet" integrity="sha384-ZsT4S9156eA60lsB4aOfffKowiaZ0NG7gIQfgIfGoxT6FxFocYH39kZgYaeZCvql" crossorigin="anonymous">
</head>
<body>
<div class="container-fluid">
<div class="header clearfix">
<nav>
<ul class="nav nav-pills pull-right">
<li role="presentation"><a href="/peers">Home</a></li>
<li role="presentation"><a href="/peers/status">Status</a></li>
<li role="presentation"><a href="//util.sour.is/peer">Sign up/Manage</a></li>
<li role="presentation"><a href="//git.dn42.us/dn42/pingfinder/src/master/clients">Scripts</a></li>
</ul>
</nav>
<h3 class="text-muted">DN42 PeerFinder</h3>
</div>
</div>
<div class=container>
{{template "content" .}}
</div>
<div class=container>
<h2>JSON Output</h2>
<pre style="background:#222; color:#ddd; height: 20em; font-size: 65%">{$o|json_encode:128|escape}</pre>
</div>
</body>
</html>
{{end}}

View File

@@ -0,0 +1,43 @@
{{template "main" .}}
{{define "meta"}}
<meta http-equiv="refresh" content="30">
{{end}}
{{define "content"}}
<h2>What is this?</h2>
<p>This tool allows you to find "good" peerings
for <a href="https://dn42.net">dn42</a>, by measuring the latency from
various points in the network towards you.</p>
<p>If you don't know what dn42 is,
read <a href="https://dn42.net/Home">the website</a> and in particular
the <a href="https://dn42.net/Getting-started-with-dn42">Getting Started
guide</a>.</p>
<h2>How does it work?</h2>
<p>
<ol>
<li>You enter your (Internet) IP address</li>
<li>Various routers participating in dn42 will ping you over the Internet</li>
<li>After a short while, you get back all the latency results</li>
<li>You can then peer with people close to you (low latency)</li>
</ol>
</p>
<form class="form-inline" method="POST" action="/peers/req">
<label>Ping IP Address [Check Hidden?]:</label>
<div class="input-group input-group-sm">
<input class="form-control" type="text" name="req_ip" placeholder="{$rq->remote_ip}">
<span class="input-group-addon">
<input type="checkbox" name="req_hidden" value=1 aria-label="Hidden?">
</span>
</div>
<button class="btn btn-default" type="submit">Submit</button>
</form>
<p>If you mark your measurement as hidden, it will not be displayed on the
page below. Note that the IP addresses of the target will be shown alongside the result.</p>
{{end}}