reisxd / revanced-builder

A NodeJS ReVanced builder
GNU General Public License v3.0
1.94k stars 172 forks source link

Make ReV builder Offline #657

Open RabahPrime opened 1 year ago

RabahPrime commented 1 year ago

It is better to add an offline option because the apkmirror site works for me, but the api is not because I always use a VPN.

bug

reisxd commented 1 year ago

I cannot add an "offline" mode but I could check if the backend can or can't access APKMirror, so it's possible to only upload APKs.

Planned in v4.

Spacellary commented 1 year ago

@reisxd I can imagine this is a little out of scope but what about being able to just like we pick an APK to upload, having a option to do the same thing with patches, integrations, cli...? You can already do that by manually putting the files in the revanced folder and renaming them, so why not have a toggle that will instead look for specific local files instead of automatically grabbing them from the repo. That's what I envision for an "offline mode".

It could be integrated where you select the patches source, as a checkbox/toggle to "Prefer Local Source" or "Use Local Source".

In short what I personally see as an "offline mode" for the builder is just a way to prioritize local files in a specific naming convention over downloading them automatically, that's not us renaming the files to match the ones in the repo of course...

reisxd commented 1 year ago

@reisxd I can imagine this is a little out of scope but what about being able to just like we pick an APK to upload, having a option to do the same thing with patches, integrations, cli...? You can already do that by manually putting the files in the revanced folder and renaming them, so why not have a toggle that will instead look for specific local files instead of automatically grabbing them from the repo. That's what I envision for an "offline mode".

It could be integrated where you select the patches source, as a checkbox/toggle to "Prefer Local Source" or "Use Local Source".

In short what I personally see as an "offline mode" for the builder is just a way to prioritize local files in a specific naming convention over downloading them automatically, that's not us renaming the files to match the ones in the repo of course...

You can already upload APKs.

Spacellary commented 1 year ago

Heya! :D

You can already upload APKs.

My reply already took that into account. Just used it as an example of an implementation of user suplied resources.

I am refereing to a similar feature as the "Upload APK" that is already present, but instead where you provide the CLI, patches and integrations. It could work like the APK one does now, or it could be like I described, as in a toggle setting under the patches sources, so it uses local files with a specific name instead of downloading the latest ones from each source.

Eg: something like "local_revanced-cli.jar" takes priority over any other cli.jar version if the option was enabled. So it would patch the apk without looking out of online sources if that file was present. Combined with the APK upload feature that's already there this could make the entire builder able to run offline (again, I don't count manually renaming the files as the builder still needs to do an online check).

reisxd commented 1 year ago

Heya! :D

You can already upload APKs.

My reply already took that into account. Just used it as an example of an implementation of user suplied resources.

I am refereing to a similar feature as the "Upload APK" that is already present, but instead where you provide the CLI, patches and integrations. It could work like the APK one does now, or it could be like I described, as in a toggle setting under the patches sources, so it uses local files with a specific name instead of downloading the latest ones from each source.

Eg: something like "local_revanced-cli.jar" takes priority over any other cli.jar version if the option was enabled.

I see. That's also a nice feature. I thought about saving the last downloaded patches, cli etc. so when you get completely ratelimited from GitHub (how), you can use those. But, this is also very nice. Could be useful for developers or people who want to use older patches.

Spacellary commented 1 year ago

so when you get completely ratelimited from GitHub (how)

Haha I have no idea but it happened to me once and I swear it was a bug because I wasnt even doing anything with git that day/recently.

Could be useful for developers or people who want to use older patches.

I agree this is a bit of niche feature for power-users / testers, but I also think it's a great feature that can have a simple implementation and simple documentation to accompany it would be enough.

RabahPrime commented 1 year ago

I cannot add an "offline" mode but I could check if the backend can or can't access APKMirror, so it's possible to only upload APKs.

Planned in v4.

next update add apkcombo & Uptodown ..... because this sites is better and no check vpn . . .

reisxd commented 1 year ago

I cannot add an "offline" mode but I could check if the backend can or can't access APKMirror, so it's possible to only upload APKs.

Planned in v4.

next update add apkcombo & Uptodown ..... because this sites is better and no check vpn . . .

Both are not trustable and Uptodown download speeds are slow.

Spacellary commented 1 year ago

@reisxd Leaving it here in a more clear form:

Possible implementation:

Option to use a local repository (directory) instead of only remote ones, and check those with priority if the proposed option "Prefer Local Repository/Organization: %LOCALPATH%" is enabled in the options.

Or something like that... Do I keep it in this issue or would that be a separate one?