2012-11-19 19:50:32 +01:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<title>What is my IP address — ifconfig.co</title>
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
<meta name="description" content="Lookup my IP address">
|
2012-11-27 10:59:01 +01:00
|
|
|
<link href="//fonts.googleapis.com/css?family=Oswald" rel="stylesheet">
|
2012-12-12 21:27:57 +01:00
|
|
|
<link href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.2.2/css/bootstrap.min.css" rel="stylesheet">
|
2012-11-21 14:04:43 +01:00
|
|
|
<style>
|
2012-11-25 13:30:39 +01:00
|
|
|
body {
|
|
|
|
font-family: "Oswald", sans-serif;
|
2012-11-21 14:04:43 +01:00
|
|
|
}
|
2012-11-25 13:30:39 +01:00
|
|
|
.response {
|
|
|
|
font-family: "Monaco", "Menlo", "Consolas", "Courier New", monospace;
|
|
|
|
font-size: 12px;
|
2012-11-21 14:04:43 +01:00
|
|
|
}
|
|
|
|
#wrapper {
|
|
|
|
margin: 0 auto;
|
|
|
|
text-align: center;
|
|
|
|
}
|
|
|
|
</style>
|
2012-11-19 19:50:32 +01:00
|
|
|
</head>
|
|
|
|
<body>
|
2012-11-25 13:30:39 +01:00
|
|
|
<div class="container">
|
|
|
|
<div class="row">
|
|
|
|
<div id="wrapper">
|
|
|
|
<h1>What is my IP address?</h1>
|
|
|
|
<p>Your IP address is:</p>
|
|
|
|
<h2>{{ .IP }}</h2>
|
2012-11-25 21:13:06 +01:00
|
|
|
<select id="select-command">
|
|
|
|
<option value="curl">curl</option>
|
|
|
|
<option value="wget -qO -">wget</option>
|
|
|
|
<option value="fetch -qo -">fetch</option>
|
|
|
|
</select>
|
2012-11-25 13:30:39 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="span12">
|
|
|
|
<table class="table table-bordered table-striped">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th class="span4">Command</th>
|
|
|
|
<th>Response</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<tr>
|
2012-11-25 21:13:06 +01:00
|
|
|
<td><code><span class="command">curl</span> ifconfig.co</code></td>
|
2012-11-25 13:30:39 +01:00
|
|
|
<td class="response">{{ .IP }}</td>
|
|
|
|
</tr>
|
|
|
|
{{ if $self := . }}
|
|
|
|
{{ range $key, $value := .Header }}
|
|
|
|
<tr>
|
2012-11-25 21:13:06 +01:00
|
|
|
<td><code><span class="command">curl</span> ifconfig.co/{{ ToLower $key }}</code></td>
|
2012-11-25 22:13:32 +01:00
|
|
|
<td class="response">{{ index $self.Header $key 0 }}</td>
|
2012-11-25 13:30:39 +01:00
|
|
|
</tr>
|
|
|
|
{{end}}
|
|
|
|
{{end}}
|
2013-05-10 14:59:01 +02:00
|
|
|
<td><code><span class="command">curl</span> ifconfig.co/all.json</code></td>
|
2012-11-25 22:43:01 +01:00
|
|
|
<td><pre class="response">{{ .JSON }}</pre></td>
|
2012-11-25 13:30:39 +01:00
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
2012-11-21 14:04:43 +01:00
|
|
|
</div>
|
2012-11-25 14:15:35 +01:00
|
|
|
<a href="https://github.com/martinp/ifconfig"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub"></a>
|
2012-12-12 21:27:57 +01:00
|
|
|
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
|
2012-11-25 21:13:06 +01:00
|
|
|
<script src="/assets/js/cmd.min.js"></script>
|
2012-11-19 19:50:32 +01:00
|
|
|
</body>
|
|
|
|
</html>
|