I have been having problems with proxies for the last 3 or 4 days. BAS sometimes activates proxy. sometimes it doesn't activate. I have been using the script for 1 month, there was no problem before. There is a problem for the last 3 or 4 days.
For those who needs this later, you can set up http proxy and send a simple get request to https://api.ipify.org , it will give you the ip adress in plain text, no need to parse the json.
One of many simple and easy ways to do it.