samyun / southwest-price-drop-bot

Bot that watches Southwest flights for price drops.
Other
74 stars 41 forks source link

Fix to #33 #34

Closed GC-Guy closed 5 years ago

GC-Guy commented 5 years ago

As reported, check.js is different than get_price.js, so I needed to add proxy to it as well. I am not a JS guy, so if "let" is not appropriate instead of "const" please feel free to change it. This seemed easier than const with a really long 1-liner conditional.

samyun commented 5 years ago

Neither am I, but from what I know, that's probably fine.

GC-Guy commented 5 years ago

@flyize I would submit it as an issue for a new feature, but according to a quick google it doesn't look like doing it natively is promising. https://blog.apify.com/how-to-make-headless-chrome-and-puppeteer-use-a-proxy-server-with-authentication-249a21a79212 you could use the above tactic to relay to your auth proxy, but for this use case if you have to set up a second proxy anyway, you probably could just use it directly.

flyize commented 5 years ago

@samyun @GC-Guy Maybe I'm being obtuse, but how are people using this then? Hanging an open proxy server on the internet seems to be a recipe for disaster. And it seems there's no easy way for Heroku to use a static outbound IP, so I can't place any firewall limits on the proxy server? What am I missing to get this working?

GC-Guy commented 5 years ago

@flyize I posted a note which he added to the readme, you can put it on a random port to make it obscure, and lock it down to only proxy for southwest.com, making it more or less useless to others. It's not perfect, but for now it will have to do. If someone puts together a howto for containers or azure I will stop using proxy personally.