Add SRV Record info to wiki

This commit is contained in:
2025-07-08 05:28:56 -04:00
parent 3d3bba5a21
commit c7101bea24
2 changed files with 41 additions and 4 deletions

View File

@@ -10,10 +10,11 @@ function copyToClipboard(text, button) {
}); });
} }
// Function to create a server card
// Function to create a server card // Function to create a server card
function createServerCard(server, isNew = false) { function createServerCard(server, isNew = false) {
const ownerName = server.ops && server.ops.length > 0 ? server.ops[0].name : 'Unknown'; const ownerName = server.ops && server.ops.length > 0 ? server.ops[0].name : 'Unknown';
// Prefer connect2 if it's a my-mc.link subdomain, otherwise use connect
const displayConnect = server.connect2 && server.connect2.includes('.my-mc.link') ? server.connect2 : server.connect;
const serverCard = document.createElement('div'); const serverCard = document.createElement('div');
serverCard.className = `feature-card tilt-card ${isNew ? 'new-server-animation' : ''}`; serverCard.className = `feature-card tilt-card ${isNew ? 'new-server-animation' : ''}`;
serverCard.dataset.connect = server.connect; // Add identifier serverCard.dataset.connect = server.connect; // Add identifier
@@ -29,8 +30,8 @@ function createServerCard(server, isNew = false) {
<p class="text-sm opacity-90 leading-relaxed"><strong>Status:</strong> ${server.online ? 'Online' : 'Offline'}</p> <p class="text-sm opacity-90 leading-relaxed"><strong>Status:</strong> ${server.online ? 'Online' : 'Offline'}</p>
<div class="flex items-center text-sm opacity-90 leading-relaxed mb-2"> <div class="flex items-center text-sm opacity-90 leading-relaxed mb-2">
<strong>Connect:</strong> <strong>Connect:</strong>
<span class="ml-2">${server.connect}</span> <span class="ml-2">${displayConnect}</span>
<button class="copy-btn ml-4" onclick="copyToClipboard('${server.connect}', this)" style="color: #2DD4BF;"> <button class="copy-btn ml-4" onclick="copyToClipboard('${displayConnect}', this)" style="color: #2DD4BF;">
<svg class="clipboard" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <svg class="clipboard" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h12a2 2 0 002-2V7a2 2 0 00-2-2h-2m-2-2h-4a2 2 0 00-2 2h8a2 2 0 01-2 2h-4a2 2 0 01-2-2z"></path> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h12a2 2 0 002-2V7a2 2 0 00-2-2h-2m-2-2h-4a2 2 0 00-2 2h8a2 2 0 01-2 2h-4a2 2 0 01-2-2z"></path>
</svg> </svg>

View File

@@ -117,6 +117,7 @@
<li><a href="#limitations">Limitations</a></li> <li><a href="#limitations">Limitations</a></li>
<li><a href="#getting-started">Getting Started</a></li> <li><a href="#getting-started">Getting Started</a></li>
<li><a href="#connecting-to-your-server">Connecting to Your Server</a></li> <li><a href="#connecting-to-your-server">Connecting to Your Server</a></li>
<li><a href="#subdomain-registration">Subdomain Registration</a></li>
<li><a href="https://status.my-mc.link/" target="_blank">My-MC Server Status Checker</a></li> <li><a href="https://status.my-mc.link/" target="_blank">My-MC Server Status Checker</a></li>
<li><a href="#geyser-support">Geyser Support</a></li> <li><a href="#geyser-support">Geyser Support</a></li>
<li><a href="#mod-management">Mod Management</a></li> <li><a href="#mod-management">Mod Management</a></li>
@@ -131,7 +132,6 @@
<li><a href="https://info.my-mc.link/mymc-java/" target="_blank">Java Library</a></li> <li><a href="https://info.my-mc.link/mymc-java/" target="_blank">Java Library</a></li>
<li><a href="#beta-phase-notice">Beta Phase Notice</a></li> <li><a href="#beta-phase-notice">Beta Phase Notice</a></li>
<li><a href="https://wiki.my-mc.link">Access Older Wiki</a></li> <li><a href="https://wiki.my-mc.link">Access Older Wiki</a></li>
</ul> </ul>
</nav> </nav>
@@ -286,6 +286,42 @@
</div> </div>
</section> </section>
<section id="subdomain-registration" class="section-bg p-8 sm:p-10 mb-12">
<h2 class="text-3xl minecraft-font mb-8 text-center bg-clip-text text-transparent bg-gradient-to-r from-teal-400 to-blue-500">
Subdomain Registration
</h2>
<p class="text-lg mb-8 max-w-3xl mx-auto opacity-90 leading-relaxed">
My-MC.Link now supports SRV record registration, allowing you to use a custom subdomain (e.g., <code class="bg-gray-800 text-teal-400 px-1 rounded">raven.my-mc.link</code>) as your server's connection string for a more personalized and user-friendly experience.
</p>
<h3 class="text-xl minecraft-font mb-6 text-teal-400">Key Features</h3>
<ul class="text-lg max-w-3xl mx-auto opacity-90 leading-relaxed list-disc list-inside mb-8">
<li><strong>Custom Subdomain</strong>: Register a unique subdomain to connect to your server.</li>
<li><strong>Server List Integration</strong>: Registered subdomains are displayed on the server list page instead of the default address.</li>
</ul>
<h3 class="text-xl minecraft-font mb-6 text-teal-400">How to Register a Subdomain</h3>
<p class="text-lg mb-8 max-w-3xl mx-auto opacity-90 leading-relaxed">
To register a subdomain, run the following command in-game (replace <code class="bg-gray-800 text-teal-400 px-1 rounded">raven</code> with your desired subdomain):
</p>
<p class="text-lg mb-8 max-w-3xl mx-auto opacity-90 leading-relaxed">
<code class="bg-gray-800 text-teal-400 px-1 rounded">/srv-register subdomain: raven</code>
</p>
<p class="text-lg mb-8 max-w-3xl mx-auto opacity-90 leading-relaxed">
Once registered, you can connect to your server using your custom subdomain, e.g., <code class="bg-gray-800 text-teal-400 px-1 rounded">raven.my-mc.link</code>.
</p>
<h3 class="text-xl minecraft-font mb-6 text-teal-400">Changing or Deleting a Subdomain</h3>
<p class="text-lg mb-8 max-w-3xl mx-auto opacity-90 leading-relaxed">
To delete your current SRV record and register a new subdomain:
</p>
<ol class="text-lg max-w-3xl mx-auto opacity-90 leading-relaxed list-decimal list-inside mb-8">
<li>Delete the existing record:<br>
<code class="bg-gray-800 text-teal-400 px-1 rounded">/srv-delete</code>
</li>
<li>Register a new subdomain:<br>
<code class="bg-gray-800 text-teal-400 px-1 rounded">/srv-register subdomain: <new-subdomain></code>
</li>
</ol>
</section>
<section id="geyser-support" class="section-bg p-8 sm:p-10 mb-12"> <section id="geyser-support" class="section-bg p-8 sm:p-10 mb-12">
<h2 <h2
class="text-3xl minecraft-font mb-8 text-center bg-clip-text text-transparent bg-gradient-to-r from-teal-400 to-blue-500"> class="text-3xl minecraft-font mb-8 text-center bg-clip-text text-transparent bg-gradient-to-r from-teal-400 to-blue-500">