mirror of
https://github.com/mpolden/echoip.git
synced 2025-03-12 15:30:38 +01:00
Merge branch 'mpolden:master' into master
This commit is contained in:
commit
11fc656391
30
.github/workflows/ci.yml
vendored
Normal file
30
.github/workflows/ci.yml
vendored
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
name: ci
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [master]
|
||||||
|
pull_request:
|
||||||
|
branches: [master]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
||||||
|
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: install go
|
||||||
|
uses: actions/setup-go@v2
|
||||||
|
with:
|
||||||
|
go-version: 1.16
|
||||||
|
- name: build and test
|
||||||
|
run: make
|
||||||
|
- name: enable experimental docker features
|
||||||
|
if: ${{ github.ref == 'refs/heads/master' }}
|
||||||
|
run: |
|
||||||
|
echo '{"experimental":true}' | sudo tee /etc/docker/daemon.json
|
||||||
|
sudo service docker restart
|
||||||
|
- name: publish multi-arch docker image
|
||||||
|
if: ${{ github.ref == 'refs/heads/master' }}
|
||||||
|
run: make docker-pushx
|
23
.travis.yml
23
.travis.yml
@ -1,23 +0,0 @@
|
|||||||
dist: bionic
|
|
||||||
language: minimal
|
|
||||||
|
|
||||||
services:
|
|
||||||
- docker
|
|
||||||
|
|
||||||
env:
|
|
||||||
global:
|
|
||||||
- DOCKER_CLI_EXPERIMENTAL=enabled
|
|
||||||
|
|
||||||
before_install:
|
|
||||||
- echo '{"experimental":true}' | sudo tee /etc/docker/daemon.json
|
|
||||||
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
|
|
||||||
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
|
|
||||||
- sudo apt-get update
|
|
||||||
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
|
|
||||||
|
|
||||||
script:
|
|
||||||
- make docker-build
|
|
||||||
|
|
||||||
deploy:
|
|
||||||
- provider: script
|
|
||||||
script: make docker-push
|
|
@ -1,7 +1,8 @@
|
|||||||
# Build
|
# Build
|
||||||
FROM golang:1.13-buster AS build
|
FROM golang:1.15-buster AS build
|
||||||
WORKDIR /go/src/github.com/mpolden/echoip
|
WORKDIR /go/src/github.com/mpolden/echoip
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# Must build without cgo because libc is unavailable in runtime image
|
# Must build without cgo because libc is unavailable in runtime image
|
||||||
ENV GO111MODULE=on CGO_ENABLED=0
|
ENV GO111MODULE=on CGO_ENABLED=0
|
||||||
RUN make
|
RUN make
|
||||||
|
7
Makefile
7
Makefile
@ -57,7 +57,10 @@ docker-test:
|
|||||||
$(eval DOCKER_PORT=$(shell $(DOCKER) port $(CONTAINER) | cut -d ":" -f 2))
|
$(eval DOCKER_PORT=$(shell $(DOCKER) port $(CONTAINER) | cut -d ":" -f 2))
|
||||||
curl -fsS -m 5 localhost:$(DOCKER_PORT) > /dev/null; $(DOCKER) stop $(CONTAINER)
|
curl -fsS -m 5 localhost:$(DOCKER_PORT) > /dev/null; $(DOCKER) stop $(CONTAINER)
|
||||||
|
|
||||||
docker-push: docker-test docker-multiarch-builder docker-login
|
docker-push: docker-test docker-login
|
||||||
|
$(DOCKER) push $(DOCKER_IMAGE)
|
||||||
|
|
||||||
|
docker-pushx: docker-multiarch-builder docker-test docker-login
|
||||||
$(DOCKER) buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t $(DOCKER_IMAGE) --push .
|
$(DOCKER) buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t $(DOCKER_IMAGE) --push .
|
||||||
|
|
||||||
xinstall:
|
xinstall:
|
||||||
@ -71,4 +74,4 @@ endif
|
|||||||
@sha256sum $(GOPATH)/bin/$(XBIN)
|
@sha256sum $(GOPATH)/bin/$(XBIN)
|
||||||
|
|
||||||
run:
|
run:
|
||||||
go run cmd/echoip/main.go -a data/asn.mmdb -c data/city.mmdb -f data/country.mmdb -H x-forwarded-for -r -s
|
go run cmd/echoip/main.go -a data/asn.mmdb -c data/city.mmdb -f data/country.mmdb -H x-forwarded-for -r -s -p
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# echoip
|
# echoip
|
||||||
|
|
||||||
[](https://travis-ci.org/mpolden/echoip)
|

|
||||||
|
|
||||||
A simple service for looking up your IP address. This is the code that powers
|
A simple service for looking up your IP address. This is the code that powers
|
||||||
https://ifconfig.co.
|
https://ifconfig.co.
|
||||||
@ -93,9 +93,9 @@ between IPv4 and IPv6 lookup.
|
|||||||
## Building
|
## Building
|
||||||
|
|
||||||
Compiling requires the [Golang compiler](https://golang.org/) to be installed.
|
Compiling requires the [Golang compiler](https://golang.org/) to be installed.
|
||||||
This package can be installed with `go get`:
|
This package can be installed with:
|
||||||
|
|
||||||
`go get github.com/mpolden/echoip/...`
|
`go install github.com/mpolden/echoip/...@latest`
|
||||||
|
|
||||||
For more information on building a Go project, see the [official Go
|
For more information on building a Go project, see the [official Go
|
||||||
documentation](https://golang.org/doc/code.html).
|
documentation](https://golang.org/doc/code.html).
|
||||||
|
5
go.mod
5
go.mod
@ -2,4 +2,7 @@ module github.com/mpolden/echoip
|
|||||||
|
|
||||||
go 1.13
|
go 1.13
|
||||||
|
|
||||||
require github.com/oschwald/geoip2-golang v1.4.0
|
require (
|
||||||
|
github.com/oschwald/geoip2-golang v1.5.0
|
||||||
|
golang.org/x/sys v0.0.0-20210223212115-eede4237b368 // indirect
|
||||||
|
)
|
||||||
|
19
go.sum
19
go.sum
@ -1,17 +1,20 @@
|
|||||||
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
|
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
|
||||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
github.com/oschwald/geoip2-golang v1.4.0 h1:5RlrjCgRyIGDz/mBmPfnAF4h8k0IAcRv9PvrpOfz+Ug=
|
github.com/oschwald/geoip2-golang v1.5.0 h1:igg2yQIrrcRccB1ytFXqBfOHCjXWIoMv85lVJ1ONZzw=
|
||||||
github.com/oschwald/geoip2-golang v1.4.0/go.mod h1:8QwxJvRImBH+Zl6Aa6MaIcs5YdlZSTKtzmPGzQqi9ng=
|
github.com/oschwald/geoip2-golang v1.5.0/go.mod h1:xdvYt5xQzB8ORWFqPnqMwZpCpgNagttWdoZLlJQzg7s=
|
||||||
github.com/oschwald/maxminddb-golang v1.6.0 h1:KAJSjdHQ8Kv45nFIbtoLGrGWqHFajOIm7skTyz/+Dls=
|
github.com/oschwald/maxminddb-golang v1.8.0 h1:Uh/DSnGoxsyp/KYbY1AuP0tYEwfs0sCph9p/UMXK/Hk=
|
||||||
github.com/oschwald/maxminddb-golang v1.6.0/go.mod h1:DUJFucBg2cvqx42YmDa/+xHvb0elJtOm3o4aFQ/nb/w=
|
github.com/oschwald/maxminddb-golang v1.8.0/go.mod h1:RXZtst0N6+FY/3qCNmZMBApR19cdQj43/NM9VkrNAis=
|
||||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||||
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
|
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
|
||||||
|
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||||
golang.org/x/sys v0.0.0-20191224085550-c709ea063b76 h1:Dho5nD6R3PcW2SH1or8vS0dszDaXRxIw55lBX7XiE5g=
|
golang.org/x/sys v0.0.0-20191224085550-c709ea063b76 h1:Dho5nD6R3PcW2SH1or8vS0dszDaXRxIw55lBX7XiE5g=
|
||||||
golang.org/x/sys v0.0.0-20191224085550-c709ea063b76/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20191224085550-c709ea063b76/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20210223212115-eede4237b368 h1:fDE3p0qf2V1co1vfj3/o87Ps8Hq6QTGNxJ5Xe7xSp80=
|
||||||
|
golang.org/x/sys v0.0.0-20210223212115-eede4237b368/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
|
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
|
||||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
|
@ -74,11 +74,11 @@
|
|||||||
<h2>What do we know about this IP address?</h2>
|
<h2>What do we know about this IP address?</h2>
|
||||||
<table class="info-table">
|
<table class="info-table">
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">IP address</th>
|
<th scope="row">IP address</th>
|
||||||
<td>{{ .IP }}</td>
|
<td>{{ .IP }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">IP address (decimal)</th>
|
<th scope="row">IP address (decimal)</th>
|
||||||
<td>{{ .IPDecimal }}</td>
|
<td>{{ .IPDecimal }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{ if .Country }}
|
{{ if .Country }}
|
||||||
@ -103,7 +103,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
{{ end }} {{ if .RegionCode }}
|
{{ end }} {{ if .RegionCode }}
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Region code</th>
|
<th scope="row">Region code</th>
|
||||||
<td>{{ .RegionCode }}</td>
|
<td>{{ .RegionCode }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{ end }} {{ if .MetroCode }}
|
{{ end }} {{ if .MetroCode }}
|
||||||
@ -113,7 +113,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
{{ end }} {{ if .PostalCode }}
|
{{ end }} {{ if .PostalCode }}
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Postal code</th>
|
<th scope="row">Postal code</th>
|
||||||
<td>{{ .PostalCode }}</td>
|
<td>{{ .PostalCode }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{ end }} {{ if .City }}
|
{{ end }} {{ if .City }}
|
||||||
@ -153,17 +153,17 @@
|
|||||||
</tr>
|
</tr>
|
||||||
{{ end }} {{ if .UserAgent }} {{ if .UserAgent.Comment }}
|
{{ end }} {{ if .UserAgent }} {{ if .UserAgent.Comment }}
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">User agent</th>
|
<th scope="row">User agent</th>
|
||||||
<td>{{ .UserAgent.Product }}/{{ .UserAgent.Version }}</td>
|
<td>{{ .UserAgent.Product }}/{{ .UserAgent.Version }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{ end }} {{ if .UserAgent.Comment }}
|
{{ end }} {{ if .UserAgent.Comment }}
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">User agent: Comment</th>
|
<th scope="row">User agent: Comment</th>
|
||||||
<td>{{ .UserAgent.Comment }}</td>
|
<td>{{ .UserAgent.Comment }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{ end }} {{ if .UserAgent.RawValue }}
|
{{ end }} {{ if .UserAgent.RawValue }}
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">User agent: Raw</th>
|
<th scope="row">User agent: Raw</th>
|
||||||
<td>{{ .UserAgent.RawValue }}</td>
|
<td>{{ .UserAgent.RawValue }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{ end }} {{ end }}
|
{{ end }} {{ end }}
|
||||||
@ -200,52 +200,52 @@
|
|||||||
</p>
|
</p>
|
||||||
<div class="pure-form">
|
<div class="pure-form">
|
||||||
<!-- COMMAND WIDGET -->
|
<!-- COMMAND WIDGET -->
|
||||||
<div class="buttons">
|
<div class="input-buttons">
|
||||||
<button
|
<button
|
||||||
name="ip"
|
name="ip"
|
||||||
class="button widget-select"
|
class="pure-button widget-select"
|
||||||
onclick="changeInput(this.name, this)"
|
onclick="changeInput(this.name, this)"
|
||||||
>
|
>
|
||||||
ip
|
ip
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
name="country"
|
name="country"
|
||||||
class="button widget-select"
|
class="pure-button widget-select"
|
||||||
onclick="changeInput(this.name, this)"
|
onclick="changeInput(this.name, this)"
|
||||||
>
|
>
|
||||||
country
|
country
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
name="country-iso"
|
name="country-iso"
|
||||||
class="button widget-select"
|
class="pure-button widget-select"
|
||||||
onclick="changeInput(this.name, this)"
|
onclick="changeInput(this.name, this)"
|
||||||
>
|
>
|
||||||
country-iso
|
country-iso
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
name="city"
|
name="city"
|
||||||
class="button widget-select"
|
class="pure-button widget-select"
|
||||||
onclick="changeInput(this.name, this)"
|
onclick="changeInput(this.name, this)"
|
||||||
>
|
>
|
||||||
city
|
city
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
name="asn"
|
name="asn"
|
||||||
class="button widget-select"
|
class="pure-button widget-select"
|
||||||
onclick="changeInput(this.name, this)"
|
onclick="changeInput(this.name, this)"
|
||||||
>
|
>
|
||||||
asn
|
asn
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
name="json"
|
name="json"
|
||||||
class="button widget-select"
|
class="pure-button widget-select"
|
||||||
onclick="changeInput(this.name, this)"
|
onclick="changeInput(this.name, this)"
|
||||||
>
|
>
|
||||||
json
|
json
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
name="port"
|
name="port"
|
||||||
class="button widget-select"
|
class="pure-button widget-select"
|
||||||
onclick="changeInput(this.name, this)"
|
onclick="changeInput(this.name, this)"
|
||||||
>
|
>
|
||||||
port
|
port
|
||||||
@ -266,12 +266,13 @@
|
|||||||
</div>
|
</div>
|
||||||
<div id="output" class="widgetbox output"></div>
|
<div id="output" class="widgetbox output"></div>
|
||||||
|
|
||||||
<form class="pure-form">
|
<form class="pure-form input-buttons">
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<label for="ipCheckBox">
|
<label for="ipInput">
|
||||||
|
Check another IP (optional)
|
||||||
<input
|
<input
|
||||||
id="ipInput"
|
id="ipInput"
|
||||||
class="medium-input pure-input"
|
class=""
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="IP to query"
|
placeholder="IP to query"
|
||||||
onkeyup="updateIP(this.value)"
|
onkeyup="updateIP(this.value)"
|
||||||
|
@ -71,7 +71,6 @@
|
|||||||
function navigate(event) {
|
function navigate(event) {
|
||||||
console.log("navigate", compositePath)
|
console.log("navigate", compositePath)
|
||||||
window.location = compositePath
|
window.location = compositePath
|
||||||
event.preventDefault()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function updatePort(value) {
|
function updatePort(value) {
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
background: #f2f2f2;
|
background: #f2f2f2;
|
||||||
font-size: 36px;
|
font-size: 36px;
|
||||||
padding: 6px;
|
padding: 6px;
|
||||||
|
word-wrap: break-word;
|
||||||
}
|
}
|
||||||
svg.github-corner {
|
svg.github-corner {
|
||||||
fill: #151513;
|
fill: #151513;
|
||||||
@ -52,12 +53,12 @@
|
|||||||
.info-table th {
|
.info-table th {
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
border: 2px solid #ababab;
|
border: 2px solid #ababab;
|
||||||
|
word-wrap: break-word;
|
||||||
}
|
}
|
||||||
|
|
||||||
.info-table th[scope="row"] {
|
.info-table th[scope="row"] {
|
||||||
background-color: #d5d5d5;
|
background-color: #d5d5d5;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
white-space: nowrap;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.widgetbox {
|
.widgetbox {
|
||||||
@ -88,11 +89,6 @@
|
|||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
.narrow-input {
|
|
||||||
width: 5.5em;
|
|
||||||
margin-top: 0.2em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.medium-input {
|
.medium-input {
|
||||||
width: 10em;
|
width: 10em;
|
||||||
}
|
}
|
||||||
@ -101,6 +97,11 @@
|
|||||||
background-color: rgb(208 208 208);
|
background-color: rgb(208 208 208);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.input-buttons {
|
||||||
|
line-height: 2.6em;
|
||||||
|
font-size: smaller;
|
||||||
|
}
|
||||||
|
|
||||||
/* POST CORRECTION */
|
/* POST CORRECTION */
|
||||||
.leafcloud-logo .letters {
|
.leafcloud-logo .letters {
|
||||||
fill: black;
|
fill: black;
|
||||||
@ -113,7 +114,6 @@
|
|||||||
a {
|
a {
|
||||||
background-color: #161719;
|
background-color: #161719;
|
||||||
color: #d8d9da;
|
color: #d8d9da;
|
||||||
/* text-decoration: underline; */
|
|
||||||
}
|
}
|
||||||
.ip {
|
.ip {
|
||||||
border: 1px solid #313233;
|
border: 1px solid #313233;
|
||||||
@ -137,13 +137,13 @@
|
|||||||
background-color: #2e2e2e;
|
background-color: #2e2e2e;
|
||||||
color: rgb(220, 220, 220);
|
color: rgb(220, 220, 220);
|
||||||
text-align: left;
|
text-align: left;
|
||||||
white-space: nowrap;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
button {
|
.pure-button {
|
||||||
background-color: #2e2e2e;
|
background-color: #2e2e2e;
|
||||||
|
color: rgb(220, 220, 220);
|
||||||
}
|
}
|
||||||
button.selected {
|
.pure-button.selected {
|
||||||
background-color: rgb(125 125 125);
|
background-color: rgb(125 125 125);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -370,7 +370,7 @@ func NotFoundHandler(w http.ResponseWriter, r *http.Request) *appError {
|
|||||||
func cliMatcher(r *http.Request) bool {
|
func cliMatcher(r *http.Request) bool {
|
||||||
ua := useragent.Parse(r.UserAgent())
|
ua := useragent.Parse(r.UserAgent())
|
||||||
switch ua.Product {
|
switch ua.Product {
|
||||||
case "curl", "HTTPie", "httpie-go", "Wget", "fetch libfetch", "Go", "Go-http-client", "ddclient", "Mikrotik":
|
case "curl", "HTTPie", "httpie-go", "Wget", "fetch libfetch", "Go", "Go-http-client", "ddclient", "Mikrotik", "xh":
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
|
Loading…
x
Reference in New Issue
Block a user