Skip to content

Commit d58b04c

Browse files
committed
Network improve
1 parent ad06381 commit d58b04c

File tree

17 files changed

+60
-21
lines changed

17 files changed

+60
-21
lines changed

OCLP-R-GUI.spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ coll = COLLECT(exe,
7070

7171
app = BUNDLE(coll,
7272
name='OCLP-R.app',
73-
icon="payloads/Icon/AppIcons/OCR.icns",
73+
icon="payloads/Icon/AppIcons/OC-Patcher.icns",
7474
bundle_identifier="com.hackdoc.oclp-r",
7575
info_plist={
7676
"CFBundleName": "OCLP-R",

oclp_r/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -777,7 +777,7 @@ def icns_resource_path(self):
777777

778778
@property
779779
def app_icon_path(self):
780-
return self.payload_path / Path("Icon/AppIcons/OCR.icns")
780+
return self.payload_path / Path("Icon/AppIcons/OC-Patcher.icns")
781781

782782
@property
783783
def icon_path_external(self):

oclp_r/support/kdk_handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
KDK_INSTALL_PATH: str = "/Library/Developer/KDKs"
2626
KDK_INFO_PLIST: str = "KDKInfo.plist"
2727
KDK_API_LINK_ORG: str = "https://dortania.github.io/KdkSupportPkg/manifest.json"
28-
KDK_API_LINK_PROXY:str = "https://oclpapi.simplehac.cn/KdkSupportPkg/manifest.json"
28+
KDK_API_LINK_PROXY:str = "https://next.oclpapi.simplehac.cn/KdkSupportPkg/manifest.json"
2929
KDK_ASSET_LIST: list = None
3030

3131
class KernelDebugKitObject:

oclp_r/support/metallib_handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
METALLIB_INSTALL_PATH: str = "/Library/Application Support/Hackdoc/MetallibSupportPkg"
2020
METALLIB_API_LINK_ORG: str = "https://dortania.github.io/MetallibSupportPkg/manifest.json"
21-
METALLIB_API_LINK_PROXY:str ="https://oclpapi.simplehac.cn/MetallibSupportPkg/manifest.json"
21+
METALLIB_API_LINK_PROXY:str ="https://next.oclpapi.simplehac.cn/MetallibSupportPkg/manifest.json"
2222
METALLIB_ASSET_LIST: list = None
2323

2424

oclp_r/support/network_handler.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
from typing import Union
1717
from pathlib import Path
1818

19+
from urllib3 import response
20+
1921
from . import utilities
2022
from .. import constants
2123
SESSION = requests.Session()
@@ -56,7 +58,11 @@ def verify_network_connection(self) -> bool:
5658
"""
5759

5860
try:
59-
requests.head(self.url, timeout=5, allow_redirects=True)
61+
response=requests.head(self.url, timeout=5, allow_redirects=True,verify=False)
62+
if response.status_code == 200:
63+
return True
64+
if response.status_code == 404:
65+
return False
6066
return True
6167
except (
6268
requests.exceptions.Timeout,

oclp_r/sys_patch/patchsets/hardware/misc/Launch.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"""
55

66
from ..base import BaseHardware, HardwareVariant
7-
7+
from .....detections.amfi_detect import AmfiConfigDetectLevel
88
from ...base import PatchType
99

1010
from .....constants import Constants
@@ -25,10 +25,18 @@ def name(self) -> str:
2525
Display name for end users
2626
"""
2727
return f"{self.hardware_variant()}: LaunchPad ({self._constants.launchpad_version})"
28+
def required_amfi_level(self) -> AmfiConfigDetectLevel:
29+
"""
30+
What level of AMFI configuration is required for this patch set
31+
Currently defaulted to AMFI needing to be disabled
32+
"""
33+
return AmfiConfigDetectLevel.NO_CHECK
34+
2835

2936

3037
def present(self) -> bool:
3138
return self._constants.change_launchpad
39+
3240
def requires_kernel_debug_kit(self) -> bool:
3341
"""
3442
Apple no longer provides standalone kexts in the base OS
@@ -51,9 +59,9 @@ def hardware_variant(self) -> HardwareVariant:
5159
return HardwareVariant.MISCELLANEOUS
5260

5361

54-
def _modern_audio_patches(self) -> dict:
62+
def _launchpad_patches(self) -> dict:
5563
"""
56-
Patches for Modern Audio
64+
Patches for LaunchPad
5765
"""
5866
if self._constants.launchpad_version != "26.0 Beta 4" and self._constants.launchpad_version != "26.0 Beta 2":
5967
self._constants.launchpad_version = "26.0 Beta 4"
@@ -80,4 +88,4 @@ def patches(self) -> dict:
8088
if self.native_os() is True:
8189
return {}
8290

83-
return self._modern_audio_patches()
91+
return self._launchpad_patches()

oclp_r/sys_patch/patchsets/hardware/misc/apfs_aligned.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"""
44

55
from ..base import BaseHardware, HardwareVariant
6-
6+
from .....detections.amfi_detect import AmfiConfigDetectLevel
77
from ...base import PatchType
88

99
from .....constants import Constants
@@ -18,7 +18,12 @@ class APFSP(BaseHardware):
1818
def __init__(self, xnu_major, xnu_minor, os_build, global_constants: Constants) -> None:
1919
super().__init__(xnu_major, xnu_minor, os_build, global_constants)
2020

21-
21+
def required_amfi_level(self) -> AmfiConfigDetectLevel:
22+
"""
23+
What level of AMFI configuration is required for this patch set
24+
Currently defaulted to AMFI needing to be disabled
25+
"""
26+
return AmfiConfigDetectLevel.NO_CHECK
2227
def name(self) -> str:
2328
"""
2429
Display name for end users

oclp_r/sys_patch/patchsets/hardware/misc/modern_audio.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"""
44

55
from ..base import BaseHardware, HardwareVariant
6-
6+
from .....detections.amfi_detect import AmfiConfigDetectLevel
77
from ...base import PatchType
88

99
from .....constants import Constants
@@ -18,7 +18,12 @@ class ModernAudio(BaseHardware):
1818
def __init__(self, xnu_major, xnu_minor, os_build, global_constants: Constants) -> None:
1919
super().__init__(xnu_major, xnu_minor, os_build, global_constants)
2020

21-
21+
def required_amfi_level(self) -> AmfiConfigDetectLevel:
22+
"""
23+
What level of AMFI configuration is required for this patch set
24+
Currently defaulted to AMFI needing to be disabled
25+
"""
26+
return AmfiConfigDetectLevel.NO_CHECK
2227
def name(self) -> str:
2328
"""
2429
Display name for end users

oclp_r/sys_patch/patchsets/hardware/misc/modern_usb.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"""
44

55
from ..base import BaseHardware, HardwareVariant
6-
6+
from .....detections.amfi_detect import AmfiConfigDetectLevel
77
from ...base import PatchType
88

99
from .....constants import Constants
@@ -16,6 +16,14 @@ class LegacyUSBHost(BaseHardware):
1616
def __init__(self, xnu_major, xnu_minor, os_build, global_constants: Constants) -> None:
1717
super().__init__(xnu_major, xnu_minor, os_build, global_constants)
1818

19+
def required_amfi_level(self) -> AmfiConfigDetectLevel:
20+
"""
21+
What level of AMFI configuration is required for this patch set
22+
Currently defaulted to AMFI needing to be disabled
23+
"""
24+
return AmfiConfigDetectLevel.NO_CHECK
25+
26+
1927

2028
def name(self) -> str:
2129
"""

oclp_r/sys_patch/patchsets/hardware/misc/voodoo_audio.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
voodoo_audio.py: Modern Audio patch set for macOS 12+26(VoodooHDA)
33
"""
4+
from .....detections.amfi_detect import AmfiConfigDetectLevel
45
from ..base import BaseHardware, HardwareVariant
56
from ...base import PatchType
67
from .....constants import Constants
@@ -18,11 +19,17 @@ def name(self) -> str:
1819
"""
1920
return f"{self.hardware_variant()}: Voodoo Audio"
2021

22+
def required_amfi_level(self) -> AmfiConfigDetectLevel:
23+
"""
24+
What level of AMFI configuration is required for this patch set
25+
Currently defaulted to AMFI needing to be disabled
26+
"""
27+
return AmfiConfigDetectLevel.NO_CHECK
2128

2229
def present(self) -> bool:
2330
return self._constants.audio_type=="VoodooHDA"
2431

25-
32+
2633
def native_os(self) -> bool:
2734
if self._xnu_major < os_data.monterey.value:
2835
return True

0 commit comments

Comments
 (0)