microsoft / PowerToys

Windows system utilities to maximize productivity
MIT License
111.9k stars 6.59k forks source link

IP address plugin for PowerToys Run #26665

Open pistasjis opened 1 year ago

pistasjis commented 1 year ago

Description of the new feature / enhancement

This feature will allow you to get your public IP address from PowerToys Run.

Scenario when this would be used?

It can be useful if you're editing DNS records, doing port forwarding, etc. This is useful for any situation that requires your public IP address.

Supporting information

I've already created the plugin, I just forgot to create an issue beforehand. Let me know if it's all OK to create a PR for it! image

davidegiacometti commented 1 year ago

Hi @pistasjis The plugin scope looks clear!

CC @crutkas since it's involving 3rd party API calls. Probably best suited as a community plugin?

crutkas commented 1 year ago

Yeah, due to the 3rd party api, that is going to be hard for us to accept

pistasjis commented 1 year ago

Hmm. Well, I don't think it is possible to get public IP address without using a website

pistasjis commented 1 year ago

Hmm. Well, I don't think it is possible to get public IP address without using a website

If Microsoft or the PowerToys team hosted one, it would be fine, right?

crutkas commented 1 year ago

https://stackoverflow.com/questions/6803073/get-local-ip-address/27376368 solution with the sockets seems interesting but I would need to see if there is a dns server we’d be allowed to ping.

Running a service is not something our team wants to actively do.

pistasjis commented 1 year ago

https://stackoverflow.com/questions/6803073/get-local-ip-address/27376368 solution with the sockets seems interesting but I would need to see if there is a dns server we’d be allowed to ping.

Running a service is not something our team wants to actively do.

This seems to be for local IP addresses only, which is already implemented in PowerToys Run: image

However, I did find an article which showed how to get your public IP address by just using DNS: https://www.adityathebe.com/query-public-ip-with-DNS-servers. Maybe that's better than making a HTTP request to a third-party server? It still relies on a third-party service, which is pretty :/ to me.