使用 Node 和 Axios 访问地理封锁 API

Accessing geolocked API using Node & Axios

我正在尝试访问使用代理的 CoWIN API from an Express server that is deployed on Heroku - US region (I am a free user and they only provide access to US & EU regions in the free tier). The issue is that the API is deployed on CloudFront and is geofenced i.e., only accessible from an Indian IP. I have tried using a npm package,但这需要我的浏览器始终连接到我的服务器(不理想)。是否有解决方法(最好是免费的)允许我模拟服务器的 IP 或代理或任何绕过此地理围栏的东西?

我在使用 Express & Telegram DevOpsifying 疫苗通知应用程序时遇到了同样的问题 API。

由于 Heroku 免费套餐仅在美国和欧盟地区可用,我首先切换到 Digital Ocean 上的 Ubuntu Droplet(我选择了班加罗尔数据中心),但这不起作用(使用免费积分).我不确定为什么尽管是印度 IP,但对 API 的调用仍被阻止。

最后,使用 AWS 免费套餐在 ap-south-1 孟买地区创建 EC2 实例成功了!

这是一个对我有用的简单解决方法,我建议您先尝试一下。其他解决方法很复杂。