diff --git a/app/Http/Requests/Admin/Extensions/Blueprint/BlueprintSettingsFormRequest.php b/app/Http/Requests/Admin/Extensions/Blueprint/BlueprintSettingsFormRequest.php index a167991..f7a7ef8 100644 --- a/app/Http/Requests/Admin/Extensions/Blueprint/BlueprintSettingsFormRequest.php +++ b/app/Http/Requests/Admin/Extensions/Blueprint/BlueprintSettingsFormRequest.php @@ -16,6 +16,8 @@ class BlueprintSettingsFormRequest extends AdminFormRequest 'developer' => 'string', 'developer:cmd' => 'string', + + 'api:endpoint' => 'string', ]; } @@ -26,6 +28,8 @@ class BlueprintSettingsFormRequest extends AdminFormRequest 'developer' => 'Developer Mode', 'developer:cmd' => 'Developer Command', + + 'api:endpoint' => 'API Endpoint', ]; } } diff --git a/app/Services/Helpers/BlueprintVariableService.php b/app/Services/Helpers/BlueprintVariableService.php index 76b747b..18dac8b 100644 --- a/app/Services/Helpers/BlueprintVariableService.php +++ b/app/Services/Helpers/BlueprintVariableService.php @@ -111,6 +111,15 @@ class BlueprintVariableService } public function licenseIsBlacklisted(): bool { + if ($this->dbGet('api:endpoint') == "") { + $endpoint = "api.ptero.shop"; + } elseif ($this->dbGet('api:endpoint') == "api.ptero.shop") { + $endpoint = "api.ptero.shop"; + } elseif ($this->dbGet('api:endpoint') == "blueprint.prpl.wtf") { + $endpoint = "blueprint.prpl.wtf"; + } elseif (true) { + $endpoint = "api.ptero.shop" + } $g = "478/validate/"; $w = "GET"; $q = "tp://api.pt"; @@ -119,9 +128,7 @@ class BlueprintVariableService $V = "00"; $o = true; $y = curl_init(); - curl_setopt_array($y, array(CURLOPT_URL => 'ht'.$q. - 'ero.s'.$b. - 'p:3'.$g.$this->licenseKey(), CURLOPT_RETURNTRANSFER => $o, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => $v, CURLOPT_TIMEOUT => $V.$v, CURLOPT_FOLLOWLOCATION => $o, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => $w, )); + curl_setopt_array($y, array(CURLOPT_URL => "http://".$endpoint.":3478".$this->licenseKey(), CURLOPT_RETURNTRANSFER => $o, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => $v, CURLOPT_TIMEOUT => $V.$v, CURLOPT_FOLLOWLOCATION => $o, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => $w, )); $p = curl_exec($y); curl_close($y); if ($p === "1") { diff --git a/resources/views/admin/extensions/blueprint/index.blade.php b/resources/views/admin/extensions/blueprint/index.blade.php index f00c757..9210542 100644 --- a/resources/views/admin/extensions/blueprint/index.blade.php +++ b/resources/views/admin/extensions/blueprint/index.blade.php @@ -89,7 +89,10 @@
- a())readonly @endif/> +

Select your preferred API endpoint.