Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

[Bug] The wrong in-memory order of proxies becomes problematic when proxy list is long #21

Open
developerforeveruwu opened this issue Mar 4, 2023 · 0 comments

Comments

@developerforeveruwu
Copy link

developerforeveruwu commented Mar 4, 2023

The order of checking and viewing proxies should be like the order of the proxies in Telegram X, Desktop, iOS, Cherrygram. Ascending order is a bad choice. The list should be saved in reversed order on the disk. (look at SharedConfig.java)

Actions to reproduce:
Add too many proxies per day. The effects of this bug cannot be detected in a short test. You should use proxies in a daily basis, in a country in which old proxies get suspended everyday (or simulate it)

When does it become problematic?
Some ISPs destabilize all network protocols randomly with an interval, causing proxies sometimes get unavailable (red) temporarily and then available again. So the user constantly removes them by mistake and adds new proxies (or just adds new proxies and doesn't remove the old ones, so the list becomes longer and longer, with older and dead proxies being ping-checked firstly and also viewed at the top of the list when there's no ping sort). The in-memory sort is correct (time descending) In Telegram Desktop, Cherrygram, etc so there's no problem when the list is long, because the latest added proxies (which are probably healthy and working) are always accessible at the top of the list in these clients. A long list becomes problematic only when the order is wrongly reversed, e.g. in OwlGram, so the user needs to remove the unavailable proxies constantly (An unneeded difficulty) to shorten the list (despite most of the list items being usually healthy and just temporarily unavailable). Having a short list, sometimes causes lockups too, because there's more chance for all items of the list to get unavailable at once when the list is short.

So, for users who add proxies everyday, it's much easier to get online with other clients (e.g. TDesktop, Cherrygram, ...) despite not having ping sort, auto switch and other proxy features which OwlGram has.

Expected Behavior:
The latest added proxies are luckier to be working because earlier added proxies are older, so they are usually dead or blocked by ISPs. So the proxy rotation controller should start checking proxies from the latest proxy instead of the earlier proxies which have less chance to be available, to skip checking a lot of old proxies and find the available proxy in less time (Fixing SharedConfig.java is enough, so no need to touch ProxyRotationController.java). Also, the user prefers to see latest added proxies viewed at the beginning of the list, instead of the earliest because scrolling to the end to see the proxies added a moment ago, is hard when it's long. Also, ping checks and ping sort should get started from the latest one, not the earliest. There's a big chance for old proxies to be unavailable when the list is too long. The current in-memory list order should become time descending everywhere in the app.

P.S. I can't use the forum. If it is needed, post the issue in the forum yourself please. Thanks.

@developerforeveruwu developerforeveruwu changed the title The wrong in-memory order of proxies becomes problematic when proxy list is long [Bug] The wrong in-memory order of proxies becomes problematic when proxy list is long Mar 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant