Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use this plugin? #132

Closed
TheFaRHaNiR opened this issue Jan 29, 2025 · 18 comments
Closed

How to use this plugin? #132

TheFaRHaNiR opened this issue Jan 29, 2025 · 18 comments

Comments

@TheFaRHaNiR
Copy link

When I put it in the server, it gives an error and does not allow the server to turn on

@dries-c
Copy link
Member

dries-c commented Jan 29, 2025

Which error does it give?

@TheFaRHaNiR
Copy link
Author

Image
Image

@TheFaRHaNiR
Copy link
Author

What should I do to make the plugin work?

@dries-c
Copy link
Member

dries-c commented Jan 30, 2025

Did you setup QUIC?

@TheFaRHaNiR
Copy link
Author

No, how to set it?

And what does it need?

@dries-c
Copy link
Member

dries-c commented Jan 30, 2025

It requires you to build quiche using FFI and link it to set the following ENVs

QUICHE_PATH=
QUICHE_PHP_FILE=
QUICHE_H_FILE=

@TheFaRHaNiR
Copy link
Author

Can you tell me step by step what to do?

@TheFaRHaNiR
Copy link
Author

And one question, is there an optimized and stronger Pocketmine to buy or use?

@mohammad-8056
Copy link

Um, I have exactly the same problem.

@dries-c
Copy link
Member

dries-c commented Feb 5, 2025

Right let me explain:

ProxyTransport-PM uses QUIC, a new transport protocol. To achieve this it uses quiche, a RUST QUIC implementation.
In order to get Quiche working in PHP you'll need a binary that supports FFI, essentially allowing PHP to communicate with C directly.

Once you've a PHP binary with FFI support you need to build a Quiche static binary that supports FFI for you operating system, for linux it would look something like this (requires the rust toolchain):

git clone --recursive https://github.com/cloudflare/quiche --branch "$QUICHE_VERSION" quiche-build && cd quiche-build && cargo build --release --features ffi

the latest $QUICHE_VERSION is currently 0.23.2

The results can be found in:

quiche-build/target/release/libquiche.so => static binary
quiche-build/quiche/include/quiche.h => header file

Once that's complete you need to setup the ENVs for the server:

QUICHE_PATH=./path_to_static_binary
QUICHE_H_FILE=./path_to_header_file
QUICHE_PHP_FILE=./path_to_php_file.php (this doesn't have to exist, if it doesn't exist PHP-Quiche will create a PHP file that allows communicating with the static binary)

@mohammad-8056
Copy link

I did everything you said and then I encountered this error.

Image

@dries-c
Copy link
Member

dries-c commented Feb 7, 2025

Seems like you didn't install composer dependencies

@mohammad-8056
Copy link

I installed it as you said and then I encountered this error (when I remove the ProxyTransport plugin from the server it does not give me such an error)

Of course I installed the ProxyTransport plugin prerequisites with the following command
composer install --ignore-platform-req=ext-ffi

Image

@dries-c
Copy link
Member

dries-c commented Feb 7, 2025

This doesn't have anything to do with this plugin, but rather pocketmine. Which fork are you using?

@mohammad-8056
Copy link

I use the NetherGames fork.

@mohammad-8056
Copy link

When I remove the plugin, the server starts up properly and there are no problems, but when I install the plugin, the server returns the same error I sent.

@mohammad-8056
Copy link

Please help me if you can.

@dries-c
Copy link
Member

dries-c commented Feb 15, 2025

It's totally unrelated, so you might want to open a new issue in the correct repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants