ledc/gateway-worker

Webman plugin ledc/gateway-worker

v8.3.1 2025-08-31 10:48 UTC

This package is not auto-updated.

Last update: 2025-09-01 06:01:30 UTC


README

安装

PHP版本:>=8.3

composer require ledc/gateway-worker

忽略扩展安装

composer require ledc/gateway-worker --ignore-platform-req=ext-posix -W

启动

php webman gateway:worker start

停止

php webman gateway:worker stop

nginx配置

location /websocket
{
  proxy_pass http://127.0.0.1:3333;
  proxy_read_timeout 3600;
  proxy_http_version 1.1;
  proxy_set_header Upgrade $http_upgrade;
  proxy_set_header Connection "Upgrade";
  proxy_set_header X-Real-IP $remote_addr;
}

Env环境变量

GATEWAY_SECRET_KEY = 
GATEWAY_REGISTER_LISTEN_ADDRESS = 127.0.0.1
GATEWAY_REGISTER_ADDRESS = 127.0.0.1
GATEWAY_REGISTER_PORT = 1236
GATEWAY_LOCAL_IP = 127.0.0.1
GATEWAY_START_PORT = 4000