dagelijksdutchgaming/featherforward 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

  1. Install the package via Composer:

    composer require dagelijksdutchgaming/featherforward
    
  2. Publish the configuration:

    php artisan vendor:publish --provider="FeatherForward\FeatherForwardServiceProvider" --tag="config"
    
  3. Add the following to your .env file:

    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:

  1. The addon detects the new allocation
  2. A port forward is created in the database
  3. The port forward is configured in OPNsense via the API
  4. 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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-03-25