mirror of
https://github.com/mpolden/echoip.git
synced 2025-04-18 23:55:38 +02:00
Rearrange columns
This commit is contained in:
parent
64bb0e56c7
commit
b3e0079aa4
36
index.html
36
index.html
@ -42,7 +42,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="pure-g">
|
<div class="pure-g">
|
||||||
<div class="pure-u-1 pure-u-md-1-2">
|
<div class="pure-u-1 pure-u-md-1-2">
|
||||||
<h2>CLI examples:</h2>
|
<h2>CLI examples</h2>
|
||||||
<pre>
|
<pre>
|
||||||
$ curl {{ .Host }}
|
$ curl {{ .Host }}
|
||||||
{{ .IP }}
|
{{ .IP }}
|
||||||
@ -59,7 +59,7 @@ $ fetch -qo- https://{{ .Host }}
|
|||||||
$ bat -print=b {{ .Host }}/ip
|
$ bat -print=b {{ .Host }}/ip
|
||||||
{{ .IP }}</pre>
|
{{ .IP }}</pre>
|
||||||
{{ if .IsLookupCountryEnabled }}
|
{{ if .IsLookupCountryEnabled }}
|
||||||
<h2>Country lookup:</h2>
|
<h2>Country lookup</h2>
|
||||||
<pre>
|
<pre>
|
||||||
$ http {{ .Host }}/country
|
$ http {{ .Host }}/country
|
||||||
{{ .Country }}
|
{{ .Country }}
|
||||||
@ -68,50 +68,50 @@ $ http {{ .Host }}/country-iso
|
|||||||
{{ .CountryISO }}</pre>
|
{{ .CountryISO }}</pre>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ if .IsLookupCityEnabled }}
|
{{ if .IsLookupCityEnabled }}
|
||||||
<h2>City lookup:</h2>
|
<h2>City lookup</h2>
|
||||||
<pre>
|
<pre>
|
||||||
$ http {{ .Host }}/city
|
$ http {{ .Host }}/city
|
||||||
{{ .City }}</pre>
|
{{ .City }}</pre>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
<div class="pure-u-1 pure-u-md-1-2">
|
<div class="pure-u-1 pure-u-md-1-2">
|
||||||
<h2>JSON output:</h2>
|
<h2>JSON output</h2>
|
||||||
<pre>
|
<pre>
|
||||||
$ http {{ .Host }}/json
|
$ http {{ .Host }}/json
|
||||||
{ {{ if .IsLookupCityEnabled }}
|
{ {{ if .IsLookupCityEnabled }}
|
||||||
"city": "{{ .City }}",
|
"city": "{{ .City }}",
|
||||||
"country": "{{ .Country }}",
|
"country": "{{ .Country }}",
|
||||||
"country_iso": "{{ .CountryISO }}",{{ end }}{{ if .IsLookupAddrEnabled }}
|
"country_iso": "{{ .CountryISO }}",{{ end }}{{ if .IsLookupAddrEnabled }}
|
||||||
"hostname": "{{ .Hostname }}",{{ end }}
|
"hostname": "{{ .Hostname }}",{{ end }}
|
||||||
"ip": "{{ .IP }}",
|
"ip": "{{ .IP }}",
|
||||||
"ip_decimal": {{ .IPDecimal }}
|
"ip_decimal": {{ .IPDecimal }}
|
||||||
}</pre>
|
}</pre>
|
||||||
|
|
||||||
<p>Setting the Accept header to application/json also works.</p>
|
<p>Setting the Accept header to application/json also works.</p>
|
||||||
<h2>Plain output:</h2>
|
<h2>Plain output</h2>
|
||||||
<p>Always returns the IP address including a trailing newline, regardless of user agent.</p>
|
<p>Always returns the IP address including a trailing newline, regardless of user agent.</p>
|
||||||
<pre>
|
<pre>
|
||||||
$ http {{ .Host }}/ip
|
$ http {{ .Host }}/ip
|
||||||
{{ .IP }}</pre>
|
{{ .IP }}</pre>
|
||||||
{{ if .IsLookupPortEnabled }}
|
{{ if .IsLookupPortEnabled }}
|
||||||
<h2>Testing port connectivity:</h2>
|
<h2>Port testing</h2>
|
||||||
<pre>
|
<pre>
|
||||||
$ http {{ .Host }}/port/8080
|
$ http {{ .Host }}/port/8080
|
||||||
{
|
{
|
||||||
"ip": "{{ .IP }}",
|
"ip": "{{ .IP }}",
|
||||||
"port": 8080,
|
"port": 8080,
|
||||||
"reachable": false
|
"reachable": false
|
||||||
}</pre>
|
}</pre>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
{{ if .IsLookupCountryEnabled }}{{ if ne .Country "Unknown"}}{{ if .IsLookupCityEnabled }}{{ if ne .City "Unknown"}}
|
{{ if .IsLookupCountryEnabled }}{{ if ne .Country "Unknown"}}{{ if .IsLookupCityEnabled }}{{ if ne .City "Unknown"}}
|
||||||
<div class="pure-u-1 pure-u-md-1-1">
|
<div class="pure-u-1 pure-u-md-1-2">
|
||||||
<h2>Map</h2>
|
<h2>Map</h2>
|
||||||
<p><img src="https://maps.googleapis.com/maps/api/staticmap?size=600x200&scale=2&markers=color%3Aorange%7Clabel%3AS%7c{{ .City }},{{ .Country }}" width="600" height="200"/>
|
<p><img src="https://maps.googleapis.com/maps/api/staticmap?size=500x166&scale=2&markers=color%3Aorange%7Clabel%3AS%7c{{ .City }},{{ .Country }}" width="500" height="166"/>
|
||||||
</p>
|
</p>
|
||||||
{{ end }}{{ end }}{{ end }}{{ end }}
|
{{ end }}{{ end }}{{ end }}{{ end }}
|
||||||
</div>
|
</div>
|
||||||
<div class="pure-u-1 pure-u-md-1-1">
|
<div class="pure-u-1 pure-u-md-1-2">
|
||||||
<h2>FAQ</h2>
|
<h2>FAQ</h2>
|
||||||
<h3>How do I force IPv4 or IPv6 lookup?</h3>
|
<h3>How do I force IPv4 or IPv6 lookup?</h3>
|
||||||
<p>IPv4 or IPv6 lookup can be forced by using the <a href="//v4.ifconfig.co">v4</a> and <a href="//v6.ifconfig.co">v6<a> subdomains.</p>
|
<p>IPv4 or IPv6 lookup can be forced by using the <a href="//v4.ifconfig.co">v4</a> and <a href="//v6.ifconfig.co">v6<a> subdomains.</p>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user