dagelijksdutchgaming/featherforward
Composer 安装命令:
composer require dagelijksdutchgaming/featherforward
包简介
A Pterodactyl addon for automated port forwarding through OPNsense
README 文档
README
A Pterodactyl addon for automated port forwarding through OPNsense.
Description
FeatherForward is a Pterodactyl addon that automatically configures port forwards in OPNsense when new allocations are created. This makes server management much easier as you don't need to manually configure port forwards anymore.
Features
- Automatic port forward configuration for new allocations
- Support for TCP and UDP protocols
- Configuration through OPNsense API
- Comprehensive logging of all operations
- Easy installation via Composer
- Fully tested with PHPUnit
Requirements
- PHP 8.0 or higher
- Pterodactyl Panel 1.0 or higher
- OPNsense with API access
- Composer
Installation
Install the package via Composer:
composer require dagelijksdutchgaming/featherforwardPublish the configuration:
php artisan vendor:publish --provider="FeatherForward\FeatherForwardServiceProvider" --tag="config"Add the following to your
.envfile:OPNSENSE_URL=https://your-opnsense-url OPNSENSE_API_KEY=your-api-key OPNSENSE_API_SECRET=your-api-secret FEATHERFORWARD_ENABLED=true FEATHERFORWARD_AUTO_CONFIGURE=true
Configuration
The configuration can be adjusted in config/featherforward.php:
return [
'port_forwarding' => [
'enabled' => env('FEATHERFORWARD_ENABLED', false),
'auto_configure' => env('FEATHERFORWARD_AUTO_CONFIGURE', false),
'protocol' => 'tcp', // or 'udp'
'description_prefix' => 'Pterodactyl - ',
],
'opnsense' => [
'url' => env('OPNSENSE_URL'),
'api_key' => env('OPNSENSE_API_KEY'),
'api_secret' => env('OPNSENSE_API_SECRET'),
],
];
Usage
FeatherForward works automatically once installed and configured. When a new allocation is created in Pterodactyl:
- The addon detects the new allocation
- A port forward is created in the database
- The port forward is configured in OPNsense via the API
- The status is updated in the database
Testing
The package is fully tested with PHPUnit. You can run the tests with:
./vendor/bin/phpunit
The tests cover:
- Automatic port forward creation
- Error handling
- API communication
- Database operations
Contributing
Contributions are welcome! Feel free to submit a pull request.
License
This package is open-sourced software licensed under the MIT license.
统计信息
- 总下载量: 1
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-03-25