mirror of
https://github.com/sotam0316/docker-py-revanced.git
synced 2026-04-25 03:48:37 +09:00
✨ Custom Patches json dl support
This commit is contained in:
@@ -118,7 +118,7 @@ You can use any of the following methods to build.
|
|||||||
|
|
||||||
### Global Config
|
### Global Config
|
||||||
|
|
||||||
| Env Name | Description | Default |
|
| **Env Name** | **Description** | **Default** |
|
||||||
|:---------------------------------------------------------|:-------------------------------------------------:|:---------------------------------------------------------------------------------------------------------|
|
|:---------------------------------------------------------|:-------------------------------------------------:|:---------------------------------------------------------------------------------------------------------|
|
||||||
| [PATCH_APPS](#patch-apps) | Apps to patch/build | youtube |
|
| [PATCH_APPS](#patch-apps) | Apps to patch/build | youtube |
|
||||||
| [EXISTING_DOWNLOADED_APKS ](#existing-downloaded-apks) | Already downloaded clean apks | [] |
|
| [EXISTING_DOWNLOADED_APKS ](#existing-downloaded-apks) | Already downloaded clean apks | [] |
|
||||||
@@ -126,6 +126,7 @@ You can use any of the following methods to build.
|
|||||||
| DRY_RUN | Do a dry run | False |
|
| DRY_RUN | Do a dry run | False |
|
||||||
| [GLOBAL_CLI_DL*](#global-resources) | DL for CLI to be used for patching apps. | [Revanced CLI](https://github.com/revanced/revanced-cli) |
|
| [GLOBAL_CLI_DL*](#global-resources) | DL for CLI to be used for patching apps. | [Revanced CLI](https://github.com/revanced/revanced-cli) |
|
||||||
| [GLOBAL_PATCHES_DL*](#global-resources) | DL for Patches to be used for patching apps. | [Revanced Patches](https://github.com/revanced/revanced-patches) |
|
| [GLOBAL_PATCHES_DL*](#global-resources) | DL for Patches to be used for patching apps. | [Revanced Patches](https://github.com/revanced/revanced-patches) |
|
||||||
|
| [GLOBAL_PATCHES_JSON_DL*](#global-resources) | DL for Patches Json to be used for patching apps. | [Revanced Patches](https://github.com/revanced/revanced-patches) |
|
||||||
| [GLOBAL_INTEGRATIONS_DL*](#global-resources) | DL for Integrations to be used for patching apps. | [Revanced CLI](https://github.com/revanced/revanced-integrations) |
|
| [GLOBAL_INTEGRATIONS_DL*](#global-resources) | DL for Integrations to be used for patching apps. | [Revanced CLI](https://github.com/revanced/revanced-integrations) |
|
||||||
| [GLOBAL_KEYSTORE_FILE_NAME*](#global-keystore-file-name) | Key file to be used for signing apps | [Builder's own key](https://github.com/nikhilbadyal/docker-py-revanced/blob/main/apks/revanced.keystore) |
|
| [GLOBAL_KEYSTORE_FILE_NAME*](#global-keystore-file-name) | Key file to be used for signing apps | [Builder's own key](https://github.com/nikhilbadyal/docker-py-revanced/blob/main/apks/revanced.keystore) |
|
||||||
| [GLOBAL_ARCHS_TO_BUILD*](#global-archs-to-build) | Arch to keep in the patched apk. | All |
|
| [GLOBAL_ARCHS_TO_BUILD*](#global-archs-to-build) | Arch to keep in the patched apk. | All |
|
||||||
@@ -143,6 +144,7 @@ You can use any of the following methods to build.
|
|||||||
|:------------------------------------------------------------|:---------------------------------------------------------:|:-------------------------------|
|
|:------------------------------------------------------------|:---------------------------------------------------------:|:-------------------------------|
|
||||||
| [*APP_NAME*_CLI_DL](#global-resources) | DL for CLI to be used for patching **APP_NAME**. | GLOBAL_CLI_DL |
|
| [*APP_NAME*_CLI_DL](#global-resources) | DL for CLI to be used for patching **APP_NAME**. | GLOBAL_CLI_DL |
|
||||||
| [*APP_NAME*_PATCHES_DL](#global-resources) | DL for Patches to be used for patching **APP_NAME**. | GLOBAL_PATCHES_DL |
|
| [*APP_NAME*_PATCHES_DL](#global-resources) | DL for Patches to be used for patching **APP_NAME**. | GLOBAL_PATCHES_DL |
|
||||||
|
| [*APP_NAME*_PATCHES_JSON_DL](#global-resources) | DL for Patches Json to be used for patching **APP_NAME**. | GLOBAL_PATCHES_JSON_DL |
|
||||||
| [*APP_NAME*_INTEGRATIONS_DL](#global-resources) | DL for Integrations to be used for patching **APP_NAME**. | GLOBAL_INTEGRATIONS_DL |
|
| [*APP_NAME*_INTEGRATIONS_DL](#global-resources) | DL for Integrations to be used for patching **APP_NAME**. | GLOBAL_INTEGRATIONS_DL |
|
||||||
| [*APP_NAME*_KEYSTORE_FILE_NAME](#global-keystore-file-name) | Key file to be used for signing **APP_NAME**. | GLOBAL_KEYSTORE_FILE_NAME |
|
| [*APP_NAME*_KEYSTORE_FILE_NAME](#global-keystore-file-name) | Key file to be used for signing **APP_NAME**. | GLOBAL_KEYSTORE_FILE_NAME |
|
||||||
| [*APP_NAME*_ARCHS_TO_BUILD](#global-archs-to-build) | Arch to keep in the patched **APP_NAME**. | GLOBAL_ARCHS_TO_BUILD |
|
| [*APP_NAME*_ARCHS_TO_BUILD](#global-archs-to-build) | Arch to keep in the patched **APP_NAME**. | GLOBAL_ARCHS_TO_BUILD |
|
||||||
@@ -234,6 +236,7 @@ You can use any of the following methods to build.
|
|||||||
```dotenv
|
```dotenv
|
||||||
GLOBAL_CLI_DL=https://github.com/revanced/revanced-cli
|
GLOBAL_CLI_DL=https://github.com/revanced/revanced-cli
|
||||||
GLOBAL_PATCHES_DL=https://github.com/revanced/revanced-patches
|
GLOBAL_PATCHES_DL=https://github.com/revanced/revanced-patches
|
||||||
|
GLOBAL_PATCHES_JSON_DL=https://github.com/revanced/revanced-patches
|
||||||
GLOBAL_INTEGRATIONS_DL=https://github.com/revanced/revanced-integrations
|
GLOBAL_INTEGRATIONS_DL=https://github.com/revanced/revanced-integrations
|
||||||
```
|
```
|
||||||
Resources downloaded from envs and will be used for patching for any **APP_NAME**.
|
Resources downloaded from envs and will be used for patching for any **APP_NAME**.
|
||||||
@@ -245,6 +248,7 @@ You can use any of the following methods to build.
|
|||||||
```dotenv
|
```dotenv
|
||||||
YOUTUBE_CLI_DL=https://github.com/inotia00/revanced-cli
|
YOUTUBE_CLI_DL=https://github.com/inotia00/revanced-cli
|
||||||
YOUTUBE_PATCHES_DL=https://github.com/inotia00/revanced-patches
|
YOUTUBE_PATCHES_DL=https://github.com/inotia00/revanced-patches
|
||||||
|
YOUTUBE_PATCHES_JSON_DL=https://github.com/inotia00/revanced-patches
|
||||||
YOUTUBE_INTEGRATIONS_DL=https://github.com/inotia00/revanced-integrations
|
YOUTUBE_INTEGRATIONS_DL=https://github.com/inotia00/revanced-integrations
|
||||||
```
|
```
|
||||||
With the config tool will try to patch youtube with resources from inotia00 while other global resource will used
|
With the config tool will try to patch youtube with resources from inotia00 while other global resource will used
|
||||||
|
|||||||
+4
-1
@@ -25,6 +25,9 @@ class APP(object):
|
|||||||
self.integrations_dl = config.env.str(
|
self.integrations_dl = config.env.str(
|
||||||
f"{app_name}_INTEGRATION_DL".upper(), config.global_integrations_dl
|
f"{app_name}_INTEGRATION_DL".upper(), config.global_integrations_dl
|
||||||
)
|
)
|
||||||
|
self.patches_json_dl = config.env.str(
|
||||||
|
f"{app_name}_PATCHES_JSON_DL".upper(), config.global_patches_json_dl
|
||||||
|
)
|
||||||
self.exclude_request = config.env.list(f"{app_name}_EXCLUDE_PATCH".upper(), [])
|
self.exclude_request = config.env.list(f"{app_name}_EXCLUDE_PATCH".upper(), [])
|
||||||
self.include_request = config.env.list(f"{app_name}_INCLUDE_PATCH".upper(), [])
|
self.include_request = config.env.list(f"{app_name}_INCLUDE_PATCH".upper(), [])
|
||||||
self.resource: Dict[str, str] = {}
|
self.resource: Dict[str, str] = {}
|
||||||
@@ -73,7 +76,7 @@ class APP(object):
|
|||||||
("cli", self.cli_dl, config, ".*jar"),
|
("cli", self.cli_dl, config, ".*jar"),
|
||||||
("integrations", self.integrations_dl, config, ".*apk"),
|
("integrations", self.integrations_dl, config, ".*apk"),
|
||||||
("patches", self.patches_dl, config, ".*jar"),
|
("patches", self.patches_dl, config, ".*jar"),
|
||||||
("patches_json", self.patches_dl, config, ".*json"),
|
("patches_json", self.patches_json_dl, config, ".*json"),
|
||||||
]
|
]
|
||||||
|
|
||||||
# Using a ThreadPoolExecutor for parallelism
|
# Using a ThreadPoolExecutor for parallelism
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ from src.utils import default_build
|
|||||||
|
|
||||||
default_cli = "https://github.com/revanced/revanced-cli/releases/latest"
|
default_cli = "https://github.com/revanced/revanced-cli/releases/latest"
|
||||||
default_patches = "https://github.com/revanced/revanced-patches/releases/latest"
|
default_patches = "https://github.com/revanced/revanced-patches/releases/latest"
|
||||||
|
default_patches_json = default_patches
|
||||||
default_integrations = (
|
default_integrations = (
|
||||||
"https://github.com/revanced/revanced-integrations/releases/latest"
|
"https://github.com/revanced/revanced-integrations/releases/latest"
|
||||||
)
|
)
|
||||||
@@ -77,6 +78,9 @@ class RevancedConfig(object):
|
|||||||
self.dry_run = env.bool("DRY_RUN", False)
|
self.dry_run = env.bool("DRY_RUN", False)
|
||||||
self.global_cli_dl = env.str("GLOBAL_CLI_DL", default_cli)
|
self.global_cli_dl = env.str("GLOBAL_CLI_DL", default_cli)
|
||||||
self.global_patches_dl = env.str("GLOBAL_PATCHES_DL", default_patches)
|
self.global_patches_dl = env.str("GLOBAL_PATCHES_DL", default_patches)
|
||||||
|
self.global_patches_json_dl = env.str(
|
||||||
|
"GLOBAL_PATCHES_JSON_DL", default_patches_json
|
||||||
|
)
|
||||||
self.global_integrations_dl = env.str(
|
self.global_integrations_dl = env.str(
|
||||||
"GLOBAL_INTEGRATIONS_DL", default_integrations
|
"GLOBAL_INTEGRATIONS_DL", default_integrations
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user