mirror of
https://github.com/pyrohost/pyrodactyl.git
synced 2026-04-05 19:51:59 +02:00
removed hytale domain for just egg with ip
This commit is contained in:
@@ -1,60 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Pterodactyl\Services\Subdomain\Features;
|
||||
|
||||
use Pterodactyl\Models\Server;
|
||||
use Pterodactyl\Contracts\Subdomain\SubdomainFeatureInterface;
|
||||
|
||||
class HytaleSubdomainFeature implements SubdomainFeatureInterface
|
||||
{
|
||||
/**
|
||||
* Get the feature name.
|
||||
*/
|
||||
public function getFeatureName(): string
|
||||
{
|
||||
return 'subdomain_hytale';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the DNS records that need to be created for Hytale.
|
||||
*/
|
||||
public function getDnsRecords(Server $server, string $subdomain, string $domain): array
|
||||
{
|
||||
$ip = $server->allocation->ip;
|
||||
$port = $server->allocation->port;
|
||||
$subdomain_split = explode(".", $subdomain);
|
||||
$fullDomain = $subdomain_split[0] . '.' . $domain;
|
||||
|
||||
$records = [];
|
||||
|
||||
// A record pointing to the server IP
|
||||
$records[] = [
|
||||
'name' => $subdomain,
|
||||
'type' => 'A',
|
||||
'content' => $ip,
|
||||
'ttl' => 300,
|
||||
];
|
||||
|
||||
// SRV record for Hytale (only if not using default port)
|
||||
if ($port != 25565) {
|
||||
$records[] = [
|
||||
'name' => '_hytale._tcp.' . $subdomain,
|
||||
'type' => 'SRV',
|
||||
'content' => [
|
||||
'service' => '_hytale',
|
||||
'proto' => '_tcp',
|
||||
'name' => $subdomain,
|
||||
'priority' => 0,
|
||||
'weight' => 5,
|
||||
'port' => $port,
|
||||
'target' => $fullDomain,
|
||||
'content' => "SRV 0 5 {$port} {$fullDomain}",
|
||||
],
|
||||
'ttl' => 300,
|
||||
];
|
||||
}
|
||||
|
||||
return $records;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,8 +9,7 @@
|
||||
"author": "hello@pterodactyl.io",
|
||||
"description": "Set out on an adventure built for both creation and play. Hytale blends the freedom of a sandbox with the momentum of an RPG: explore a procedurally generated world full of dungeons, secrets, and a variety of creatures, then shape it block by block.",
|
||||
"features": [
|
||||
"java_version",
|
||||
"subdomain_hytale"
|
||||
"java_version"
|
||||
],
|
||||
"docker_images": {
|
||||
"ghcr.io/pterodactyl/games:hytale": "ghcr.io/pterodactyl/games:hytale"
|
||||
@@ -92,4 +91,4 @@
|
||||
"field_type": "text"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user