-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Open
termux/termux-tools
#169Labels
Description
Problem description
Sometimes, bad mirrors are still detected as available, and Termux keeps trying to use them by default.
I know we can change mirrors with termux-change-repo, however termux-change-repo is an interactive process and cannot be setup unattended.
I was trying to use pkg install python. Most of the time, it works fine. However, if there is a bad/malicious mirror e.g. https://deb.kcubeterm.me/termux-main (which links to some shady site now) Termux does not recognize this. Depending on your luck, the automatic mirror selection will pick it as a mirror and then you are stuck with that same mirror until manually changed.
Possible Suggestions:
- If a mirror is defective, "
testing the available mirrors" should not list it as "OK". - When "
Metadata integrity can't be verified, repository is disabled now" due to cybersquatting, actually disable the malicious mirror for that session rather than keep trying to reuse it. - Perhaps automatic mirror selection should not be fixed, suggest round robin across the mirror group upon retry?
- Allow some unattended way of changing a mirror besides the interactive
termux-change-repo
Steps to reproduce the behavior.
Install termux
pkg install python
If lucky:
- all is good
If unlucky and picked the malicious mirror:
- it will fail. And keep failing, until a human does manual intervention to use
termux-change-repo(cannot be automated)
What is the expected behavior?
No response
System information
- Termux application version: 0.118.0
- Android OS version: 13
- Device model: Xperia 5V
robertkirkman, LostRuins and Sharique55