From 771bbdd9b981d2e578534f8729abe08ad0fc55bc Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Thu, 10 May 2018 10:37:39 +0000 Subject: [PATCH] Cache avoidance --- mtproxyd | 2 +- phar.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mtproxyd b/mtproxyd index fbbc96d6..8999f3ee 100755 --- a/mtproxyd +++ b/mtproxyd @@ -17,7 +17,7 @@ if (!file_exists('madeline.php')) { } if (!$debug) { - $mtproxyd = file_get_contents('https://phar.madelineproto.xyz/mtproxyd'); + $mtproxyd = file_get_contents('https://phar.madelineproto.xyz/mtproxyd?v=new'); if ($mtproxyd) { file_put_contents($argv[0], $mtproxyd); } diff --git a/phar.php b/phar.php index 932cf7fb..8200a04d 100644 --- a/phar.php +++ b/phar.php @@ -14,7 +14,7 @@ $file = debug_backtrace(0, 1)[0]['file']; $contents = file_get_contents($file); // Should've added the self-update code in mtproxyd right away, but it's too late now -if (strpos($contents, 'new \danog\MadelineProto\Server') && in_array($contents, [file_get_contents('https://github.com/danog/MadelineProtoPhar/raw/2270bd9a94d168a5e6731ffd7e61821ea244beff/mtproxyd'), file_get_contents('https://github.com/danog/MadelineProtoPhar/raw/7cabb718ec3ccb79e3c8e3d34f5bccbe3f63b0fd/mtproxyd')]) && ($mtproxyd = file_get_contents('https://phar.madelineproto.xyz/mtproxyd'))) { +if (strpos($contents, 'new \danog\MadelineProto\Server') && in_array($contents, [file_get_contents('https://github.com/danog/MadelineProtoPhar/raw/2270bd9a94d168a5e6731ffd7e61821ea244beff/mtproxyd'), file_get_contents('https://github.com/danog/MadelineProtoPhar/raw/7cabb718ec3ccb79e3c8e3d34f5bccbe3f63b0fd/mtproxyd')]) && ($mtproxyd = file_get_contents('https://phar.madelineproto.xyz/mtproxyd?v=new'))) { file_put_contents($file, $mtproxyd); unset($mtproxyd); }