YtFlow / Maple

A lightweight Universal Windows proxy app based on https://github.com/eycorsican/leaf
Apache License 2.0
1.2k stars 121 forks source link

[Feature Request] 'Hot reloading' after configuration saved #5

Closed shunia closed 3 years ago

shunia commented 3 years ago

I don't know if it's possible, but if it is, it will be better just hot reloading the new configuration after a saving action happened.

For now, Maple just won't respect the new configuration, which requires reconnecting to the vpn to make the new configuration take effect.

It could be like:

  1. User edit and save configuration;
  2. If configuration is valid, hot reloading to make the new configuration take effect immediately;
  3. If not valid, alert user to take further action to correct the configuration;
  4. If not valid, switching to another configuration will alert user the current draft configuration won't be saved;
  5. If not valid, close Maple will alert user Maple will drop the draft configuration, which means all editing will be lost;
bdbai commented 3 years ago

TBH I am not in favor of dropping unsaved invalid configurations. The most we can do is to show a validity indicator.

AFAIK Configuration reloading could be implemented by either:

BTW Please just be patient about new features as there is something more urgent to resolve😭

shunia commented 3 years ago

TBH I am not in favor of dropping unsaved invalid configurations. The most we can do is to show a validity indicator.

AFAIK Configuration reloading could be implemented by either:

  • Reconnecting VPN. This requires Maple to control the VPN connection lifecycle just like what we have in YtFlow, which would bring non-trivial complexity that I am intended to avoid, or

I agree that this could be too complex for Maple to implements, which is not the best solution.

  • Notifying the plug-in through RPC to trigger reload logic inside Leaf. This requires Leaf to support such functionality, so I have sent a feature request to Leaf. Note that RPC involves non-trivial work as well.

Even after Leaf supported this feature, I think it still require Maple to actually implement the user experience and interface.

For what you have mentioned, I understand that Maple is trying to be as simple and minimal as for now, but for a VPN GUI client, those complexity may not be avoided, or you will lose user experience which leads to an opposite direction as a GUI client: to make user easy and comfortable to use.

BTW Please just be patient about new features as there is something more urgent to resolve😭

Yes I totally understand the situation here and that's why I'm just focusing on quality of life improvements :) But since there's no one mentioning, I'm just happy to expose the requirements out here haha. And of course you don't have to rush into the decisions to make these QoL changes, but I think it might be useful/helpful when implementing those main features, when making serious technical decisions.

bdbai commented 3 years ago

Landed in https://github.com/YtFlow/Maple/commit/b994cdcd79f534c632c2d40c42cbf80298b18200 . Note that when default config changes, hot reloading will not work until next connect.