ocolin/tachyon-lite
Composer 安装命令:
composer require ocolin/tachyon-lite
包简介
HTTP client for Tachyon Networks devices running 8devices firmware, providing MAC table and status data without a dedicated API
README 文档
README
A PHP HTTP client for Tachyon Networks devices running 8devices firmware. Provides access to MAC table and device status data on models that lack a dedicated API, such as the TNS-100.
Tachyon Networks offers a dedicated API on their higher-end devices. TachyonLite is designed for models where that API is unavailable, providing equivalent read access to MAC table and status data through the device's web interface.
Compatible Devices
This client communicates with the web interface of devices running 8devices firmware. It has been tested against the Tachyon Networks TNS-100. Other devices running 8devices firmware may also be compatible.
Requirements
- PHP 8.4+
- Guzzle 7.10+
- ocolin/global-type 2.0+
Installation
composer require ocolin/tachyon-lite
Configuration
Configuration can be provided directly or via environment variables. Direct arguments take priority over environment variables.
Via Constructor
use Ocolin\TachyonLite\Config; use Ocolin\TachyonLite\TachyonLite; $client = new TachyonLite( config: new Config( host: '10.0.0.1', username: 'admin', password: 'secret', ));
Via Environment Variables
TACHYON_LITE_HOST=10.0.0.1 TACHYON_LITE_USERNAME=admin TACHYON_LITE_PASSWORD=secret TACHYON_LITE_SSL=true TACHYON_LITE_HTTP_PORT=80 TACHYON_LITE_HTTPS_PORT=443
When environment variables are set, no arguments are needed:
$client = new TachyonLite();
Config Options
| Parameter | Type | Default | ENV Variable | Description |
|---|---|---|---|---|
| host | string | — | TACHYON_LITE_HOST | IP address or hostname |
| username | string | — | TACHYON_LITE_USERNAME | Login username |
| password | string | — | TACHYON_LITE_PASSWORD | Login password |
| ssl | bool | true | TACHYON_LITE_SSL | Use HTTPS |
| httpPort | int | 80 | TACHYON_LITE_HTTP_PORT | HTTP port |
| httpsPort | int | 443 | TACHYON_LITE_HTTPS_PORT | HTTPS port |
| options | array | [] | — | Additional Guzzle options |
Usage
MAC Table
Returns an array of MacEntry objects representing the device's MAC forwarding table.
$entries = $client->getMacTable(); foreach( $entries as $entry ) { echo $entry->mac . PHP_EOL; // f4:1e:57:8f:58:6a echo $entry->interface . PHP_EOL; // eth5 echo $entry->vlan . PHP_EOL; // 1 echo $entry->bridge . PHP_EOL; // br-wan echo $entry->offload . PHP_EOL; // true }
MacEntry Properties
| Property | Type | Description |
|---|---|---|
| mac | string | MAC address |
| interface | string | Network interface (e.g. eth1, eth5) |
| vlan | int | VLAN ID, 0 if not present |
| bridge | string | Bridge name, empty if not present |
| offload | bool | Whether hardware offload is active |
Device Status
Returns a Status object containing device information. All properties are raw decoded JSON objects.
$status = $client->getStatus(); echo $status->system->model; // TNS-100 echo $status->system->fw_version; // 1.0.0 echo $status->network->hostname; // my-device
By default all available types are returned. You can request specific types:
$status = $client->getStatus( types: ['system', 'network'] );
Available Status Types
| Type | Description |
|---|---|
| system | Model, serial number, firmware, CPU, memory |
| network | Hostname, DNS, DHCP, zone/IP information |
| interfaces | Per-interface details including port descriptions |
| ethernet | Ethernet port statistics (hardware dependent) |
Exceptions
| Exception | Description |
|---|---|
| ConfigException | Required configuration missing |
| AuthException | Authentication failed |
| TachyonLiteException | Unexpected response from device |
| GuzzleException | HTTP transport error |
License
MIT
ocolin/tachyon-lite 适用场景与选型建议
ocolin/tachyon-lite 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 4 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 05 月 01 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「network」 「router」 「tachyon」 「8devices」 「mac-table」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 ocolin/tachyon-lite 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 ocolin/tachyon-lite 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 ocolin/tachyon-lite 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
LinkedIn API PHP SDK with OAuth 2.0 & CSRF support. Can be used for social sign in or sharing on LinkedIn. Examples. Documentation.
LinkedIn API PHP SDK with OAuth 2.0 & CSRF support. Can be used for social sign in or sharing on LinkedIn. Examples. Documentation.
PHP SDK for Bands In Town API
Router
PMVC App Action Router
Serve Laravel Assets from a Content Delivery Network (CDN)
统计信息
- 总下载量: 4
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 35
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-05-01