yggverse/next
Composer 安装命令:
composer create-project yggverse/next
包简介
PHP 8 server for different protocols
README 文档
README
PHP 8 server for different protocols
Based on Ratchet asynchronous socket library
Features
- Async socket
- Multi-host
- Multi-protocol:
- Multi-mode:
- Static file hosting
- filesystem navigation on directory request
- optional
gemfeedfile modification date - unicode filenames support
- filter hidden context (started with dot)
- sort order settings (currently dir first, asc)
- optional
- custom index file name
- custom failure template
- custom data directory location
- filesystem navigation on directory request
- KevaCoin storage browser
- Custom application
- Reverse proxy
- Stream server
- Static file hosting
- Connection event log
- Simple and flexible server configuration by CLI arguments
Install
Environment
apt install git composer php-fpm php-mbstring
- for
kevacoinservermode, also requiredphp-curlextension
Stable
Project under development, use repository version!
Repository
git clone https://github.com/YGGverse/next.gitcd next- navigate into the project directorycomposer update- grab latest dependencies
Launch
Start
Create as many servers as wanted by providing different type, host, port, type, mode and other arguments!
- for security reasons, file server prevents any access to the hidden files (started with dot)
- also, clients can't access any data out the
rootpath, that defined on server startup
Startup example
php src/server.php host=127.0.0.1 port=1900 type=nex mode=fs root=/target/dir
hostandport- optional arguments, read Arguments documentation for details!
Arguments
Optional arguments auto-defined by server protocol type selected
Some arguments also defined in default.json - do not change it without understanding, use CLI instead!
CLI
Provide arguments in key=value format, separated by space
Children nodes dependent of parent arguments defined and would be skipped in other combinations!
Following list explains key dependencies and it value options (started with =)
type- required, server protocol, also auto-defines defaultport, supported options:- =
nex- NEX Protocolmode- optional, server implementation variant,fs(filesystem) by default- =
fs- static files hosting for therootlocationroot- absolute path to the public directory, where browser navigation starting fromfile- file name that server try to open on directory path requested, disabled by defaultlist- show listing in directory requested (on indexfilenot found), enabled by defaultdate- show file modification date (as gemfeed) in directory listing, disabled by default
- =
kevacoin- KevaCoin storage browser by RPC connection to the wallet (seekevacoin.conf)rpcscheme- required, for examplehttprpcport- required, default is9992rpchost- required, remote orlocalhostrpcuser- requiredrpcpassword- requirednamespace- required, remote or local namespace for data listing (started withN)
- =
- =
host- optional, default is127.0.0.1e.g.localhostconnections onlyport- optional, default value depends of servertypeselected e.g.1900fornexor1965forgeminifail- optional, absolute path to the failure template (e.g./path/to/error.gmi), disabled by defaultdump- optional,enableordisableserver debug feature, enabled by default
Autostart
systemd
Following example mean you have next server installed into home directory of next user (useradd -m next)
# /etc/systemd/system/next.service [Unit] After=network.target [Service] Type=simple User=next Group=next ExecStart=/usr/bin/php /home/next/next/src/server.php type=nex mode=fs root=/home/next/public StandardOutput=file:/home/next/debug.log StandardError=file:/home/next/error.log Restart=on-failure [Install] WantedBy=multi-user.target
systemctl daemon-reload- reload systemd configurationsystemctl enable next- enable service on system startupsystemctl start next- start server
yggverse/next 适用场景与选型建议
yggverse/next 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 0 次下载、GitHub Stars 达 1, 最近一次更新时间为 2024 年 04 月 26 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「server」 「Socket」 「Ratchet」 「next」 「Gemini」 「nex」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 yggverse/next 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 yggverse/next 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 yggverse/next 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A lightweight and powerful OAuth 2.0 authorization and resource server library with support for all the core specification grants. This library will allow you to secure your API with OAuth and allow your applications users to approve apps that want to access their data from your API.
A jQuery augmented PHP library for creating and validating HTML forms
NO LIBRARIES socket per page bridge for your Laravel application.
annotations-scan-plugin
Free PHP WebSocket
A light weight PHP http client implements PSR7, use socket/curl for sending requests.
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 14
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-04-26