ifconfig.io/templates/index.html

168 lines
4.8 KiB
HTML

<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/normalize/3.0.1/normalize.min.css" />
<style>
body {
width: 750px;
border: 1px solid #757575;
margin: 20px auto;
color: #757575; }
nav, footer {
background-color: #757575;
color: white;
height: 20px;
line-height: 20px;
padding: 5px; }
header h1 {
margin: .67em; }
main {
min-height: 300px; }
main table {
margin: 10px;
width: 730px; }
main table tbody {
border: 1px solid #757575; }
main table tr {
border-bottom: 1px solid #757575; }
main table tr th {
text-align: left;
padding: 20px;
font-size: 1.5em; }
main table tr td {
padding: 10px;
width: 30%; }
main table tr td + td {
width: 70%; }
footer {
text-align: center; }
</style>
<script type="application/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<!-- script type="application/javascript" src="/js/main.js"></script-->
<title>ifconfig.io</title>
</head>
<body>
<header>
<h1>What is my ip address? - <small>ifconfig.io</small></h1>
</header>
<nav></nav>
<main>
<table>
<thead>
<tr><th colspan="2">Your Connection</th></tr>
</thead>
<tfoot></tfoot>
<tbody>
<tr>
<td>IP Address</td><td>{{ .ip }}</td>
</tr>
<tr>
<td>Remote Host</td><td>{{ .host }}</td>
</tr>
<tr>
<td>User Agent</td><td>{{ .ua }}</td>
</tr>
<tr>
<td>Port</td><td>{{ .port }}</td>
</tr>
<tr>
<td>Language</td><td>{{ .lang }}</td>
</tr>
<tr>
<td>Referer</td><td>{{ .referer }}</td>
</tr>
<tr>
<td>Connection</td><td>{{ .connection }}</td>
</tr>
<tr>
<td>KeepAlive</td><td>{{ .keep_alive }}</td>
</tr>
<tr>
<td>Method</td><td>{{ .method }}</td>
</tr>
<tr>
<td>Encoding</td><td>{{ .encoding }}</td>
</tr>
<tr>
<td>MIME Type</td><td>{{ .mime_type }}</td>
</tr>
<tr>
<td>Charset</td><td>{{ .charset }}</td>
</tr>
<tr>
<td>Via</td><td>{{ .via }}</td>
</tr>
<tr>
<td>X-Forwarded-For</td><td>{{ .x_forwarded_for }}</td>
</tr>
</tbody>
</table>
<table>
<thead>
<tr>
<th colspan="2">Command Line Interface</th>
</tr>
</thead>
<tfoot></tfoot>
<tbody>
<tr>
<td>$ curl ifconfig.io</td><td>{{ .ip }}</td>
</tr>
<tr>
<td>$ curl ifconfig.io/ip</td><td>{{ .ip }}</td>
</tr>
<tr>
<td>$ curl ifconfig.io/host</td><td>{{ .host }}</td>
</tr>
<tr>
<td>$ curl ifconfig.io/ua</td><td>{{ .ua }}</td>
</tr>
<tr>
<td>$ curl ifconfig.io/port</td><td>{{ .port }}</td>
</tr>
<tr>
<td>$ curl ifconfig.io/lang</td><td>{{ .lang }}</td>
</tr>
<tr>
<td>$ curl ifconfig.io/keepalive</td><td>{{ .keep_alive }}</td>
</tr>
<tr>
<td>$ curl ifconfig.io/connection</td><td>{{ .connection }}</td>
</tr>
<tr>
<td>$ curl ifconfig.io/encoding</td><td>{{ .encoding }}</td>
</tr>
<tr>
<td>$ curl ifconfig.io/mime</td><td>{{ .mime_type }}</td>
</tr>
<tr>
<td>$ curl ifconfig.io/charset</td><td>{{ .charset }}</td>
</tr>
<tr>
<td>$ curl ifconfig.io/via</td><td>{{ .via }}</td>
</tr>
<tr>
<td>$ curl ifconfig.io/forwarded</td><td>{{ .x_forwarded_for }}</td>
</tr>
<tr>
<td>$ curl ifconfig.io/all</td><td>{{ .hash_as_yaml }}</td>
</tr>
<tr>
<td>$ curl ifconfig.io/all.xml</td><td>{{ .hash_as_xml }}</td>
</tr>
<tr>
<td>$ curl ifconfig.io/all.json</td><td>{{ .hash_as_json }}</td>
</tr>
</tbody>
</table>
</main>
<footer>&copy; 2014 ifconfig.io</footer>
</body>
</html>