Coder Social home page Coder Social logo

bramp / myip Goto Github PK

View Code? Open in Web Editor NEW
56.0 6.0 21.0 2.36 MB

(A better) What's My IP Address web application

Home Page: https://ip.bramp.net

License: Apache License 2.0

Makefile 4.09% Go 70.67% JavaScript 3.82% CSS 1.47% HTML 19.95%
golang appengine whois dns ipv6

myip's Introduction

MyIP License Build Status Report card

by Andrew Brampton (bramp.net)

(A better) What's My IP Address web application. Determines both your IPv4 and IPv6 addresses, issues WHOIS and reverse DNS lookups, and shows all your HTTP headers.

Check it in action: ip.bramp.net or read about it on my blog.

ip.bramp.net screenshot

This project was quite literally hacked out in one weekend, and was my first App Engine project.

Install

Prerequisites

  • Google Cloud SDK

  • AppEngine Go SDK

    $ gcloud components install app-engine-go
  • Make (which comes on Linux or Mac)

  • npm

Domains

As designed, this Go application will run on the Standard Google App Engine. It requires two to three host names. One that is IPv4 only, and one that is IPv6 only. In my configuration I have ip.bramp.net that has both A and AAAA records, ip4.bramp.net that has only A records, and ip6.bramp.net that only has AAAA records. These all point to the same App Engine instance.

$ dig ip.bramp.net 
ip.bramp.net.		300	IN	A	216.239.32.21
ip.bramp.net.		300	IN	AAAA	2001:4860:4802:32::15

$ dig ip4.bramp.net
ip4.bramp.net.		300	IN	A	216.239.32.21

$ dig AAAA ip6.bramp.net
ip6.bramp.net.		300	IN	AAAA	2001:4860:4802:32::15

All three domain names should be configured in main.go (find the prodConfig var).

To deploy:

make deploy # to prod
make stage  # to stage

Development

To run locally we use the addresses, localhost:8080, 127.0.0.1:8080, and http://[::1]:8080. The first can be either, and the latter are IPv4 and IPv6 respectively.

To start up a local instance, just execute:

make serve

To test:

make test

Libraries

To keep libraries up to date run:

make check-updates
make veryclean
make test

TODO

  • Add rate limiting of requests
  • Add caching of DNS and WHOIS records (including the iana IP ranges)
  • Add configuration file, so can be hosted on different domains
  • Add a favicon.ico
  • Add Make test (which checks with different build tags, e.g macos,appengine linux,appengine)
  • Implement a App Engine Flex, and other PaaS environments
  • Minify all css and js and combine into one file
  • Do better at determining the root cause errors. e.g If both IPv4/IPv6 fail, then perhaps problem with the site. If IPv6 fails after 30 seconds, perhaps problem with IPv6 connectivity.
  • Refactor the app. We don't need to seperate appengine and not appengine anymore. The code is almost identical.

Licence (Apache 2)

This is not an official Google product (experimental or otherwise), it is just code that happens to be owned by Google.

Copyright 2017,2020 Google Inc. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

myip's People

Contributors

bramp avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

myip's Issues

No rule to make target 'install-tools'

i installed google cloud sdk, cloned your repo and inside folder myip when i run make install-tools i get error
make: *** No rule to make target 'install-tools'. Stop.

can you guide what is wrong ?

IPv6 gives an error

Able to get all info under the IPv4 tab. However, IPv6 produces an 'error - 1'

Potential Security Issue

👋 Hello, we've received a report for a potential medium severity security issue in your repository.

Next Steps

1️⃣ Visit https://huntr.dev/bounties/1-other-bramp/myip for more advisory information.

2️⃣ Sign-up to validate or speak to the researcher for more assistance.

3️⃣ Propose a patch or outsource it to our community.


Confused or need more help?

  • Join us on our Discord and a member of our team will be happy to help! 🤗

  • Speak to a member of our team: @JamieSlome


This issue was automatically generated by huntr.dev - a bug bounty board for securing open source code.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.