Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@mahee96
Copy link
Member

@mahee96 mahee96 commented Nov 27, 2024

Changes

  1. capture the decoded server list in UserDefaults.standard.menuAnisetteServersList (new variable)
  2. ping current server for reachability (expected response code: 200-299 range)
  3. traverse servers list (excluding current since it was already processed) to get next reachable server
  4. use and make this server as current by setting UserDefaults.standard.menuAnisetteUrl.

TODO:

  1. Though this provides seamless fallback, the user might be annoyed that the server is switching randomly without external input in settings screen. (Need to think if we could make this switch temporary and restore user's selection after the selected server is reachable again).
    => Basically prevent surprises for (say) users who explicitly need only their servers!!
    For this, the user could actually remove all unnecessary servers if they really require exclusivity though.
  2. make Toast(popup message to user) about server unavailability and switching to new server.

@github-actions
Copy link

Builds for this Pull Request are available at
SideStore-0.5.9-pr.773+db251ed.ipa
SideStore-0.5.9-pr.773+db251ed-dSYM
Have a nice day.

@mahee96
Copy link
Member Author

mahee96 commented Nov 27, 2024

Tests:

tried using invalid domains:

Failed to reach server: https://ani.sidestore.zips, trying next server.
Failed to reach server: https://ani.846969.xyzs, trying next server.
Failed to reach server: http://ani.sternserv.xyzs, trying next server.
Found working server: http://5.249.163.88:6969
Anisette URL: http://5.249.163.88:6969
Server is V3
Client-Info: <MacBookPro13,2> <macOS;13.1;22C65> <com.apple.AuthKit/1 (com.apple.dt.Xcode/3594.4.19)>
User-Agent: akd/1.0 CFNetwork/808.1.4

@mahee96
Copy link
Member Author

mahee96 commented Nov 27, 2024

@nythepegasus take a note on TODO

@nythepegasus nythepegasus merged commit 2bb2eea into SideStore:develop Nov 27, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants