commit 864b0d2accf5fb6b5775347a7901c142adf74ba9 Author: clerie Date: Sun Oct 18 15:48:01 2020 +0200 Init repository diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..a6766f7 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 clerie + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..38d4dd2 --- /dev/null +++ b/README.md @@ -0,0 +1,6 @@ +# ip.clerie.de +Because any other "Whats my IP?"-tool sucks. + +Try it here: https://ip.clerie.de + +It's just one nginx site config. Feel free to host it yourself. It's open-source. diff --git a/ip.clerie.de b/ip.clerie.de new file mode 100644 index 0000000..a6bcde5 --- /dev/null +++ b/ip.clerie.de @@ -0,0 +1,84 @@ +server { + listen 80; + listen [::]:80; + + server_name ip.clerie.de ip4.clerie.de ip6.clerie.de; + + return 301 https://$host$request_uri; +} + +server { + listen [::]:443 ssl; + listen 443 ssl; + + server_name ip.clerie.de; + + ssl_certificate /etc/letsencrypt/live/ip.clerie.de/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/ip.clerie.de/privkey.pem; + include /etc/letsencrypt/options-ssl-nginx.conf; + ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; + + location / { + add_header Content-Type text/html; + return 200 ' + + + ip.clerie.de + + + +

ip.clerie.de

+ +

Because any other "Whats my IP?"-tool sucks. Host yourself :3

+ + + '; + } +} + +server { + listen [::]:443 ssl; + listen 443 ssl; + + server_name ip4.clerie.de ip6.clerie.de; + + ssl_certificate /etc/letsencrypt/live/ip.clerie.de/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/ip.clerie.de/privkey.pem; + include /etc/letsencrypt/options-ssl-nginx.conf; + ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; + + location / { + add_header Content-Type text/plain; + add_header Access-Control-Allow-Origin *; + return 200 $remote_addr; + } +}