I use a proxy application (like Psiphon or ProtonVPN) to connect to the internet. I want to get my IP address that I'm connected to the internet with.
I need to use CMD or PowerShell because later on, I want to use the IP address in Autohotkey.
Now I've been searching for ways to do this for a very long time, and I came to the conclusion that it's not possible. But I decided to ask this question because I could be missing something. Also, any workaround or application is apprecaited.
Here's what I've tried so far:
for /F "tokens=2" %i in ('"nslookup myip.opendns.com resolver1.opendns.com | find /i "address" | find /v "18.104.22.168""') do echo %i
This command will print my real IP address, it doesn't go through the proxy.
And the reason it doesn't work, I found out, is this: Windows, not admin: Proxy working in Firefox but not in cmd, why?
So the answer on question above, claims a TCP connection would be proxied so I found this:
Resolve-DnsName -Name myip.opendns.com -Server resolver1.opendns.com -TcpOnly
But this also, doesn't work.