Browse Source

feat: clash nyanpasu client download

Cat 1 year ago
parent
commit
6e0cf49bbf

+ 1 - 1
app/predefine.php

@@ -5,5 +5,5 @@ declare(strict_types=1);
 // Global constants
 // Global constants
 const BASE_PATH = __DIR__ . '/..';
 const BASE_PATH = __DIR__ . '/..';
 const PANEL_NAME = 'NeXT-Panel';
 const PANEL_NAME = 'NeXT-Panel';
-const PANEL_VERSION = '24.3.0';
+const PANEL_VERSION = '24.4.0';
 const OTA_API_URL = 'https://api.nextpanel.dev/v1/version/latest';
 const OTA_API_URL = 'https://api.nextpanel.dev/v1/version/latest';

+ 15 - 14
composer.lock

@@ -622,16 +622,16 @@
         },
         },
         {
         {
             "name": "aws/aws-sdk-php",
             "name": "aws/aws-sdk-php",
-            "version": "3.313.0",
+            "version": "3.314.0",
             "source": {
             "source": {
                 "type": "git",
                 "type": "git",
                 "url": "https://github.com/aws/aws-sdk-php.git",
                 "url": "https://github.com/aws/aws-sdk-php.git",
-                "reference": "2f5f173300888d6f630ce24751a6ee0f1e6d72e8"
+                "reference": "5867f04e0e3959085328d853a743ffc5c8e8ae0b"
             },
             },
             "dist": {
             "dist": {
                 "type": "zip",
                 "type": "zip",
-                "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/2f5f173300888d6f630ce24751a6ee0f1e6d72e8",
-                "reference": "2f5f173300888d6f630ce24751a6ee0f1e6d72e8",
+                "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/5867f04e0e3959085328d853a743ffc5c8e8ae0b",
+                "reference": "5867f04e0e3959085328d853a743ffc5c8e8ae0b",
                 "shasum": ""
                 "shasum": ""
             },
             },
             "require": {
             "require": {
@@ -711,9 +711,9 @@
             "support": {
             "support": {
                 "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80",
                 "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80",
                 "issues": "https://github.com/aws/aws-sdk-php/issues",
                 "issues": "https://github.com/aws/aws-sdk-php/issues",
-                "source": "https://github.com/aws/aws-sdk-php/tree/3.313.0"
+                "source": "https://github.com/aws/aws-sdk-php/tree/3.314.0"
             },
             },
-            "time": "2024-06-11T18:20:58+00:00"
+            "time": "2024-06-12T18:10:03+00:00"
         },
         },
         {
         {
             "name": "bacon/bacon-qr-code",
             "name": "bacon/bacon-qr-code",
@@ -4951,16 +4951,16 @@
         },
         },
         {
         {
             "name": "slim/slim",
             "name": "slim/slim",
-            "version": "4.13.0",
+            "version": "4.14.0",
             "source": {
             "source": {
                 "type": "git",
                 "type": "git",
                 "url": "https://github.com/slimphp/Slim.git",
                 "url": "https://github.com/slimphp/Slim.git",
-                "reference": "038fd5713d5a41636fdff0e8dcceedecdd17fc17"
+                "reference": "5943393b88716eb9e82c4161caa956af63423913"
             },
             },
             "dist": {
             "dist": {
                 "type": "zip",
                 "type": "zip",
-                "url": "https://api.github.com/repos/slimphp/Slim/zipball/038fd5713d5a41636fdff0e8dcceedecdd17fc17",
-                "reference": "038fd5713d5a41636fdff0e8dcceedecdd17fc17",
+                "url": "https://api.github.com/repos/slimphp/Slim/zipball/5943393b88716eb9e82c4161caa956af63423913",
+                "reference": "5943393b88716eb9e82c4161caa956af63423913",
                 "shasum": ""
                 "shasum": ""
             },
             },
             "require": {
             "require": {
@@ -4968,7 +4968,7 @@
                 "nikic/fast-route": "^1.3",
                 "nikic/fast-route": "^1.3",
                 "php": "^7.4 || ^8.0",
                 "php": "^7.4 || ^8.0",
                 "psr/container": "^1.0 || ^2.0",
                 "psr/container": "^1.0 || ^2.0",
-                "psr/http-factory": "^1.0",
+                "psr/http-factory": "^1.1",
                 "psr/http-message": "^1.1 || ^2.0",
                 "psr/http-message": "^1.1 || ^2.0",
                 "psr/http-server-handler": "^1.0",
                 "psr/http-server-handler": "^1.0",
                 "psr/http-server-middleware": "^1.0",
                 "psr/http-server-middleware": "^1.0",
@@ -4985,11 +4985,12 @@
                 "nyholm/psr7-server": "^1.1",
                 "nyholm/psr7-server": "^1.1",
                 "phpspec/prophecy": "^1.19",
                 "phpspec/prophecy": "^1.19",
                 "phpspec/prophecy-phpunit": "^2.1",
                 "phpspec/prophecy-phpunit": "^2.1",
-                "phpstan/phpstan": "^1.10",
+                "phpstan/phpstan": "^1.11",
                 "phpunit/phpunit": "^9.6",
                 "phpunit/phpunit": "^9.6",
                 "slim/http": "^1.3",
                 "slim/http": "^1.3",
                 "slim/psr7": "^1.6",
                 "slim/psr7": "^1.6",
-                "squizlabs/php_codesniffer": "^3.9"
+                "squizlabs/php_codesniffer": "^3.10",
+                "vimeo/psalm": "^5.24"
             },
             },
             "suggest": {
             "suggest": {
                 "ext-simplexml": "Needed to support XML format in BodyParsingMiddleware",
                 "ext-simplexml": "Needed to support XML format in BodyParsingMiddleware",
@@ -5062,7 +5063,7 @@
                     "type": "tidelift"
                     "type": "tidelift"
                 }
                 }
             ],
             ],
-            "time": "2024-03-03T21:25:30+00:00"
+            "time": "2024-06-13T08:54:48+00:00"
         },
         },
         {
         {
             "name": "smarty/smarty",
             "name": "smarty/smarty",

+ 10 - 6
config/clients.json

@@ -1,18 +1,22 @@
 {
 {
     "clients":[
     "clients":[
         {
         {
-            "name": "Clash Verge",
+            "name": "Clash Nyanpasu",
             "tagMethod": "github_release",
             "tagMethod": "github_release",
-            "gitRepo": "clash-verge-rev/clash-verge-rev",
+            "gitRepo": "LibNyanpasu/clash-nyanpasu",
             "savePath": "public/clients/",
             "savePath": "public/clients/",
             "downloads": [
             "downloads": [
                 {
                 {
-                    "sourceName": "Clash.Verge_%tagName1%_x64-setup.exe",
-                    "saveName": "Clash.Verge.exe"
+                    "sourceName": "Clash.Nyanpasu_%tagName1%_x64-setup.exe",
+                    "saveName": "Clash.Nyanpasu.exe"
                 },
                 },
                 {
                 {
-                    "sourceName": "Clash.Verge_%tagName1%_aarch64.dmg",
-                    "saveName": "Clash.Verge_aarch64.dmg"
+                    "sourceName": "clash-nyanpasu_%tagName1%_amd64.AppImage",
+                    "saveName": "Clash.Nyanpasu.AppImage"
+                },
+                {
+                    "sourceName": "Clash.Nyanpasu_%tagName1%_aarch64.dmg",
+                    "saveName": "Clash.Nyanpasu_aarch64.dmg"
                 }
                 }
             ]
             ]
         },
         },

+ 30 - 10
resources/views/tabler/user/index.tpl

@@ -278,19 +278,19 @@
                                         </p>
                                         </p>
                                         <div class="btn-list justify-content-start">
                                         <div class="btn-list justify-content-start">
                                             <a  {if $config['enable_r2_client_download']}
                                             <a  {if $config['enable_r2_client_download']}
-                                                href="/user/clients/Clash.Verge.exe"
+                                                href="/user/clients/Clash.Nyanpasu.exe"
                                                 {else}
                                                 {else}
-                                                href="/clients/Clash.Verge.exe"
+                                                href="/clients/Clash.Nyanpasu.exe"
                                                 {/if} class="btn btn-azure">
                                                 {/if} class="btn btn-azure">
-                                                下载 Clash Verge
+                                                下载 Clash Nyanpasu
                                             </a>
                                             </a>
                                             <a data-clipboard-text="{$UniversalSub}/clash"
                                             <a data-clipboard-text="{$UniversalSub}/clash"
                                                class="copy btn btn-primary">
                                                class="copy btn btn-primary">
                                                 复制 Clash 订阅链接
                                                 复制 Clash 订阅链接
                                             </a>
                                             </a>
-                                            <a href="clash://install-config?url={$UniversalSub}/clash&name={$config['appName']}"
+                                            <a href="clash-nyanpasu://subscribe-remote-profile?url={$UniversalSub}&name={$config['appName']}"
                                                class="btn btn-indigo">
                                                class="btn btn-indigo">
-                                                导入 Clash
+                                                导入 Clash Nyanpasu
                                             </a>
                                             </a>
                                         </div>
                                         </div>
                                         <div class="btn-list justify-content-start my-2">
                                         <div class="btn-list justify-content-start my-2">
@@ -321,19 +321,19 @@
                                     </p>
                                     </p>
                                     <div class="btn-list justify-content-start">
                                     <div class="btn-list justify-content-start">
                                         <a {if $config['enable_r2_client_download']}
                                         <a {if $config['enable_r2_client_download']}
-                                            href="/user/clients/Clash.Verge_aarch64.dmg"
+                                            href="/user/clients/Clash.Nyanpasu_aarch64.dmg"
                                             {else}
                                             {else}
-                                            href="/clients/Clash.Verge_aarch64.dmg"
+                                            href="/clients/Clash.Nyanpasu_aarch64.dmg"
                                             {/if} class="btn btn-azure">
                                             {/if} class="btn btn-azure">
-                                            下载 Clash Verge (aarch64)
+                                            下载 Clash Nyanpasu (aarch64)
                                         </a>
                                         </a>
                                         <a data-clipboard-text="{$UniversalSub}/clash"
                                         <a data-clipboard-text="{$UniversalSub}/clash"
                                            class="copy btn btn-primary">
                                            class="copy btn btn-primary">
                                             复制 Clash 订阅链接
                                             复制 Clash 订阅链接
                                         </a>
                                         </a>
-                                        <a href="clash://install-config?url={$UniversalSub}/clash&name={$config['appName']}"
+                                        <a href="clash-nyanpasu://subscribe-remote-profile?url={$UniversalSub}&name={$config['appName']}"
                                            class="btn btn-indigo">
                                            class="btn btn-indigo">
-                                            导入 Clash
+                                            导入 Clash Nyanpasu
                                         </a>
                                         </a>
                                     </div>
                                     </div>
                                     <div class="btn-list justify-content-start my-2">
                                     <div class="btn-list justify-content-start my-2">
@@ -450,10 +450,30 @@
                                     </div>
                                     </div>
                                 </div>
                                 </div>
                                 <div class="tab-pane" id="linux">
                                 <div class="tab-pane" id="linux">
+                                    <p>
+                                        适用于 Clash 的订阅:<code class="spoiler">{$UniversalSub}/clash</code>
+                                    </p>
                                     <p>
                                     <p>
                                         适用于 SingBox 的订阅:<code class="spoiler">{$UniversalSub}/singbox</code>
                                         适用于 SingBox 的订阅:<code class="spoiler">{$UniversalSub}/singbox</code>
                                     </p>
                                     </p>
                                     <div class="btn-list justify-content-start">
                                     <div class="btn-list justify-content-start">
+                                        <a {if $config['enable_r2_client_download']}
+                                            href="/user/clients/Clash.Nyanpasu.AppImage"
+                                            {else}
+                                            href="/clients/Clash.Nyanpasu.AppImage"
+                                            {/if} class="btn btn-azure">
+                                            下载 Clash Nyanpasu
+                                        </a>
+                                        <a data-clipboard-text="{$UniversalSub}/clash"
+                                           class="copy btn btn-primary">
+                                            复制 Clash 订阅链接
+                                        </a>
+                                        <a href="clash-nyanpasu://subscribe-remote-profile?url={$UniversalSub}&name={$config['appName']}"
+                                           class="btn btn-indigo">
+                                            导入 Clash Nyanpasu
+                                        </a>
+                                    </div>
+                                    <div class="btn-list justify-content-start my-2">
                                         <a  {if $config['enable_r2_client_download']}
                                         <a  {if $config['enable_r2_client_download']}
                                             href="/user/clients/Hiddify.AppImage"
                                             href="/user/clients/Hiddify.AppImage"
                                             {else}
                                             {else}

+ 3 - 2
src/Controllers/User/ClientController.php

@@ -22,8 +22,9 @@ final class ClientController extends BaseController
         }
         }
 
 
         $clients = [
         $clients = [
-            'Clash.Verge.exe',
-            'Clash.Verge_aarch64.dmg',
+            'Clash.Nyanpasu.exe',
+            'Clash.Nyanpasu.AppImage',
+            'Clash.Nyanpasu_aarch64.dmg',
             'CMFA.apk',
             'CMFA.apk',
             'SFA.apk',
             'SFA.apk',
             'SFM.zip',
             'SFM.zip',