branded, added multi-arch docker build action
This commit is contained in:
29
.github/workflows/build-publish.yml
vendored
Normal file
29
.github/workflows/build-publish.yml
vendored
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
name: ci
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: ["master"]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
docker:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v3
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
- name: Login to Docker Hub
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
- name: Build and push
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
clubvpn/ifconfig.io:latest
|
||||||
33
Dockerfile
33
Dockerfile
@@ -1,38 +1,37 @@
|
|||||||
FROM golang:alpine AS builder
|
FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:alpine as builder
|
||||||
|
|
||||||
# Set necessary environmet variables needed for our image
|
ARG TARGETPLATFORM
|
||||||
ENV GO111MODULE=on \
|
ARG BUILDPLATFORM
|
||||||
CGO_ENABLED=0 \
|
ARG TARGETOS
|
||||||
GOOS=linux \
|
ARG TARGETARCH
|
||||||
GOARCH=amd64
|
|
||||||
|
|
||||||
|
ENV CGO_ENABLED=0
|
||||||
|
ENV GO111MODULE=on
|
||||||
|
|
||||||
# Move to working directory /build
|
|
||||||
WORKDIR /build
|
WORKDIR /build
|
||||||
|
|
||||||
# Copy and download dependency using go mod
|
# Cache the download before continuing
|
||||||
COPY go.mod .
|
COPY go.mod .
|
||||||
COPY go.sum .
|
COPY go.sum .
|
||||||
RUN go mod download
|
RUN go mod download
|
||||||
|
|
||||||
# Copy the code into the container
|
|
||||||
COPY main.go .
|
COPY main.go .
|
||||||
|
|
||||||
# Build the application
|
RUN CGO_ENABLED=${CGO_ENABLED} GOOS=${TARGETOS} GOARCH=${TARGETARCH} \
|
||||||
RUN go build -tags=jsoniter -o main .
|
go build -tags=jsoniter -o main .
|
||||||
|
|
||||||
# Move to /dist directory as the place for resulting binary folder
|
|
||||||
WORKDIR /dist
|
WORKDIR /dist
|
||||||
|
|
||||||
# Copy binary from build to main folder
|
|
||||||
RUN cp /build/main .
|
RUN cp /build/main .
|
||||||
|
|
||||||
# Build a small image
|
FROM --platform=${BUILDPLATFORM:-linux/amd64} gcr.io/distroless/static:nonroot
|
||||||
FROM scratch AS production
|
|
||||||
|
|
||||||
|
WORKDIR /
|
||||||
COPY --from=builder /dist/main /
|
COPY --from=builder /dist/main /
|
||||||
COPY ./templates /templates
|
COPY ./templates /templates
|
||||||
COPY ./LICENSE /LICENSE
|
COPY ./LICENSE /LICENSE
|
||||||
|
|
||||||
# Command to run
|
USER nonroot:nonroot
|
||||||
ENTRYPOINT ["/main"]
|
|
||||||
|
|
||||||
|
CMD ["/main"]
|
||||||
@@ -1,13 +1,262 @@
|
|||||||
<!doctype html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
<style>
|
<style>
|
||||||
/* Parts of bootstrap 3.2.0 used on this page. */
|
/* Parts of bootstrap 3.2.0 used on this page. */
|
||||||
body{margin:0}footer,header,main,nav{display:block}a{background:0 0}a:active,a:hover{outline:0}small{font-size:80%}@media print{*{color:#000!important;text-shadow:none!important;background:0 0!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}p{orphans:3;widows:3}}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}a{color:#428bca;text-decoration:none}a:focus,a:hover{color:#2a6496;text-decoration:underline}a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.h1,h4{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 small{font-weight:400;line-height:1;color:#777}.h1{margin-top:20px;margin-bottom:10px}.h1 small{font-size:65%}h4{margin-top:10px;margin-bottom:10px}.h1{font-size:36px}h4{font-size:18px}p{margin:0 0 10px}small{font-size:85%}.text-center{text-align:center}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ul{margin-top:0;margin-bottom:10px}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.col-sm-3,.col-sm-4,.col-sm-8,.col-sm-9{position:relative;min-height:1px;padding-right:15px;padding-left:15px}@media (min-width:768px){.col-sm-3,.col-sm-4,.col-sm-8,.col-sm-9{float:left}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group{margin-bottom:0}.panel>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.container:after,.container:before{display:table;content:" "}.container:after{clear:both}
|
body {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
footer,
|
||||||
|
header,
|
||||||
|
main,
|
||||||
|
nav {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
a {
|
||||||
|
background: 0 0;
|
||||||
|
}
|
||||||
|
a:active,
|
||||||
|
a:hover {
|
||||||
|
outline: 0;
|
||||||
|
}
|
||||||
|
small {
|
||||||
|
font-size: 80%;
|
||||||
|
}
|
||||||
|
@media print {
|
||||||
|
* {
|
||||||
|
color: #000 !important;
|
||||||
|
text-shadow: none !important;
|
||||||
|
background: 0 0 !important;
|
||||||
|
-webkit-box-shadow: none !important;
|
||||||
|
box-shadow: none !important;
|
||||||
|
}
|
||||||
|
a,
|
||||||
|
a:visited {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
a[href]:after {
|
||||||
|
content: " (" attr(href) ")";
|
||||||
|
}
|
||||||
|
p {
|
||||||
|
orphans: 3;
|
||||||
|
widows: 3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
* {
|
||||||
|
-webkit-box-sizing: border-box;
|
||||||
|
-moz-box-sizing: border-box;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
:after,
|
||||||
|
:before {
|
||||||
|
-webkit-box-sizing: border-box;
|
||||||
|
-moz-box-sizing: border-box;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 1.42857143;
|
||||||
|
color: #333;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
a {
|
||||||
|
color: #428bca;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
a:focus,
|
||||||
|
a:hover {
|
||||||
|
color: #2a6496;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
a:focus {
|
||||||
|
outline: thin dotted;
|
||||||
|
outline: 5px auto -webkit-focus-ring-color;
|
||||||
|
outline-offset: -2px;
|
||||||
|
}
|
||||||
|
.h1,
|
||||||
|
h4 {
|
||||||
|
font-family: inherit;
|
||||||
|
font-weight: 500;
|
||||||
|
line-height: 1.1;
|
||||||
|
color: inherit;
|
||||||
|
}
|
||||||
|
.h1 small {
|
||||||
|
font-weight: 400;
|
||||||
|
line-height: 1;
|
||||||
|
color: #777;
|
||||||
|
}
|
||||||
|
.h1 {
|
||||||
|
margin-top: 20px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
.h1 small {
|
||||||
|
font-size: 65%;
|
||||||
|
}
|
||||||
|
h4 {
|
||||||
|
margin-top: 10px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
.h1 {
|
||||||
|
font-size: 36px;
|
||||||
|
}
|
||||||
|
h4 {
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
p {
|
||||||
|
margin: 0 0 10px;
|
||||||
|
}
|
||||||
|
small {
|
||||||
|
font-size: 85%;
|
||||||
|
}
|
||||||
|
.text-center {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.page-header {
|
||||||
|
padding-bottom: 9px;
|
||||||
|
margin: 40px 0 20px;
|
||||||
|
border-bottom: 1px solid #eee;
|
||||||
|
}
|
||||||
|
ul {
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
.container {
|
||||||
|
padding-right: 15px;
|
||||||
|
padding-left: 15px;
|
||||||
|
margin-right: auto;
|
||||||
|
margin-left: auto;
|
||||||
|
}
|
||||||
|
@media (min-width: 768px) {
|
||||||
|
.container {
|
||||||
|
width: 750px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media (min-width: 992px) {
|
||||||
|
.container {
|
||||||
|
width: 970px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media (min-width: 1200px) {
|
||||||
|
.container {
|
||||||
|
width: 1170px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.col-sm-3,
|
||||||
|
.col-sm-4,
|
||||||
|
.col-sm-8,
|
||||||
|
.col-sm-9 {
|
||||||
|
position: relative;
|
||||||
|
min-height: 1px;
|
||||||
|
padding-right: 15px;
|
||||||
|
padding-left: 15px;
|
||||||
|
}
|
||||||
|
@media (min-width: 768px) {
|
||||||
|
.col-sm-3,
|
||||||
|
.col-sm-4,
|
||||||
|
.col-sm-8,
|
||||||
|
.col-sm-9 {
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
.col-sm-9 {
|
||||||
|
width: 75%;
|
||||||
|
}
|
||||||
|
.col-sm-8 {
|
||||||
|
width: 66.66666667%;
|
||||||
|
}
|
||||||
|
.col-sm-4 {
|
||||||
|
width: 33.33333333%;
|
||||||
|
}
|
||||||
|
.col-sm-3 {
|
||||||
|
width: 25%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.list-group {
|
||||||
|
padding-left: 0;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
.list-group-item {
|
||||||
|
position: relative;
|
||||||
|
display: block;
|
||||||
|
padding: 10px 15px;
|
||||||
|
margin-bottom: -1px;
|
||||||
|
background-color: #fff;
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
}
|
||||||
|
.list-group-item:first-child {
|
||||||
|
border-top-left-radius: 4px;
|
||||||
|
border-top-right-radius: 4px;
|
||||||
|
}
|
||||||
|
.list-group-item:last-child {
|
||||||
|
margin-bottom: 0;
|
||||||
|
border-bottom-right-radius: 4px;
|
||||||
|
border-bottom-left-radius: 4px;
|
||||||
|
}
|
||||||
|
.panel {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
background-color: #fff;
|
||||||
|
border: 1px solid transparent;
|
||||||
|
border-radius: 4px;
|
||||||
|
-webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
|
||||||
|
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
|
||||||
|
}
|
||||||
|
.panel-heading {
|
||||||
|
padding: 10px 15px;
|
||||||
|
border-bottom: 1px solid transparent;
|
||||||
|
border-top-left-radius: 3px;
|
||||||
|
border-top-right-radius: 3px;
|
||||||
|
}
|
||||||
|
.panel > .list-group {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
.panel > .list-group .list-group-item {
|
||||||
|
border-width: 1px 0;
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
.panel > .list-group:last-child .list-group-item:last-child {
|
||||||
|
border-bottom: 0;
|
||||||
|
border-bottom-right-radius: 3px;
|
||||||
|
border-bottom-left-radius: 3px;
|
||||||
|
}
|
||||||
|
.panel-heading + .list-group .list-group-item:first-child {
|
||||||
|
border-top-width: 0;
|
||||||
|
}
|
||||||
|
.panel-default {
|
||||||
|
border-color: #ddd;
|
||||||
|
}
|
||||||
|
.panel-default > .panel-heading {
|
||||||
|
color: #333;
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
border-color: #ddd;
|
||||||
|
}
|
||||||
|
.container:after,
|
||||||
|
.container:before {
|
||||||
|
display: table;
|
||||||
|
content: " ";
|
||||||
|
}
|
||||||
|
.container:after {
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
/* Customizations. */
|
/* Customizations. */
|
||||||
li.list-group-item{overflow:auto;padding-top:6px;padding-bottom:6px;}header.page-header{margin-top:20px;}a.h1{color:inherit;text-decoration:none;}@media(max-width: 750px){div.col-sm-3{font-weight:700;}}
|
li.list-group-item {
|
||||||
|
overflow: auto;
|
||||||
|
padding-top: 6px;
|
||||||
|
padding-bottom: 6px;
|
||||||
|
}
|
||||||
|
header.page-header {
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
a.h1 {
|
||||||
|
color: inherit;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
@media (max-width: 750px) {
|
||||||
|
div.col-sm-3 {
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.unselectable {
|
.unselectable {
|
||||||
-webkit-touch-callout: none;
|
-webkit-touch-callout: none;
|
||||||
@@ -16,7 +265,7 @@
|
|||||||
-moz-user-select: none;
|
-moz-user-select: none;
|
||||||
-ms-user-select: none;
|
-ms-user-select: none;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
color: #555555
|
color: #555555;
|
||||||
}
|
}
|
||||||
|
|
||||||
.popup {
|
.popup {
|
||||||
@@ -52,108 +301,209 @@
|
|||||||
</div>
|
</div>
|
||||||
<ul class="list-group">
|
<ul class="list-group">
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
<div class="col-sm-3">IP Address</div><div class="col-sm-9">{{ .ip }}</div>
|
<div class="col-sm-3">IP Address</div>
|
||||||
|
<div class="col-sm-9">{{ .ip }}</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
<div class="col-sm-3">Remote Host</div><div class="col-sm-9">{{ .host }}</div>
|
<div class="col-sm-3">Remote Host</div>
|
||||||
|
<div class="col-sm-9">{{ .host }}</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
<div class="col-sm-3">Country Code</div><div class="col-sm-9">{{ .country_code }}</div>
|
<div class="col-sm-3">Country Code</div>
|
||||||
|
<div class="col-sm-9">{{ .country_code }}</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
<div class="col-sm-3">User Agent</div><div class="col-sm-9">{{ .ua }}</div>
|
<div class="col-sm-3">User Agent</div>
|
||||||
|
<div class="col-sm-9">{{ .ua }}</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
<div class="col-sm-3">Port</div><div class="col-sm-9">{{ .port }}</div>
|
<div class="col-sm-3">Port</div>
|
||||||
|
<div class="col-sm-9">{{ .port }}</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
<div class="col-sm-3">Language</div><div class="col-sm-9">{{ .lang }}</div>
|
<div class="col-sm-3">Language</div>
|
||||||
|
<div class="col-sm-9">{{ .lang }}</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
<div class="col-sm-3">Referer</div><div class="col-sm-9">{{ .referer }}</div>
|
<div class="col-sm-3">Referer</div>
|
||||||
|
<div class="col-sm-9">{{ .referer }}</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
<div class="col-sm-3">Method</div><div class="col-sm-9">{{ .method }}</div>
|
<div class="col-sm-3">Method</div>
|
||||||
|
<div class="col-sm-9">{{ .method }}</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
<div class="col-sm-3">Encoding</div><div class="col-sm-9">{{ .encoding }}</div>
|
<div class="col-sm-3">Encoding</div>
|
||||||
|
<div class="col-sm-9">{{ .encoding }}</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
<div class="col-sm-3">MIME Type</div><div class="col-sm-9">{{ .mime }}</div>
|
<div class="col-sm-3">MIME Type</div>
|
||||||
|
<div class="col-sm-9">{{ .mime }}</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
<div class="col-sm-3">X-Forwarded-For</div><div class="col-sm-9">{{ .forwarded }}</div>
|
<div class="col-sm-3">X-Forwarded-For</div>
|
||||||
|
<div class="col-sm-9">{{ .forwarded }}</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
<h4>Simple cURL API! </h4>
|
<h4>Simple cURL API!</h4>
|
||||||
</div>
|
</div>
|
||||||
<ul class="list-group">
|
<ul class="list-group">
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
<div class="col-sm-4" id="direct_curl"><span class="unselectable">$ </span><span class="copy_text">curl {{ .ifconfig_cmd_hostname }}</span></div><div class="col-sm-8">{{ .ip }}</div>
|
<div class="col-sm-4" id="direct_curl">
|
||||||
|
<span class="unselectable">$ </span
|
||||||
|
><span class="copy_text">curl {{ .ifconfig_cmd_hostname }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-8">{{ .ip }}</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
<div class="col-sm-4" id="ip_curl"><span class="unselectable">$ </span><span class="copy_text">curl {{ .ifconfig_cmd_hostname }}/ip</span></div><div class="col-sm-8">{{ .ip }}</div>
|
<div class="col-sm-4" id="ip_curl">
|
||||||
|
<span class="unselectable">$ </span
|
||||||
|
><span class="copy_text"
|
||||||
|
>curl {{ .ifconfig_cmd_hostname }}/ip</span
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-8">{{ .ip }}</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
<div class="col-sm-4" id="host_curl"><span class="unselectable">$ </span><span class="copy_text">curl {{ .ifconfig_cmd_hostname }}/host</span></div><div class="col-sm-8">{{ .host }}</div>
|
<div class="col-sm-4" id="host_curl">
|
||||||
|
<span class="unselectable">$ </span
|
||||||
|
><span class="copy_text"
|
||||||
|
>curl {{ .ifconfig_cmd_hostname }}/host</span
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-8">{{ .host }}</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
<div class="col-sm-4" id="country_code_curl"><span class="unselectable">$ </span><span class="copy_text">curl {{ .ifconfig_cmd_hostname }}/country_code</span></div><div class="col-sm-8">{{ .country_code }}</div>
|
<div class="col-sm-4" id="country_code_curl">
|
||||||
|
<span class="unselectable">$ </span
|
||||||
|
><span class="copy_text"
|
||||||
|
>curl {{ .ifconfig_cmd_hostname }}/country_code</span
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-8">{{ .country_code }}</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
<div class="col-sm-4" id="ua_curl"><span class="unselectable">$ </span><span class="copy_text">curl {{ .ifconfig_cmd_hostname }}/ua</span></div><div class="col-sm-8">{{ .ua }}</div>
|
<div class="col-sm-4" id="ua_curl">
|
||||||
|
<span class="unselectable">$ </span
|
||||||
|
><span class="copy_text"
|
||||||
|
>curl {{ .ifconfig_cmd_hostname }}/ua</span
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-8">{{ .ua }}</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
<div class="col-sm-4" id="port_curl"><span class="unselectable">$ </span><span class="copy_text">curl {{ .ifconfig_cmd_hostname }}/port</span></div><div class="col-sm-8">{{ .port }}</div>
|
<div class="col-sm-4" id="port_curl">
|
||||||
|
<span class="unselectable">$ </span
|
||||||
|
><span class="copy_text"
|
||||||
|
>curl {{ .ifconfig_cmd_hostname }}/port</span
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-8">{{ .port }}</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
<div class="col-sm-4" id="lang_curl"><span class="unselectable">$ </span><span class="copy_text">curl {{ .ifconfig_cmd_hostname }}/lang</span></div><div class="col-sm-8">{{ .lang }}</div>
|
<div class="col-sm-4" id="lang_curl">
|
||||||
|
<span class="unselectable">$ </span
|
||||||
|
><span class="copy_text"
|
||||||
|
>curl {{ .ifconfig_cmd_hostname }}/lang</span
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-8">{{ .lang }}</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
<div class="col-sm-4" id="encoding_curl"><span class="unselectable">$ </span><span class="copy_text">curl {{ .ifconfig_cmd_hostname }}/encoding</span></div><div class="col-sm-8">{{ .encoding }}</div>
|
<div class="col-sm-4" id="encoding_curl">
|
||||||
|
<span class="unselectable">$ </span
|
||||||
|
><span class="copy_text"
|
||||||
|
>curl {{ .ifconfig_cmd_hostname }}/encoding</span
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-8">{{ .encoding }}</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
<div class="col-sm-4" id="mime_curl"><span class="unselectable">$ </span><span class="copy_text">curl {{ .ifconfig_cmd_hostname }}/mime</span></div><div class="col-sm-8">{{ .mime }}</div>
|
<div class="col-sm-4" id="mime_curl">
|
||||||
|
<span class="unselectable">$ </span
|
||||||
|
><span class="copy_text"
|
||||||
|
>curl {{ .ifconfig_cmd_hostname }}/mime</span
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-8">{{ .mime }}</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
<div class="col-sm-4" id="forwarded_curl"><span class="unselectable">$ </span><span class="copy_text">curl {{ .ifconfig_cmd_hostname }}/forwarded</span></div><div class="col-sm-8">{{ .forwarded }}</div>
|
<div class="col-sm-4" id="forwarded_curl">
|
||||||
|
<span class="unselectable">$ </span
|
||||||
|
><span class="copy_text"
|
||||||
|
>curl {{ .ifconfig_cmd_hostname }}/forwarded</span
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-8">{{ .forwarded }}</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
<div class="col-sm-4" id="all_curl"><span class="unselectable">$ </span><span class="copy_text">curl {{ .ifconfig_cmd_hostname }}/all</span></div><div class="col-sm-8">{{ .hash_as_yaml }}</div>
|
<div class="col-sm-4" id="all_curl">
|
||||||
|
<span class="unselectable">$ </span
|
||||||
|
><span class="copy_text"
|
||||||
|
>curl {{ .ifconfig_cmd_hostname }}/all</span
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-8">{{ .hash_as_yaml }}</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
<div class="col-sm-4" id="all.xml_curl"><span class="unselectable">$ </span><span class="copy_text">curl {{ .ifconfig_cmd_hostname }}/all.xml</span></div><div class="col-sm-8">{{ .hash_as_xml }}</div>
|
<div class="col-sm-4" id="all.xml_curl">
|
||||||
|
<span class="unselectable">$ </span
|
||||||
|
><span class="copy_text"
|
||||||
|
>curl {{ .ifconfig_cmd_hostname }}/all.xml</span
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-8">{{ .hash_as_xml }}</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
<div class="col-sm-4" id="all.json_curl"><span class="unselectable">$ </span><span class="copy_text">curl {{ .ifconfig_cmd_hostname }}/all.json</span></div><div class="col-sm-8">{{ .hash_as_json }}</div>
|
<div class="col-sm-4" id="all.json_curl">
|
||||||
|
<span class="unselectable">$ </span
|
||||||
|
><span class="copy_text"
|
||||||
|
>curl {{ .ifconfig_cmd_hostname }}/all.json</span
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-8">{{ .hash_as_json }}</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
<div class="col-sm-4" id="all.js_curl"><span class="unselectable">$ </span><span class="copy_text">curl {{ .ifconfig_cmd_hostname }}/all.js</span></div><div class="col-sm-8">{{ .hash_as_js }}</div>
|
<div class="col-sm-4" id="all.js_curl">
|
||||||
|
<span class="unselectable">$ </span
|
||||||
|
><span class="copy_text"
|
||||||
|
>curl {{ .ifconfig_cmd_hostname }}/all.js</span
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-8">{{ .hash_as_js }}</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
<footer class="container text-center">
|
<footer class="container text-center">
|
||||||
<p>© 2014 - 2024 ifconfig.io</p>
|
<p>© 2014 - 2024 {{ .ifconfig_hostname }}</p>
|
||||||
</footer>
|
</footer>
|
||||||
<script>
|
<script>
|
||||||
function copyText(event) {
|
function copyText(event) {
|
||||||
let popup = document.getElementById("popup");
|
let popup = document.getElementById("popup");
|
||||||
popup.style.display = 'block';
|
popup.style.display = "block";
|
||||||
popup.style.left = `${event.x-35}px`;
|
popup.style.left = `${event.x - 35}px`;
|
||||||
popup.style.top = `${event.y-17-30}px`;
|
popup.style.top = `${event.y - 17 - 30}px`;
|
||||||
|
|
||||||
setTimeout(function() {
|
setTimeout(function () {
|
||||||
popup.style.display = 'none';
|
popup.style.display = "none";
|
||||||
}, 2000);
|
}, 2000);
|
||||||
|
|
||||||
navigator.clipboard.writeText(event.srcElement.textContent);
|
navigator.clipboard.writeText(event.srcElement.textContent);
|
||||||
}
|
}
|
||||||
Array.prototype.forEach.call(document.getElementsByClassName("copy_text") , (element) => {element.addEventListener("click", function(event) {copyText(event);event.preventDefault();});});
|
Array.prototype.forEach.call(
|
||||||
|
document.getElementsByClassName("copy_text"),
|
||||||
|
(element) => {
|
||||||
|
element.addEventListener("click", function (event) {
|
||||||
|
copyText(event);
|
||||||
|
event.preventDefault();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
);
|
||||||
</script>
|
</script>
|
||||||
<!-- Hello World -->
|
<!-- Hello World -->
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user