Shadowsocks overwrites the PAC-file every time user rules are changed
Describe the bug
I want to use Shadowsocks in blacklist mode while in PAC mode, meaning that only traffic for particular domains should go through the proxy and all other connections should bypass it.
I figured out, that I can achieve this by removing the "/.*/" rule from the PAC-file and adding the domains to which I want to connect through the proxy to the user-rule.txt. This seems to work, but the only problem is that every time I'm adding a new rule to user-rule.txt, the PAC-file gets completely overwritten and the "/.*/" rule gets automatically re-added.
Environment
- Shadowsocks client version: 4.4.1.0
- OS version: Windows 10 21H2
Steps you have tried
- I tried disabling the Secure local PAC option, but this didn't help.
What did you expect to see?
Changes made to the var __RULES__ section of the PAC-file are not being overwritten when user rules are added.
What did you see instead?
Shadowsocks completely overwrites var __RULES__ section of the PAC-file each time it adds a new user rule there.
Config and error log in detail (with all sensitive info masked)
2022-03-16 22:43:21.5310|INFO|Shadowsocks.Controller.ShadowsocksController|WPF Localization Extension|Current culture: en
2022-03-16 22:43:21.6700|INFO|Shadowsocks.Controller.Listener|Shadowsocks started (4.4.1.0)
2022-03-16 22:43:32.5733|INFO|Shadowsocks.Controller.PACDaemon|Detected: PAC file 'pac.txt' was changed.
2022-03-16 22:43:43.4741|INFO|Shadowsocks.Controller.PACDaemon|Detected: User Rule file 'user-rule.txt' was changed.
2022-03-16 22:43:43.5031|INFO|Shadowsocks.Controller.PACDaemon|Detected: PAC file 'pac.txt' was changed.
2022-03-16 22:44:00.2616|INFO|Shadowsocks.Controller.UpdateChecker|Waiting for 0ms before checking for version update.
2022-03-16 22:44:00.2616|INFO|Shadowsocks.Controller.UpdateChecker|Checking for version update.
2022-03-16 22:44:01.1266|INFO|Shadowsocks.Controller.UpdateChecker|No new versions found.
2022-03-16 22:44:11.9392|INFO|Shadowsocks.Controller.ShadowsocksController|WPF Localization Extension|Current culture: en
2022-03-16 22:44:12.0773|INFO|Shadowsocks.Controller.Listener|Shadowsocks started (4.4.1.0)