Initial commit: Ananta CBT 4229938 private server with all fixes

This commit is contained in:
CAtlas0784 committed 2026-09-15 18:13:46 +07:00
commit c84135c357
286 files changed
+2214315

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
$ErrorActionPreference = 'Stop'
$Root = Split-Path -Parent $MyInvocation.MyCommand.Path
$ProjectRoot = Split-Path -Parent $Root
$ConfigPath = Join-Path $ProjectRoot 'config\private-server.json'
if (-not (Test-Path -LiteralPath $ConfigPath)) { throw "Missing config: $ConfigPath" }
$Config = Get-Content -Raw -Encoding UTF8 -LiteralPath $ConfigPath | ConvertFrom-Json
$ports = @(
[int]$Config.network.proxy.httpPort,
[int]$Config.network.proxy.httpsPort,
[int]$Config.network.proxy.loginListPort,
[int]$Config.network.proxy.loginTcpPort,
[int]$Config.network.proxy.gameTcpPort,
[int]$Config.network.proxy.sceneSubPort,
[int]$Config.network.loginPorts[0],
[int]$Config.network.loginPorts[1],
[int]$Config.network.gamePort
) | Select-Object -Unique
Get-NetTCPConnection -State Listen -ErrorAction SilentlyContinue |
Where-Object { $_.LocalPort -in $ports } |
Select-Object LocalAddress,LocalPort,OwningProcess,@{Name='Process';Expression={
try { (Get-Process -Id $_.OwningProcess -ErrorAction Stop).ProcessName } catch { '?' }
}} |
Sort-Object LocalPort |
Format-Table -AutoSize