dice2o / BingGPT

Desktop application of new Bing's AI-powered chat (Windows, macOS and Linux)
Apache License 2.0
9.26k stars 710 forks source link

It seems MS changed something today and users not in target region cannot access to new Bing through this app #3

Open huwei901108 opened 1 year ago

huwei901108 commented 1 year ago

It seems MS changed something today and users not in target region cannot access to new Bing through this software.

I am using this app in China. This software used to work perfectly, but it can’t open since today. When I start it in console, there is an error goes: (node:21668) electron: Failed to load URL: https://cn.bing.com/edgediscover/query?&darkschemeovr=1&FORM=SHORUN&udscs=1&udsnav=1&setlang=zh-CN&features=udssydinternal&clientscopes=windowheader,coauthor,chat,&udsframed=1&mkt=zh-CN&mkt=zh-CN&mkt=zh-CN&mkt=zh-CN&mkt=zh-CN&mkt=zh-CN&mkt=zh-CN&mkt=zh-CN&mkt=zh-CN with error: ERR_TOO_MANY_REDIRECTS If I use VPN, it can still work normally, but it’s a bit troublesome.

I also noticed that another project (acheong08/EdgeGPT) had a similar problem (too many redirects). They updated several versions this afternoon to solve this problem. Here are some records that may be referenced: https://github.com/acheong08/EdgeGPT/issues/120 https://github.com/acheong08/EdgeGPT/issues/113 https://github.com/acheong08/EdgeGPT/commit/20a84cb5db2083aed3d863028aff86af605b6569

I tried to copy the extra headers in their changes into this software. But it does not work out. I also noticed they changed python's 'requests' package to 'httpx' to handle redirects. But I am not sure how to achieve that in electron.

dice2o commented 1 year ago

This should be a new server-side limitation. The method of modifying x-forwarded-for in header is no longer useful. I've tried several workarounds, but can't avoid the redirection. Currently you need to use the VPN when you open the software, and you can exit the VPN after the page finishes loading. No need to use VPN while chatting.