mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-26 03:00:56 +02:00
REMOTE: Added possibility to change target IP of remote API (#943)
This commit is contained in:
@@ -5,8 +5,11 @@ let server: Remote;
|
||||
|
||||
export function newRemoteFileApiConnection(): void {
|
||||
if (server) server.stopConnection();
|
||||
if (Settings.RemoteFileApiPort === 0) return;
|
||||
server = new Remote("localhost", Settings.RemoteFileApiPort);
|
||||
if (Settings.RemoteFileApiPort === 0 || Settings.RemoteFileApiPort > 65535) return;
|
||||
server = new Remote(
|
||||
Settings.RemoteFileApiAddress === "" ? "localhost" : Settings.RemoteFileApiAddress,
|
||||
Settings.RemoteFileApiPort,
|
||||
);
|
||||
server.startConnection();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user