瀏覽代碼

add telescope

兔姬桑 4 年之前
父節點
當前提交
7254f19da7

+ 10 - 18
.env.example

@@ -1,5 +1,5 @@
 APP_NAME=ProxyPanel
-APP_ENV=local
+APP_ENV=production
 APP_KEY=
 APP_DEBUG=false
 APP_DEMO=false
@@ -22,8 +22,9 @@ BROADCAST_DRIVER=redis
 CACHE_DRIVER=redis
 QUEUE_CONNECTION=redis
 SESSION_DRIVER=redis
-SESSION_CONNECTION=session
 SESSION_LIFETIME=120
+SESSION_CONNECTION=session
+
 
 # Redis 设置
 REDIS_HOST=127.0.0.1
@@ -31,29 +32,20 @@ REDIS_PASSWORD=null
 REDIS_PORT=6379
 
 MAIL_MAILER=smtp #或使用 mailgun
+
+# 发信方信息
+MAIL_FROM_ADDRESS=admin@proxypanel.ml
+MAIL_FROM_NAME=ProxyPanel
+
 # SMTP设置
 MAIL_HOST=smtp.exmail.qq.com
 MAIL_PORT=465
+MAIL_ENCRYPTION=ssl
 MAIL_USERNAME=admin@proxypanel.ml
 MAIL_PASSWORD=password
-MAIL_ENCRYPTION=ssl
-MAIL_FROM_ADDRESS=admin@proxypanel.ml
-MAIL_FROM_NAME=ProxyPanel
+
 # Mailgun设置
 MAILGUN_DOMAIN=
 MAILGUN_SECRET=
 
-AWS_ACCESS_KEY_ID=
-AWS_SECRET_ACCESS_KEY=
-AWS_DEFAULT_REGION=us-east-1
-AWS_BUCKET=
-
-PUSHER_APP_ID=
-PUSHER_APP_KEY=
-PUSHER_APP_SECRET=
-PUSHER_APP_CLUSTER=mt1
-
-MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
-MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
-
 REDIRECT_HTTPS=true

+ 2 - 2
app/Components/Helpers.php

@@ -158,10 +158,10 @@ class Helpers {
 				'is_WeChatPay',
 				'is_otherPay'
 			])));
-			Cache::tags('sysConfig')->add('is_onlinePay', $value);
+			Cache::tags('sysConfig')->put('is_onlinePay', $value);
 		}else{
 			$value = Config::find($name)->value;
-			Cache::tags('sysConfig')->add($name, $value?: false);
+			Cache::tags('sysConfig')->put($name, $value?: false);
 		}
 
 		return $value;

+ 0 - 31
app/Events/Event.php

@@ -1,31 +0,0 @@
-<?php
-
-namespace App\Events;
-
-use Illuminate\Broadcasting\Channel;
-use Illuminate\Broadcasting\InteractsWithSockets;
-use Illuminate\Broadcasting\PrivateChannel;
-use Illuminate\Foundation\Events\Dispatchable;
-use Illuminate\Queue\SerializesModels;
-
-class Event {
-	use Dispatchable, InteractsWithSockets, SerializesModels;
-
-	/**
-	 * Create a new event instance.
-	 *
-	 * @return void
-	 */
-	public function __construct() {
-		//
-	}
-
-	/**
-	 * Get the channels the event should broadcast on.
-	 *
-	 * @return Channel|array
-	 */
-	public function broadcastOn() {
-		return new PrivateChannel('channel-name');
-	}
-}

+ 22 - 37
app/Http/Kernel.php

@@ -3,6 +3,7 @@
 namespace App\Http;
 
 use App\Http\Middleware\Affiliate;
+use App\Http\Middleware\Authenticate;
 use App\Http\Middleware\CheckForMaintenanceMode;
 use App\Http\Middleware\EncryptCookies;
 use App\Http\Middleware\isAdmin;
@@ -18,10 +19,10 @@ use App\Http\Middleware\TrustProxies;
 use App\Http\Middleware\VerifyCsrfToken;
 use App\Http\Middleware\WebApi;
 use Fruitcake\Cors\HandleCors;
-use Illuminate\Auth\Middleware\Authenticate;
 use Illuminate\Auth\Middleware\AuthenticateWithBasicAuth;
 use Illuminate\Auth\Middleware\Authorize;
 use Illuminate\Auth\Middleware\EnsureEmailIsVerified;
+use Illuminate\Auth\Middleware\RequirePassword;
 use Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse;
 use Illuminate\Foundation\Http\Kernel as HttpKernel;
 use Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull;
@@ -30,7 +31,6 @@ use Illuminate\Http\Middleware\SetCacheHeaders;
 use Illuminate\Routing\Middleware\SubstituteBindings;
 use Illuminate\Routing\Middleware\ThrottleRequests;
 use Illuminate\Routing\Middleware\ValidateSignature;
-use Illuminate\Session\Middleware\AuthenticateSession;
 use Illuminate\Session\Middleware\StartSession;
 use Illuminate\View\Middleware\ShareErrorsFromSession;
 
@@ -43,12 +43,13 @@ class Kernel extends HttpKernel {
 	 * @var array
 	 */
 	protected $middleware = [
+		// \App\Http\Middleware\TrustHosts::class,
+		TrustProxies::class,
 		HandleCors::class,
 		CheckForMaintenanceMode::class,
 		ValidatePostSize::class,
 		TrimStrings::class,
 		ConvertEmptyStringsToNull::class,
-		TrustProxies::class,
 	];
 
 	/**
@@ -82,40 +83,24 @@ class Kernel extends HttpKernel {
 	 * @var array
 	 */
 	protected $routeMiddleware = [
-		'auth'          => Authenticate::class,
-		'auth.basic'    => AuthenticateWithBasicAuth::class,
-		'bindings'      => SubstituteBindings::class,
-		'cache.headers' => SetCacheHeaders::class,
-		'can'           => Authorize::class,
-		'guest'         => RedirectIfAuthenticated::class,
-		'signed'        => ValidateSignature::class,
-		'throttle'      => ThrottleRequests::class,
-		'verified'      => EnsureEmailIsVerified::class,
-		'webApi'        => WebApi::class,
-		'isAdmin'       => isAdmin::class,
-		'isAdminLogin'  => isAdminLogin::class,
-		'isLogin'       => isLogin::class,
-		'isMaintenance' => isMaintenance::class,
-		'isSecurity'    => isSecurity::class,
-		'isForbidden'   => isForbidden::class,
-		'affiliate'     => Affiliate::class,
-
-	];
-
+		'auth'             => Authenticate::class,
+		'auth.basic'       => AuthenticateWithBasicAuth::class,
+		'bindings'         => SubstituteBindings::class,
+		'cache.headers'    => SetCacheHeaders::class,
+		'can'              => Authorize::class,
+		'guest'            => RedirectIfAuthenticated::class,
+		'password.confirm' => RequirePassword::class,
+		'signed'           => ValidateSignature::class,
+		'throttle'         => ThrottleRequests::class,
+		'verified'         => EnsureEmailIsVerified::class,
+		'webApi'           => WebApi::class,
+		'isAdmin'          => isAdmin::class,
+		'isAdminLogin'     => isAdminLogin::class,
+		'isLogin'          => isLogin::class,
+		'isMaintenance'    => isMaintenance::class,
+		'isSecurity'       => isSecurity::class,
+		'isForbidden'      => isForbidden::class,
+		'affiliate'        => Affiliate::class,
 
-	/**
-	 * The priority-sorted list of middleware.
-	 *
-	 * This forces non-global middleware to always be in the given order.
-	 *
-	 * @var array
-	 */
-	protected $middlewarePriority = [
-		StartSession::class,
-		ShareErrorsFromSession::class,
-		Middleware\Authenticate::class,
-		AuthenticateSession::class,
-		SubstituteBindings::class,
-		Authorize::class,
 	];
 }

+ 18 - 0
app/Http/Middleware/TrustHosts.php

@@ -0,0 +1,18 @@
+<?php
+
+namespace App\Http\Middleware;
+
+use Illuminate\Http\Middleware\TrustHosts as Middleware;
+
+class TrustHosts extends Middleware {
+	/**
+	 * Get the host patterns that should be trusted.
+	 *
+	 * @return array
+	 */
+	public function hosts() {
+		return [
+			$this->allSubdomainsOfApplicationUrl(),
+		];
+	}
+}

+ 0 - 27
app/Listeners/EventListener.php

@@ -1,27 +0,0 @@
-<?php
-
-namespace App\Listeners;
-
-use App\Events\Event;
-
-class EventListener {
-	/**
-	 * Create the event listener.
-	 *
-	 * @return void
-	 */
-	public function __construct() {
-		//
-	}
-
-	/**
-	 * Handle the event.
-	 *
-	 * @param  Event  $event
-	 *
-	 * @return void
-	 */
-	public function handle(Event $event): void {
-		//
-	}
-}

+ 0 - 27
app/Listeners/LogSendingMessage.php

@@ -1,27 +0,0 @@
-<?php
-
-namespace App\Listeners;
-
-use Illuminate\Mail\Events\MessageSending;
-
-class LogSendingMessage {
-	/**
-	 * Create the event listener.
-	 *
-	 * @return void
-	 */
-	public function __construct() {
-		//
-	}
-
-	/**
-	 * Handle the event.
-	 *
-	 * @param  MessageSending  $event
-	 *
-	 * @return void
-	 */
-	public function handle(MessageSending $event): void {
-		//\Log::info('MessageSending:' . var_export($event->data, true));
-	}
-}

+ 0 - 27
app/Listeners/LogSentMessage.php

@@ -1,27 +0,0 @@
-<?php
-
-namespace App\Listeners;
-
-use Illuminate\Mail\Events\MessageSent;
-
-class LogSentMessage {
-	/**
-	 * Create the event listener.
-	 *
-	 * @return void
-	 */
-	public function __construct() {
-		//
-	}
-
-	/**
-	 * Handle the event.
-	 *
-	 * @param  MessageSent  $event
-	 *
-	 * @return void
-	 */
-	public function handle(MessageSent $event): void {
-		//\Log::info('MessageSent:' . var_export($event, true));
-	}
-}

+ 3 - 1
app/Providers/AppServiceProvider.php

@@ -26,7 +26,9 @@ class AppServiceProvider extends ServiceProvider {
 	 * @return void
 	 */
 	public function register() {
-		if($this->app->environment() !== 'production'){
+		if($this->app->isLocal()){
+			$this->app->register(\Laravel\Telescope\TelescopeServiceProvider::class);
+			$this->app->register(TelescopeServiceProvider::class);
 			$this->app->register(IdeHelperServiceProvider::class);
 		}
 	}

+ 13 - 9
app/Providers/EventServiceProvider.php

@@ -2,6 +2,7 @@
 
 namespace App\Providers;
 
+use Illuminate\Auth\Events\Registered;
 use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
 
 class EventServiceProvider extends ServiceProvider {
@@ -11,14 +12,17 @@ class EventServiceProvider extends ServiceProvider {
 	 * @var array
 	 */
 	protected $listen = [
-		'App\Events\Event'                      => [
-			'App\Listeners\EventListener',
-		],
-		'Illuminate\Mail\Events\MessageSending' => [
-			'App\Listeners\LogSendingMessage',
-		],
-		'Illuminate\Mail\Events\MessageSent'    => [
-			'App\Listeners\LogSentMessage',
-		],
+		Registered::class => [],
 	];
+
+	/**
+	 * Register any events for your application.
+	 *
+	 * @return void
+	 */
+	public function boot() {
+		parent::boot();
+
+		//
+	}
 }

+ 69 - 0
app/Providers/TelescopeServiceProvider.php

@@ -0,0 +1,69 @@
+<?php
+
+namespace App\Providers;
+
+use Illuminate\Support\Facades\Gate;
+use Laravel\Telescope\IncomingEntry;
+use Laravel\Telescope\Telescope;
+use Laravel\Telescope\TelescopeApplicationServiceProvider;
+
+class TelescopeServiceProvider extends TelescopeApplicationServiceProvider
+{
+    /**
+     * Register any application services.
+     *
+     * @return void
+     */
+    public function register()
+    {
+        // Telescope::night();
+
+        $this->hideSensitiveRequestDetails();
+
+        Telescope::filter(function (IncomingEntry $entry) {
+            if ($this->app->environment('local')) {
+                return true;
+            }
+
+            return $entry->isReportableException() ||
+                   $entry->isFailedRequest() ||
+                   $entry->isFailedJob() ||
+                   $entry->isScheduledTask() ||
+                   $entry->hasMonitoredTag();
+        });
+    }
+
+    /**
+     * Prevent sensitive request details from being logged by Telescope.
+     *
+     * @return void
+     */
+    protected function hideSensitiveRequestDetails()
+    {
+        if ($this->app->environment('local')) {
+            return;
+        }
+
+        Telescope::hideRequestParameters(['_token']);
+
+        Telescope::hideRequestHeaders([
+            'cookie',
+            'x-csrf-token',
+            'x-xsrf-token',
+        ]);
+    }
+
+    /**
+     * Register the Telescope gate.
+     *
+     * This gate determines who can access Telescope in non-local environments.
+     *
+     * @return void
+     */
+    protected function gate()
+    {
+        Gate::define('viewTelescope', function ($user) {
+            return $user->is_admin;
+        });
+    }
+}

+ 13 - 8
composer.json

@@ -35,13 +35,14 @@
     "zbrettonye/no-captcha": "^1.0"
   },
   "require-dev": {
-	"barryvdh/laravel-debugbar": "^3.4",
-	"barryvdh/laravel-ide-helper": "^2.8",
-	"facade/ignition": "^2.0",
-	"fzaninotto/faker": "^1.9.1",
-	"mockery/mockery": "^1.3.1",
-	"nunomaduro/collision": "^4.1",
-	"phpunit/phpunit": "^8.5"
+    "barryvdh/laravel-debugbar": "^3.4",
+    "barryvdh/laravel-ide-helper": "^2.8",
+    "facade/ignition": "^2.0",
+    "fzaninotto/faker": "^1.9.1",
+    "laravel/telescope": "^3.5",
+    "mockery/mockery": "^1.3.1",
+    "nunomaduro/collision": "^4.1",
+    "phpunit/phpunit": "^8.5"
   },
   "config": {
 	"optimize-autoloader": true,
@@ -50,7 +51,11 @@
   },
   "extra": {
 	"laravel": {
-	  "dont-discover": []
+	  "dont-discover": [
+		"barryvdh/laravel-debugbar",
+		"barryvdh/laravel-ide-helper",
+		"laravel/telescope"
+	  ]
 	}
   },
   "autoload": {

+ 278 - 1
composer.lock

@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "9cc259d29a4a2882654c83d01a78b8eb",
+    "content-hash": "cfaebfda187f32ffbecabdd715f95d80",
     "packages": [
         {
             "name": "asm89/stack-cors",
@@ -7620,6 +7620,69 @@
             ],
             "time": "2020-05-27T16:41:55+00:00"
         },
+        {
+            "name": "laravel/telescope",
+            "version": "v3.5.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/laravel/telescope.git",
+                "reference": "a8d2e1106ba655006fde47a0b7ed53851c6398f5"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/laravel/telescope/zipball/a8d2e1106ba655006fde47a0b7ed53851c6398f5",
+                "reference": "a8d2e1106ba655006fde47a0b7ed53851c6398f5",
+                "shasum": ""
+            },
+            "require": {
+                "ext-json": "*",
+                "laravel/framework": "^6.0|^7.0",
+                "moontoast/math": "^1.1",
+                "php": "^7.2",
+                "symfony/var-dumper": "^4.4|^5.0"
+            },
+            "require-dev": {
+                "ext-gd": "*",
+                "orchestra/testbench": "^4.0|^5.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "3.x-dev"
+                },
+                "laravel": {
+                    "providers": [
+                        "Laravel\\Telescope\\TelescopeServiceProvider"
+                    ]
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Laravel\\Telescope\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Taylor Otwell",
+                    "email": "taylor@laravel.com"
+                },
+                {
+                    "name": "Mohamed Said",
+                    "email": "mohamed@laravel.com"
+                }
+            ],
+            "description": "An elegant debug assistant for the Laravel framework.",
+            "keywords": [
+                "debugging",
+                "laravel",
+                "monitoring"
+            ],
+            "time": "2020-07-28T19:12:33+00:00"
+        },
         {
             "name": "maximebf/debugbar",
             "version": "v1.16.3",
@@ -7749,6 +7812,57 @@
             ],
             "time": "2020-08-11T18:10:13+00:00"
         },
+        {
+            "name": "moontoast/math",
+            "version": "1.2.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/ramsey/moontoast-math.git",
+                "reference": "5f47d34c87767dbcc08b30377a9827df71de91fa"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/ramsey/moontoast-math/zipball/5f47d34c87767dbcc08b30377a9827df71de91fa",
+                "reference": "5f47d34c87767dbcc08b30377a9827df71de91fa",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.3",
+                "phpseclib/bcmath_compat": ">=1.0.3"
+            },
+            "require-dev": {
+                "jakub-onderka/php-parallel-lint": "^0.9.0",
+                "phpunit/phpunit": "^4.8 || ^5.5 || ^6.5 || ^7.0",
+                "satooshi/php-coveralls": "^0.6.1",
+                "squizlabs/php_codesniffer": "^2.3"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "Moontoast\\Math\\": "src/Moontoast/Math",
+                    "Moontoast\\Math\\Exception\\": "src/Moontoast/Math/Exception"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "Apache-2.0"
+            ],
+            "authors": [
+                {
+                    "name": "Ben Ramsey",
+                    "email": "ben@benramsey.com",
+                    "homepage": "https://benramsey.com"
+                }
+            ],
+            "description": "A mathematics library, providing functionality for large numbers",
+            "homepage": "https://github.com/ramsey/moontoast-math",
+            "keywords": [
+                "bcmath",
+                "math"
+            ],
+            "abandoned": "brick/math",
+            "time": "2020-01-05T04:49:34+00:00"
+        },
         {
             "name": "myclabs/deep-copy",
             "version": "1.10.1",
@@ -8135,6 +8249,169 @@
             "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
             "time": "2020-06-27T10:12:23+00:00"
         },
+        {
+            "name": "phpseclib/bcmath_compat",
+            "version": "1.0.5",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/phpseclib/bcmath_compat.git",
+                "reference": "89cbb63742a32730b7187773a60b6b12b9db4479"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/phpseclib/bcmath_compat/zipball/89cbb63742a32730b7187773a60b6b12b9db4479",
+                "reference": "89cbb63742a32730b7187773a60b6b12b9db4479",
+                "shasum": ""
+            },
+            "require": {
+                "phpseclib/phpseclib": ">=2.0.19"
+            },
+            "provide": {
+                "ext-bcmath": "7.3.5"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^4.8.35|^5.7|^6.0",
+                "squizlabs/php_codesniffer": "^3.0"
+            },
+            "suggest": {
+                "ext-gmp": "Will enable faster math operations"
+            },
+            "type": "library",
+            "autoload": {
+                "files": [
+                    "lib/bcmath.php"
+                ],
+                "psr-4": {
+                    "bcmath_compat\\": "src"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Jim Wigginton",
+                    "email": "terrafrost@php.net",
+                    "homepage": "http://phpseclib.sourceforge.net"
+                }
+            ],
+            "description": "PHP 5.x/7.x polyfill for bcmath extension",
+            "keywords": [
+                "BigInteger",
+                "bcmath",
+                "bigdecimal",
+                "math",
+                "polyfill"
+            ],
+            "time": "2020-04-26T16:34:33+00:00"
+        },
+        {
+            "name": "phpseclib/phpseclib",
+            "version": "2.0.28",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/phpseclib/phpseclib.git",
+                "reference": "d1ca58cf33cb21046d702ae3a7b14fdacd9f3260"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/d1ca58cf33cb21046d702ae3a7b14fdacd9f3260",
+                "reference": "d1ca58cf33cb21046d702ae3a7b14fdacd9f3260",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.3"
+            },
+            "require-dev": {
+                "phing/phing": "~2.7",
+                "phpunit/phpunit": "^4.8.35|^5.7|^6.0",
+                "sami/sami": "~2.0",
+                "squizlabs/php_codesniffer": "~2.0"
+            },
+            "suggest": {
+                "ext-gmp": "Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.",
+                "ext-libsodium": "SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.",
+                "ext-mcrypt": "Install the Mcrypt extension in order to speed up a few other cryptographic operations.",
+                "ext-openssl": "Install the OpenSSL extension in order to speed up a wide variety of cryptographic operations."
+            },
+            "type": "library",
+            "autoload": {
+                "files": [
+                    "phpseclib/bootstrap.php"
+                ],
+                "psr-4": {
+                    "phpseclib\\": "phpseclib/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Jim Wigginton",
+                    "email": "terrafrost@php.net",
+                    "role": "Lead Developer"
+                },
+                {
+                    "name": "Patrick Monnerat",
+                    "email": "pm@datasphere.ch",
+                    "role": "Developer"
+                },
+                {
+                    "name": "Andreas Fischer",
+                    "email": "bantu@phpbb.com",
+                    "role": "Developer"
+                },
+                {
+                    "name": "Hans-Jürgen Petrich",
+                    "email": "petrich@tronic-media.com",
+                    "role": "Developer"
+                },
+                {
+                    "name": "Graham Campbell",
+                    "email": "graham@alt-three.com",
+                    "role": "Developer"
+                }
+            ],
+            "description": "PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.",
+            "homepage": "http://phpseclib.sourceforge.net",
+            "keywords": [
+                "BigInteger",
+                "aes",
+                "asn.1",
+                "asn1",
+                "blowfish",
+                "crypto",
+                "cryptography",
+                "encryption",
+                "rsa",
+                "security",
+                "sftp",
+                "signature",
+                "signing",
+                "ssh",
+                "twofish",
+                "x.509",
+                "x509"
+            ],
+            "funding": [
+                {
+                    "url": "https://github.com/terrafrost",
+                    "type": "github"
+                },
+                {
+                    "url": "https://www.patreon.com/phpseclib",
+                    "type": "patreon"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/phpseclib/phpseclib",
+                    "type": "tidelift"
+                }
+            ],
+            "time": "2020-07-08T09:08:33+00:00"
+        },
         {
             "name": "phpspec/prophecy",
             "version": "1.11.1",

+ 2 - 2
config/app.php

@@ -39,8 +39,8 @@ return [
     |
     */
 
-    'debug' => env('APP_DEBUG', false),
-    'demo' => env('APP_DEMO', false),
+    'debug' => (bool) env('APP_DEBUG', false),
+    'demo' => (bool) env('APP_DEMO', false),
 
     /*
     |--------------------------------------------------------------------------

+ 163 - 0
config/telescope.php

@@ -0,0 +1,163 @@
+<?php
+
+use Laravel\Telescope\Http\Middleware\Authorize;
+use Laravel\Telescope\Watchers;
+
+return [
+
+    /*
+    |--------------------------------------------------------------------------
+    | Telescope Domain
+    |--------------------------------------------------------------------------
+    |
+    | This is the subdomain where Telescope will be accessible from. If the
+    | setting is null, Telescope will reside under the same domain as the
+    | application. Otherwise, this value will be used as the subdomain.
+    |
+    */
+
+    'domain' => env('TELESCOPE_DOMAIN', null),
+
+    /*
+    |--------------------------------------------------------------------------
+    | Telescope Path
+    |--------------------------------------------------------------------------
+    |
+    | This is the URI path where Telescope will be accessible from. Feel free
+    | to change this path to anything you like. Note that the URI will not
+    | affect the paths of its internal API that aren't exposed to users.
+    |
+    */
+
+    'path' => env('TELESCOPE_PATH', 'telescope'),
+
+    /*
+    |--------------------------------------------------------------------------
+    | Telescope Storage Driver
+    |--------------------------------------------------------------------------
+    |
+    | This configuration options determines the storage driver that will
+    | be used to store Telescope's data. In addition, you may set any
+    | custom options as needed by the particular driver you choose.
+    |
+    */
+
+    'driver' => env('TELESCOPE_DRIVER', 'database'),
+
+    'storage' => [
+        'database' => [
+            'connection' => env('DB_CONNECTION', 'mysql'),
+            'chunk' => 1000,
+        ],
+    ],
+
+    /*
+    |--------------------------------------------------------------------------
+    | Telescope Master Switch
+    |--------------------------------------------------------------------------
+    |
+    | This option may be used to disable all Telescope watchers regardless
+    | of their individual configuration, which simply provides a single
+    | and convenient way to enable or disable Telescope data storage.
+    |
+    */
+
+    'enabled' => env('TELESCOPE_ENABLED', true),
+
+    /*
+    |--------------------------------------------------------------------------
+    | Telescope Route Middleware
+    |--------------------------------------------------------------------------
+    |
+    | These middleware will be assigned to every Telescope route, giving you
+    | the chance to add your own middleware to this list or change any of
+    | the existing middleware. Or, you can simply stick with this list.
+    |
+    */
+
+    'middleware' => [
+        'web',
+        Authorize::class,
+    ],
+
+    /*
+    |--------------------------------------------------------------------------
+    | Ignored Paths & Commands
+    |--------------------------------------------------------------------------
+    |
+    | The following array lists the URI paths and Artisan commands that will
+    | not be watched by Telescope. In addition to this list, some Laravel
+    | commands, like migrations and queue commands, are always ignored.
+    |
+    */
+
+    'ignore_paths' => [
+        'nova-api*',
+    ],
+
+    'ignore_commands' => [
+        //
+    ],
+
+    /*
+    |--------------------------------------------------------------------------
+    | Telescope Watchers
+    |--------------------------------------------------------------------------
+    |
+    | The following array lists the "watchers" that will be registered with
+    | Telescope. The watchers gather the application's profile data when
+    | a request or task is executed. Feel free to customize this list.
+    |
+    */
+
+    'watchers' => [
+        Watchers\CacheWatcher::class => env('TELESCOPE_CACHE_WATCHER', true),
+
+        Watchers\CommandWatcher::class => [
+            'enabled' => env('TELESCOPE_COMMAND_WATCHER', true),
+            'ignore' => [],
+        ],
+
+        Watchers\DumpWatcher::class => env('TELESCOPE_DUMP_WATCHER', true),
+
+        Watchers\EventWatcher::class => [
+            'enabled' => env('TELESCOPE_EVENT_WATCHER', true),
+            'ignore' => [],
+        ],
+
+        Watchers\ExceptionWatcher::class => env('TELESCOPE_EXCEPTION_WATCHER', true),
+        Watchers\JobWatcher::class => env('TELESCOPE_JOB_WATCHER', true),
+        Watchers\LogWatcher::class => env('TELESCOPE_LOG_WATCHER', true),
+        Watchers\MailWatcher::class => env('TELESCOPE_MAIL_WATCHER', true),
+
+        Watchers\ModelWatcher::class => [
+            'enabled' => env('TELESCOPE_MODEL_WATCHER', true),
+            'events' => ['eloquent.*'],
+        ],
+
+        Watchers\NotificationWatcher::class => env('TELESCOPE_NOTIFICATION_WATCHER', true),
+
+        Watchers\QueryWatcher::class => [
+            'enabled' => env('TELESCOPE_QUERY_WATCHER', true),
+            'ignore_packages' => true,
+            'slow' => 100,
+        ],
+
+        Watchers\RedisWatcher::class => env('TELESCOPE_REDIS_WATCHER', true),
+
+        Watchers\RequestWatcher::class => [
+            'enabled' => env('TELESCOPE_REQUEST_WATCHER', true),
+            'size_limit' => env('TELESCOPE_RESPONSE_SIZE_LIMIT', 64),
+        ],
+
+        Watchers\GateWatcher::class => [
+            'enabled' => env('TELESCOPE_GATE_WATCHER', true),
+            'ignore_abilities' => [],
+            'ignore_packages' => true,
+        ],
+
+        Watchers\ScheduleWatcher::class => env('TELESCOPE_SCHEDULE_WATCHER', true),
+
+        Watchers\ViewWatcher::class => env('TELESCOPE_VIEW_WATCHER', true),
+    ],
+];

+ 0 - 1
phpunit.xml

@@ -8,7 +8,6 @@
         <testsuite name="Unit">
             <directory suffix="Test.php">./tests/Unit</directory>
         </testsuite>
-
         <testsuite name="Feature">
             <directory suffix="Test.php">./tests/Feature</directory>
         </testsuite>

File diff suppressed because it is too large
+ 7 - 0
public/vendor/telescope/app-dark.css


File diff suppressed because it is too large
+ 7 - 0
public/vendor/telescope/app.css


File diff suppressed because it is too large
+ 1 - 0
public/vendor/telescope/app.js


二進制
public/vendor/telescope/favicon.ico


+ 5 - 0
public/vendor/telescope/mix-manifest.json

@@ -0,0 +1,5 @@
+{
+    "/app.js": "/app.js?id=b0a54caa17bc0ac7c25c",
+    "/app.css": "/app.css?id=11fa83493c95c672325c",
+    "/app-dark.css": "/app-dark.css?id=9f68f3c353c3417fd043"
+}

+ 19 - 4
readme.md

@@ -12,13 +12,28 @@ Support but not limited to: Shadowsocks,ShadowsocksR,ShadowsocksRR,V2Ray,Trojan,
 - [Upcoming](https://github.com/ZBrettonYe/ProxyPanel/projects/2)
 - [Telegram](https://t.me/joinchat/GUrO5hZsT3FOd79HAa9pcA)
 
+
 ## Requirements
-- PHP 7.3 +
-- Mysql 5.5 +
 - Memory 1G +
 - Disk 10G +
-- PHP Extensions: ZIP、XML、CURL、GD2、FileInfo、Imagick、OpenSSL、Mbstring、PDO、Tokenizer、Ctype、JSON、BCMath
-- Laravel 5.8
+
+### Laravel 7
+- PHP >= 7.2.5
+- BCMath PHP Extension
+- Ctype PHP Extension
+- Fileinfo PHP extension
+- JSON PHP Extension
+- Mbstring PHP Extension
+- OpenSSL PHP Extension
+- PDO PHP Extension
+- Tokenizer PHP Extension
+- XML PHP Extension
+- Redis PHP Extension
+- Imagick PHP Extension
+
+### Database
+- Mysql 5.5 + (recommend 5.7+)
+- Redis
 
 ## Thanks
 - [@shadowsocks](https://github.com/shadowsocks)

Some files were not shown because too many files changed in this diff