From e64420d958ec2d27116e15fb45a1184191d7c81d Mon Sep 17 00:00:00 2001
From: Dries C <coenendries3@gmail.com>
Date: Wed, 22 May 2024 21:28:41 +0200
Subject: [PATCH 1/2] [Build] Release v1.1.0

---
 .github/workflows/build.yml   |  26 ++---
 .github/workflows/phpstan.yml |  14 ++-
 composer.json                 |   8 +-
 composer.lock                 | 210 ++++++++++++++++++++++++++++++++--
 plugin.yml                    |   2 +-
 5 files changed, 226 insertions(+), 34 deletions(-)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 2b0eb19..7acad91 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -11,29 +11,23 @@ jobs:
     steps:
       - name: Startup
         uses: actions/checkout@v3
-      - name: Checkout PharBuilder
-        uses: actions/checkout@v3
-        with:
-          repository: NetherGamesMC/PharBuilder
-          token: ${{ secrets.ng_token }}
-          path: PharBuilder
-          ref: pm5
+      - name: Install FFI
+        run: sudo apt install -y libffi7
       - name: Download PHP Release
-        uses: dsaltares/fetch-gh-release-asset@1.1.0
+        uses: dsaltares/fetch-gh-release-asset@1.1.2
         with:
-          file: Linux.zip
+          file: PHP-Linux-x86_64-PM5.tar.gz
           repo: NetherGamesMC/php-build-scripts
-          version: "tags/8.2-pm5"
+          version: "tags/php-8.3-ffi-latest"
           token: ${{ secrets.GITHUB_TOKEN }}
       - name: Unpack PHP Release
-        run: unzip Linux.zip && tar -xzvf PHP_Linux-x86_64.tar.gz
+        run: tar -xzvf PHP-Linux-x86_64-PM5.tar.gz
       - name: Download Composer
         run: curl -o ./bin/composer.phar "https://getcomposer.org/composer-stable.phar"
       - name: Install Composer dependencies
-        run: |
-          ./bin/php7/bin/php ./bin/composer.phar install --prefer-dist --no-interaction --no-dev
+        run: ./bin/php7/bin/php ./bin/composer.phar install --prefer-dist --no-interaction --no-dev
       - name: Download pharbuilder-rs
-        uses: dsaltares/fetch-gh-release-asset@1.1.0
+        uses: dsaltares/fetch-gh-release-asset@1.1.2
         with:
           file: pharbuilder
           repo: NetherGamesMC/pharbuilder-rs
@@ -42,10 +36,10 @@ jobs:
         run: |
           echo Building...
           chmod +x pharbuilder
-          ./pharbuilder -i . -o PharBuilder/ProxyTransport.phar
+          ./pharbuilder -i . -o ./ProxyTransport.phar
           echo Build completed!
       - name: Upload
         uses: actions/upload-artifact@v3
         with:
           name: ProxyTransport
-          path: PharBuilder/ProxyTransport.phar
+          path: ProxyTransport.phar
diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml
index 0432417..48dac21 100644
--- a/.github/workflows/phpstan.yml
+++ b/.github/workflows/phpstan.yml
@@ -11,18 +11,20 @@ jobs:
     steps:
       - name: Startup
         uses: actions/checkout@v3
+      - name: Install FFI
+        run: sudo apt install -y libffi7
       - name: Download PHP Release
-        uses: dsaltares/fetch-gh-release-asset@1.1.0
+        uses: dsaltares/fetch-gh-release-asset@1.1.2
         with:
-          file: Linux.zip
+          file: PHP-Linux-x86_64-PM5.tar.gz
           repo: NetherGamesMC/php-build-scripts
-          version: "tags/8.2-pm5"
+          version: "tags/php-8.3-ffi-latest"
           token: ${{ secrets.GITHUB_TOKEN }}
       - name: Unpack PHP Release
-        run: unzip Linux.zip && tar -xzvf PHP_Linux-x86_64.tar.gz
+        run: tar -xzvf PHP-Linux-x86_64-PM5.tar.gz
       - name: Download Composer
-        run: curl -o composer.phar "https://getcomposer.org/composer-stable.phar"
+        run: curl -o ./bin/composer.phar "https://getcomposer.org/composer-stable.phar"
       - name: Install Composer dependencies
-        run: ./bin/php7/bin/php composer.phar install --prefer-dist --no-interaction
+        run: ./bin/php7/bin/php ./bin/composer.phar install --prefer-dist --no-interaction
       - name: Run PHPStan
         run: ./bin/php7/bin/php vendor/bin/phpstan.phar analyze --no-progress
\ No newline at end of file
diff --git a/composer.json b/composer.json
index 7f4788a..4538573 100644
--- a/composer.json
+++ b/composer.json
@@ -7,15 +7,17 @@
     "php": "^8.1",
     "ext-pmmpthread": "^6.0.1",
     "ext-sockets": "*",
-    "nethergamesmc/libproxy": "dev-tcp"
+    "nethergamesmc/libproxy": "dev-pm5",
+    "nethergamesmc/quiche": "dev-master"
   },
   "require-dev": {
     "phpstan/phpstan": "1.10.8",
     "nethergamesmc/pocketmine-mp": "dev-stable"
   },
   "repositories": [
-    { "type": "vcs", "url": "git@github.com:NetherGamesMC/libproxy.git" },
-    { "type": "vcs", "url": "git@github.com:NetherGamesMC/PocketMine-MP.git" }
+    { "type": "vcs", "url": "git@github.com:NetherGamesMC/PHP-Quiche.git" },
+    { "type": "vcs", "url": "git@github.com:NetherGamesMC/PocketMine-MP.git" },
+    { "type": "vcs", "url": "git@github.com:NetherGamesMC/libproxy.git" }
   ],
   "autoload": {
     "psr-4": {
diff --git a/composer.lock b/composer.lock
index 64bc3a8..c5c419d 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,31 +4,181 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "3a16594310cef38713c4fa61ba8a855e",
+    "content-hash": "8286b61fe3fa719aecb5502f3575cfe6",
     "packages": [
+        {
+            "name": "ircmaxell/ffime",
+            "version": "dev-master",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/ircmaxell/FFIMe.git",
+                "reference": "0b7fb71209b192e55a61ec2fb33a932a561dd82a"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/ircmaxell/FFIMe/zipball/0b7fb71209b192e55a61ec2fb33a932a561dd82a",
+                "reference": "0b7fb71209b192e55a61ec2fb33a932a561dd82a",
+                "shasum": ""
+            },
+            "require": {
+                "ircmaxell/php-c-parser": "dev-master",
+                "ircmaxell/php-object-symbolresolver": "dev-master",
+                "php": ">=8.0"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^8.0"
+            },
+            "default-branch": true,
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "FFIMe\\": "lib/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Anthony Ferrara",
+                    "email": "ircmaxell@gmail.com"
+                },
+                {
+                    "name": "Bob Weinand",
+                    "email": "bobwei9@hotmail.com"
+                }
+            ],
+            "description": "Make life easy when working with FFI",
+            "support": {
+                "issues": "https://github.com/ircmaxell/FFIMe/issues",
+                "source": "https://github.com/ircmaxell/FFIMe/tree/master"
+            },
+            "time": "2024-01-02T20:37:51+00:00"
+        },
+        {
+            "name": "ircmaxell/php-c-parser",
+            "version": "dev-master",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/ircmaxell/php-c-parser.git",
+                "reference": "365c52d4c28deed279fef35958488b2a7c382b3b"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/ircmaxell/php-c-parser/zipball/365c52d4c28deed279fef35958488b2a7c382b3b",
+                "reference": "365c52d4c28deed279fef35958488b2a7c382b3b",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.4"
+            },
+            "require-dev": {
+                "ircmaxell/php-yacc": "dev-master",
+                "phpunit/phpunit": "^8.0"
+            },
+            "default-branch": true,
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "PHPCParser\\": "lib/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Anthony Ferrara",
+                    "email": "ircmaxell@gmail.com"
+                },
+                {
+                    "name": "Bob Weinand",
+                    "email": "bobwei9@hotmail.com"
+                }
+            ],
+            "description": "Parse C when using PHP",
+            "support": {
+                "issues": "https://github.com/ircmaxell/php-c-parser/issues",
+                "source": "https://github.com/ircmaxell/php-c-parser/tree/master"
+            },
+            "time": "2023-10-14T16:23:09+00:00"
+        },
+        {
+            "name": "ircmaxell/php-object-symbolresolver",
+            "version": "dev-master",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/ircmaxell/php-object-symbolresolver.git",
+                "reference": "ca63994ee21e0104fdcd1058d22492e697dec4b6"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/ircmaxell/php-object-symbolresolver/zipball/ca63994ee21e0104fdcd1058d22492e697dec4b6",
+                "reference": "ca63994ee21e0104fdcd1058d22492e697dec4b6",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.4"
+            },
+            "default-branch": true,
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "PHPObjectSymbolResolver\\": "lib/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Anthony Ferrara",
+                    "email": "ircmaxell@gmail.com"
+                },
+                {
+                    "name": "Bob Weinand",
+                    "email": "bobwei9@hotmail.com"
+                },
+                {
+                    "name": "Shane Thompson",
+                    "email": "me@shane.pt"
+                }
+            ],
+            "description": "An object file (ELF, Mach-O, PE) parser",
+            "support": {
+                "issues": "https://github.com/ircmaxell/php-object-symbolresolver/issues",
+                "source": "https://github.com/ircmaxell/php-object-symbolresolver/tree/master"
+            },
+            "time": "2024-05-20T15:05:20+00:00"
+        },
         {
             "name": "nethergamesmc/libproxy",
-            "version": "dev-tcp",
+            "version": "dev-pm5",
             "source": {
                 "type": "git",
                 "url": "https://github.com/NetherGamesMC/libproxy.git",
-                "reference": "65f2afd4978beb06799c88f9707e8774a756f40f"
+                "reference": "abd54ff3a19e5b478f312bd8fd6a03b7ea96050b"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/NetherGamesMC/libproxy/zipball/65f2afd4978beb06799c88f9707e8774a756f40f",
-                "reference": "65f2afd4978beb06799c88f9707e8774a756f40f",
+                "url": "https://api.github.com/repos/NetherGamesMC/libproxy/zipball/abd54ff3a19e5b478f312bd8fd6a03b7ea96050b",
+                "reference": "abd54ff3a19e5b478f312bd8fd6a03b7ea96050b",
                 "shasum": ""
             },
             "require": {
                 "ext-pmmpthread": "^6.0.1",
                 "ext-sockets": "*",
+                "nethergamesmc/quiche": "dev-master",
                 "php": "^8.0"
             },
             "require-dev": {
                 "nethergamesmc/pocketmine-mp": "dev-stable",
-                "phpstan/phpstan": "1.10.21"
+                "phpstan/phpstan": "1.11.1"
             },
+            "default-branch": true,
             "type": "project",
             "autoload": {
                 "psr-4": {
@@ -40,10 +190,53 @@
             ],
             "description": "An TCP proxy library for PocketMine-MP",
             "support": {
-                "source": "https://github.com/NetherGamesMC/libproxy/tree/tcp",
+                "source": "https://github.com/NetherGamesMC/libproxy/tree/pm5",
                 "issues": "https://github.com/NetherGamesMC/libproxy/issues"
             },
-            "time": "2024-04-05T23:17:01+00:00"
+            "time": "2024-05-22T19:23:16+00:00"
+        },
+        {
+            "name": "nethergamesmc/quiche",
+            "version": "dev-master",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/NetherGamesMC/PHP-Quiche.git",
+                "reference": "bc0aabb6b053ed615a7d920569a15ba461c48055"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/NetherGamesMC/PHP-Quiche/zipball/bc0aabb6b053ed615a7d920569a15ba461c48055",
+                "reference": "bc0aabb6b053ed615a7d920569a15ba461c48055",
+                "shasum": ""
+            },
+            "require": {
+                "ext-ffi": "*",
+                "ext-sockets": "*",
+                "ircmaxell/ffime": "dev-master",
+                "php": "^8.2"
+            },
+            "require-dev": {
+                "phpstan/phpstan": "1.10.56",
+                "phpunit/phpunit": "10.5.9"
+            },
+            "default-branch": true,
+            "type": "project",
+            "autoload": {
+                "psr-4": {
+                    "": [
+                        "src"
+                    ]
+                }
+            },
+            "license": [
+                "GPL-3.0-or-later"
+            ],
+            "description": "A Quiche-based QUIC implementation for PHP",
+            "support": {
+                "source": "https://github.com/NetherGamesMC/PHP-Quiche/tree/1.0.0",
+                "issues": "https://github.com/NetherGamesMC/PHP-Quiche/issues"
+            },
+            "time": "2024-04-15T08:44:11+00:00"
         }
     ],
     "packages-dev": [
@@ -1381,6 +1574,7 @@
     "minimum-stability": "dev",
     "stability-flags": {
         "nethergamesmc/libproxy": 20,
+        "nethergamesmc/quiche": 20,
         "nethergamesmc/pocketmine-mp": 20
     },
     "prefer-stable": false,
diff --git a/plugin.yml b/plugin.yml
index c0360fb..578b454 100644
--- a/plugin.yml
+++ b/plugin.yml
@@ -1,5 +1,5 @@
 name: ProxyTransport
-version: 1.0
+version: 1.1.0
 main: NetherGames\ProxyTransport\ProxyTransport
 api: [4.18.0]
 author: NetherGamesMC
\ No newline at end of file

From 9e960fe32dc3952386b84dccf2bca6eb5895d6ae Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Wed, 22 May 2024 19:39:59 +0000
Subject: [PATCH 2/2] Bump actions/checkout from 3 to 4

Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
---
 .github/workflows/build.yml   | 2 +-
 .github/workflows/phpstan.yml | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 7acad91..73ea2fa 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -10,7 +10,7 @@ jobs:
     
     steps:
       - name: Startup
-        uses: actions/checkout@v3
+        uses: actions/checkout@v4
       - name: Install FFI
         run: sudo apt install -y libffi7
       - name: Download PHP Release
diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml
index 48dac21..3313bfa 100644
--- a/.github/workflows/phpstan.yml
+++ b/.github/workflows/phpstan.yml
@@ -10,7 +10,7 @@ jobs:
 
     steps:
       - name: Startup
-        uses: actions/checkout@v3
+        uses: actions/checkout@v4
       - name: Install FFI
         run: sudo apt install -y libffi7
       - name: Download PHP Release