diff --git a/src/pages/DashboardPage.jsx b/src/pages/DashboardPage.jsx index f4f61f6..c61301a 100644 --- a/src/pages/DashboardPage.jsx +++ b/src/pages/DashboardPage.jsx @@ -3417,148 +3417,92 @@ const handleWebSocketMessage = useCallback((data) => { const serverPorts = selectedServer.ports || []; const primaryPort = serverPorts[0]; const mappingCount = serverPorts.length + (selectedServer.sftp_port ? 1 : 0); - const flowExampleInternal = primaryPort?.internal || '8080'; - const flowExampleExternal = primaryPort?.external || '31234'; + const primaryExternalPort = primaryPort?.external || selectedServer.sftp_port; const canExposePorts = ['vps', 'game', 'database'].includes(selectedServer.type); return ( -
-
+
- + )}
- - - - {showPortMappingGuide && ( -
-

- Your server listens on an internal port inside its container. - {branding.name} maps it to a unique external port on our public IP so people on the internet can reach it — without exposing your server directly. -

-
-
-

Inside your server

- :{flowExampleInternal} -

What your app or game listens on

-
-
- -
-
-

{branding.name} gateway

- -

Secure NodePort + firewall

-
-
- -
-
-

Public address

- {serverIp}:{flowExampleExternal} -

What you give to users & clients

-
+
+
+

{mappingCount}

+

{mappingCount === 1 ? 'active mapping' : 'active mappings'}

- -
-
-
-
- -
-

How to Connect

-
-

{getNetworkConnectionHint(selectedServer)}

-
- {[ - { step: '01', title: 'Copy your address', body: 'Pick a port from the table below and copy its public IP:port address.' }, - { step: '02', title: 'Open your client', body: selectedServer.type === 'game' ? 'Launch your game and open Multiplayer → Direct Connect.' : 'Open SSH, RDP, a browser, or your database tool.' }, - { step: '03', title: 'Connect', body: `Paste the full address, e.g. ${serverIp}:${flowExampleExternal}` }, - ].map((item) => ( -
-
- {item.step} -
-
-

{item.title}

-

{item.body}

-
-
- ))} -
-
- -
-
-
- -
-

Good to Know

-
-
- {[ - { - icon: Globe, - iconColor: colors.blue, - title: 'External ports are assigned for you', - body: 'For security, public ports are unique and randomly chosen. Your internal port stays whatever your service expects.', - }, - { - icon: Shield, - iconColor: colors.brightGreen, - title: 'Firewall opens automatically', - body: `When you expose a port, ${branding.name} opens it on the edge firewall in real time — no manual rules needed.`, - }, - { - icon: Lock, - iconColor: colors.yellow, - title: 'System ports cannot be removed', - body: 'Default service ports (game, SSH, SFTP) are managed by the platform and marked as System in the table.', - }, - ].map((item, idx) => { - const TipIcon = item.icon; - return ( -
-
- -
-
-

{item.title}

-

{item.body}

-
-
- ); - })} -
-
+
+

{selectedServer.status || 'Unknown'}

+

Server status

+
+
+
+
+

Internal ports stay inside the server; external ports accept connections from the internet.

+ +
+ {showPortMappingGuide && ( +
+
+

1. Choose a mapping

+

Use the external address shown in the list below.

+
+
+

2. Open your client

+

{selectedServer.type === 'game' ? 'Use your game’s direct-connect screen.' : 'Use the matching app, browser, or terminal.'}

+
+
+

3. Connect

+

{getNetworkConnectionHint(selectedServer)}

)} -
+ {
- +
Service