Add github releases

This commit is contained in:
Daniel Carrillo 2021-11-16 19:10:01 +01:00
parent 7d2209d390
commit 66f3436371
Signed by: dcarrillo
GPG Key ID: E4CD5C09DAED6E16
2 changed files with 47 additions and 5 deletions

View File

@ -29,6 +29,10 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: tests needs: tests
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
strategy:
matrix:
goos: [linux]
goarch: [amd64]
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
@ -40,3 +44,11 @@ jobs:
- name: Deploy image - name: Deploy image
run: make docker-push VERSION=$RELEASE_VERSION 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

View File

@ -5,6 +5,11 @@
- [Endpoints](#endpoints) - [Endpoints](#endpoints)
- [Build](#build) - [Build](#build)
- [Usage](#usage) - [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) - [Docker](#docker)
- [Running a container locally using test databases](#running-a-container-locally-using-test-databases) - [Running a container locally using test databases](#running-a-container-locally-using-test-databases)
- [From Docker Hub](#from-docker-hub) - [From Docker Hub](#from-docker-hub)
@ -25,13 +30,14 @@ curl -6 ifconfig.es
## Features ## 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. - Can run behind a proxy by trusting a custom header (usually `X-Real-IP`) to figure out the source IP address.
- IPv4 and IPv6. - 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. - 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 - High performance.
- Although a docker image is provided the executable can reload databases and/or SSL certificates by itself, `hup` signal is honored. - Self-contained server what can reload GeoLite2 databases and/or SSL certificates without stop/start. The `hup` signal is honored.
- HTML with templates, text plain and JSON output. - HTML templates for the landing page.
- Text plain and JSON output.
## Endpoints ## Endpoints
@ -82,9 +88,33 @@ Usage of ./whatismyip:
Output version information and exit 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 ## Docker
An ultra-light (13MB) image is available. An ultra-light (~9MB) image is available.
### Running a container locally using test databases ### Running a container locally using test databases