Hari-Nagarajan / fairgame

Tool to help us buy hard to find items.
GNU General Public License v3.0
2.44k stars 805 forks source link

Added WindowsSelectorEventLoopPolicy for proxy support #765

Closed Sauromayne closed 3 years ago

Sauromayne commented 3 years ago

https://docs.python.org/3/library/asyncio-policy.html

According to asyncio docs the default policy uses ProactorEventLoop which seems to cause proxies to not work on Windows. Switching it to SelectorEventLoop using asyncio.WindowsSelectorEventLoopPolicy() fixes the issue.

If you don't add this code using Windows and try to run proxies it will not work and you will get an SSL error.

Credit goes to TehMadDog on Discord for finding the fix, I just added the if statement to check if the user is on Windows before applying it.