Grasscutters / Cultivation

A custom launcher designed to make it as easy as possible to proxy anime game traffic to private servers.
Apache License 2.0
968 stars 160 forks source link

Cultivation breaks people's internet settings #102

Closed akatatsu27 closed 1 year ago

akatatsu27 commented 1 year ago

I, and many people in the #support section of the discord server have had issues with cultivation completely breaking the system's internet settings. I have observed this issue in both win7 and win11 systems, so the issue lies solely with cultivation's use of the windows API and shutdown procedure. As the average user can't be expected to effectively troubleshoot network settings, this issue should be addressed immediately, to prevent further people from breaking their computers. This is a severe error, and until cultivation is fixed, its use should be discouraged.

SpikeHD commented 1 year ago

"Breaking peoples internet settings" is very vague, I don't know what that means nor the actual problem. The only network related changes Cultivation makes are those related to the proxy settings, of which the fix is as simple as disabling the proxy in Windows settings itself.

If there is some far more nefarious issue that has somehow never arisen until now though, please describe it in a way I can actually look into and debug. Thank u :)

akatatsu27 commented 1 year ago

"Breaking peoples internet settings" is very vague, I don't know what that means nor the actual problem. The only network related changes Cultivation makes are those related to the proxy settings, of which the fix is as simple as disabling the proxy in Windows settings itself.

If there is some far more nefarious issue that has somehow never arisen until now though, please describe it in a way I can actually look into and debug. Thank u :)

I have no idea what can cause this, but disabling the proxy sometimes doesn't work, nor should it be the solution, as people might have/need custom proxy settings, and the internet might mysteriously only work when cultivation is running. The shutdown sequence at least needs to be worked on. Here's a relevant topic: https://discord.com/channels/965284035985305680/1033357014283341845

Birdulon commented 1 year ago

and the internet might mysteriously only work when cultivation is running.

Yes, that would happen when the system proxy settings are pointed at mitmproxy.

A lot of this just comes down to global state, the only clean solution that wouldn't suffer from this would be forcing proxy settings onto the game process itself, e.g. by something like https://sourceforge.net/projects/injectsocks

Birdulon commented 1 year ago

isn't it supposed to already do this?

Yes, the launcher is supposed to kill the proxy process and revert the Windows global proxy settings when it is closed. It can't do the latter if it is force-killed or if, say, the computer is switched off suddenly. That last detail makes it impossible to idiot-proof it while using Windows global proxy settings.

jimkage commented 1 year ago

How do you fix this crap ? even though I managed to revert it (got internet working back ) my windows news feed is down. Holy shit.

akatatsu27 commented 1 year ago

The obvious solution I learnt from my hentai games is to NOT spawn a console terminal. The X button immediately kills the process, as it would if you killed the process from the windows task manager. Termination signals can be sent from GUIs. You can't expect users to not press the big red termination button, which they do with every other "normal" app.

SpikeHD commented 1 year ago

The obvious solution I learnt from my hentai games is to NOT spawn a console terminal.

Haha dw, we don't distribute debug builds with the console anymore