Add MoscowWifi liberator#12
Conversation
Record_2026-05-06-12-46-23_b783bf344239542886fee7b48fa4b892.mp4 |
|
Thank you for your contribution! |
binarynoise
left a comment
There was a problem hiding this comment.
We just looked at this PR and are generally happy with your contribution, however we'd like to have some changes:
- The code you sent us in this PR does not match the version of the app used in the video. Please compile the app with the exact code in this PR and use it one time to liberate
MT_FREE. - We would like to have a HAR file for
MT_FREEif possible for analysis and archiving. - Please make sure to use our formatting profile contained in the repo when formatting the file. In Android Studio or IntelliJ the profile should be applied automatically when formatting the file.
| * -> GET /gapi/auth/check (poll until auth_status == "success") | ||
| */ | ||
| @Experimental | ||
| @SSID("MT_FREE", "_MosMetro_Free", "MosMetro_Free", "MTC_FREE") |
There was a problem hiding this comment.
We did not see SSIDs other than MT_FREE in our statistics, please confirm the PortalLiberator also works with the other networks.
| check(initResult.authStatus != "fail") { "Auth init failed: ${initResult.authErrorCode}" } | ||
|
|
||
| for (attempt in 1..10) { | ||
| val result = checkAuthResult(client, response.requestUrl, startResponse.data) |
There was a problem hiding this comment.
Is it necessary to explicitly check the auth result using this function?
The Liberator already has its own waiting loop.
Have you tried running the PortalLiberator without this explicit check?
| for (attempt in 1..10) { | ||
| val result = checkAuthResult(client, response.requestUrl, startResponse.data) | ||
| when (result) { | ||
| true -> break | ||
| false -> log("Failed to check auth result in $attempt") | ||
| null -> Thread.sleep(1_000) | ||
| } | ||
| } | ||
| error("Auth timed out after 10 attempts") |
There was a problem hiding this comment.
No matter the result, the code will always reach the error.
| null -> Thread.sleep(1_000) | ||
| } | ||
| } | ||
| error("Auth timed out after 10 attempts") |
There was a problem hiding this comment.
We don't need this explicit exception here, since the Liberator already checks after the PortalLiberator has run whether accessing the internet is possible now. Throwing this exception will put this Liberation attempt into the wrong category: Error instead of StillCaptured.
| error("Auth timed out after 10 attempts") |
Usually you have to watch a lot of ads to perform auth. This way you don't have to watch any. Code written based on reverse of their frontend.
I wasn't banned after ~1 month of using it, seems safe. I will upload a video with confirmation that it works today-tomorrow.
Not sure if I matched project code style or if it is ok to add kotlinx serialization lib (seems logic to me considering that server returns json).
P.S. finally my github account got unbanned (it was a false ban), wanted to add this for quite some time