mirror of
https://github.com/dcarrillo/whatismyip.git
synced 2024-12-22 06:18:01 +00:00
Add github releases
This commit is contained in:
parent
7d2209d390
commit
66f3436371
12
.github/workflows/main.yml
vendored
12
.github/workflows/main.yml
vendored
@ -29,6 +29,10 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: tests
|
||||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
|
||||
strategy:
|
||||
matrix:
|
||||
goos: [linux]
|
||||
goarch: [amd64]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
@ -40,3 +44,11 @@ jobs:
|
||||
|
||||
- name: Deploy image
|
||||
run: make docker-push VERSION=$RELEASE_VERSION
|
||||
|
||||
- uses: wangyoucao577/go-release-action@v1.20
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
goos: ${{ matrix.goos }}
|
||||
goarch: ${{ matrix.goarch }}
|
||||
build_command: make build VERSION=$RELEASE_VERSION
|
||||
extra_files: LICENSE README.md
|
||||
|
40
README.md
40
README.md
@ -5,6 +5,11 @@
|
||||
- [Endpoints](#endpoints)
|
||||
- [Build](#build)
|
||||
- [Usage](#usage)
|
||||
- [Examples](#examples)
|
||||
- [Run a default TCP server](#run-a-default-tcp-server)
|
||||
- [Run a TLS server only](#run-a-tls-server-only)
|
||||
- [Run a default TCP server with a custom template and trust a custom header set by an upstream proxy](#run-a-default-tcp-server-with-a-custom-template-and-trust-a-custom-header-set-by-an-upstream-proxy)
|
||||
- [Download](#download)
|
||||
- [Docker](#docker)
|
||||
- [Running a container locally using test databases](#running-a-container-locally-using-test-databases)
|
||||
- [From Docker Hub](#from-docker-hub)
|
||||
@ -25,13 +30,14 @@ curl -6 ifconfig.es
|
||||
|
||||
## Features
|
||||
|
||||
- TLS available
|
||||
- TLS is avaliable.
|
||||
- Can run behind a proxy by trusting a custom header (usually `X-Real-IP`) to figure out the source IP address.
|
||||
- IPv4 and IPv6.
|
||||
- Geolocation info including ASN. This feature is possible thanks to [maxmind](https://dev.maxmind.com/geoip/geolite2-free-geolocation-data?lang=en) GeoLite2 databases. In order to use these databases, a license key is needed. Please visit Maxmind site for further instructions and get a free license.
|
||||
- High performance
|
||||
- Although a docker image is provided the executable can reload databases and/or SSL certificates by itself, `hup` signal is honored.
|
||||
- HTML with templates, text plain and JSON output.
|
||||
- High performance.
|
||||
- Self-contained server what can reload GeoLite2 databases and/or SSL certificates without stop/start. The `hup` signal is honored.
|
||||
- HTML templates for the landing page.
|
||||
- Text plain and JSON output.
|
||||
|
||||
## Endpoints
|
||||
|
||||
@ -82,9 +88,33 @@ Usage of ./whatismyip:
|
||||
Output version information and exit
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
### Run a default TCP server
|
||||
|
||||
```bash
|
||||
./whatismyip -geoip2-city ./test/GeoIP2-City-Test.mmdb -geoip2-asn ./test/GeoLite2-ASN-Test.mmdb
|
||||
```
|
||||
|
||||
### Run a TLS server only
|
||||
|
||||
```bash
|
||||
./whatismyip -geoip2-city ./test/GeoIP2-City-Test.mmdb -geoip2-asn ./test/GeoLite2-ASN-Test.mmdb -bind "" -tls-bind :8081 -tls-crt ./test/server.pem -tls-key ./test/server.key
|
||||
```
|
||||
|
||||
### Run a default TCP server with a custom template and trust a custom header set by an upstream proxy
|
||||
|
||||
```bash
|
||||
./whatismyip -geoip2-city ./test/GeoIP2-City-Test.mmdb -geoip2-asn ./test/GeoLite2-ASN-Test.mmdb -trusted-header X-Real-IP -template mytemplate.tmpl
|
||||
```
|
||||
|
||||
## Download
|
||||
|
||||
Download latest version from https://github.com/dcarrillo/whatismyip/releases
|
||||
|
||||
## Docker
|
||||
|
||||
An ultra-light (13MB) image is available.
|
||||
An ultra-light (~9MB) image is available.
|
||||
|
||||
### Running a container locally using test databases
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user