This repository has been archived on 2026-10-17. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
rsx-modloader/scripts/install-hosts.ps1
T
SashegDev b8e5df778e Модлоадер RustexRemake: агент, патч лаунчера, установщик и сборка
Моды грузятся через -javaagent, game.jar не патчится, переживают ре-обфускацию.

Что внутри:
- агент rsx-bridge.jar: профиль сборки игры, патчи A2/A6, загрузка модов
  через родной загрузчик игры (ilxq -> special.Main)
- патч лаунчера: окно выбора «С модами / Ванилла» по кнопке «Играть»
  и защита от автоапдейта лаунчера
- install/uninstall: всё ставится в %LOCALAPPDATA%\rsx-mod, пути не хардкодятся
- build: три готовых артефакта в dist, нужен только JDK
- testserver: локальный сервер, принимает любой ник и токен

Проверено на живом клиенте: мод грузится и выполняется в игровом потоке,
в логе видно игрока и мир.
2026-10-17 00:32:10 +03:00

28 lines
1.4 KiB
PowerShell
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Points the vendor's hardcoded server address at this machine so the client
# reaches the local stand-in server instead of the real one.
#
# The client keeps 185.207.214.85 inside its own code (both the /server-ping
# URL and the connect target), so there is no in-game switch for it - the only
# way is a hosts entry. Run this once from an elevated prompt.
$ErrorActionPreference = 'Stop'
$hosts = Join-Path $env:SystemRoot 'System32\drivers\etc\hosts'
$marker = '# rsx modloader test server'
$line = '127.0.0.1 185.207.214.85'
$id = [Security.Principal.WindowsIdentity]::GetCurrent()
$isAdmin = (New-Object Security.Principal.WindowsPrincipal($id)).IsInRole(
[Security.Principal.WindowsBuiltInRole]::Administrator)
if (-not $isAdmin) {
Write-Host ' Нужны права администратора: запусти PowerShell от администратора.' -ForegroundColor Red
exit 1
}
$content = @(Get-Content -LiteralPath $hosts |
Where-Object { $_ -notmatch [regex]::Escape($marker) -and
$_ -notmatch '^\s*127\.0\.0\.1\s+185\.207\.214\.85' })
Set-Content -LiteralPath $hosts -Encoding ASCII -Value ($content + "$line $marker")
Write-Host ' Готово: 185.207.214.85 теперь указывает на 127.0.0.1.' -ForegroundColor Green
Write-Host ' Запусти testserver\start.cmd, потом play.cmd -> 1 (с модами).'
Write-Host ' Обратно: uninstall-hosts.ps1 (или netsh int ip reset).'