3967e5fdb7
Initial public release
84 lines
2.4 KiB
Smarty
84 lines
2.4 KiB
Smarty
{{- /*gotype: r00t2.io/clientinfo/server.Page*/ -}}
|
|
{{- define "meta.info" -}}
|
|
{{- $page := . -}}
|
|
{{- $linkico := "🔗" }}
|
|
<h2 id="client">Client/Browser Information<a href="#client">{{ $linkico }}</a></h2>
|
|
<p>
|
|
<b>Your IP Address is <i><a href="https://ipinfo.io/{{ $page.Info.IP.String }}">{{ $page.Info.IP.String }}</a></i>.</b>
|
|
<br/>
|
|
<i>You are connecting with port <b>{{ $page.Info.Port }}</b> outbound.</i>
|
|
</p>
|
|
{{- if $page.Raw }}
|
|
<h3 id="client_raw">Raw Block ({{ $page.RawFmt }})<a href="#client_raw">{{ $linkico }}</a></h3>
|
|
<p>
|
|
{{- if $page.DoIndent }}
|
|
<pre>{{ $page.Raw }}</pre>
|
|
{{- else }}
|
|
<code>{{ $page.Raw }}</code>
|
|
{{- end }}
|
|
</p>
|
|
{{- end }}
|
|
<h3 id="client_ua">User Agent Information<a href="#client_ua">{{ $linkico }}</a></h3>
|
|
<p>This is information that your browser sends to identify itself.</p>
|
|
{{- range $idx, $ua := $page.Info.Client }}
|
|
<p>
|
|
User Agent ({{ $idx }}):
|
|
<div class="tg-wrap">
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Identifier</th>
|
|
<th>Value</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{{- $flds := $ua.ToMap }}
|
|
{{- range $fld, $str := $flds }}
|
|
<tr>
|
|
<td>{{ $fld }}</td>
|
|
<td>{{ $str }}</td>
|
|
</tr>
|
|
{{- end }}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{{- /*
|
|
<ul>
|
|
|
|
{{- $flds := $ua.ToMap }}
|
|
{{- range $fld, $str := $flds }}
|
|
<li><b>{{ $fld }}:</b> {{ $str }}</li>
|
|
{{- end }}
|
|
</ul>
|
|
*/}}
|
|
</p>
|
|
{{- end }}
|
|
<h3 id="client_hdrs">Request Headers<a href="#client_hdrs">{{ $linkico }}</a></h3>
|
|
<p>
|
|
These are headers sent along with the request your browser sends for the page's content.
|
|
Note that some headers may have multiple values.
|
|
</p>
|
|
<p>
|
|
<div class="tg-wrap">
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Header</th>
|
|
<th>Value</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{{- range $hdrNm, $hdrVals := $page.Info.Req.Header }}
|
|
<tr>
|
|
{{- range $val := $hdrVals }}
|
|
<td>{{ $hdrNm }}</td>
|
|
<td>{{ $val }}</td>
|
|
{{- end }}
|
|
</tr>
|
|
{{- end }}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</p>
|
|
{{- end }}
|