{"id":16666359,"url":"https://github.com/thomas-crane/nrelay","last_synced_at":"2025-03-17T00:31:25.202Z","repository":{"id":26900188,"uuid":"105079223","full_name":"thomas-crane/nrelay","owner":"thomas-crane","description":"A console based modular client for Realm of the Mad God built with Node.js and TypeScript.","archived":false,"fork":false,"pushed_at":"2022-04-09T01:14:00.000Z","size":10988,"stargazers_count":40,"open_issues_count":13,"forks_count":21,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-02-27T15:20:52.726Z","etag":null,"topics":["javascript","nodejs","nrelay","rotmg","typescript"],"latest_commit_sha":null,"homepage":"https://nrelay.net/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thomas-crane.png","metadata":{"files":{"readme":"readme.md","changelog":"changelog.md","contributing":"docs/contributing.md","funding":null,"license":"license.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-27T23:21:16.000Z","updated_at":"2024-10-26T17:00:57.000Z","dependencies_parsed_at":"2022-08-07T12:01:16.311Z","dependency_job_id":null,"html_url":"https://github.com/thomas-crane/nrelay","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomas-crane%2Fnrelay","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomas-crane%2Fnrelay/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomas-crane%2Fnrelay/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomas-crane%2Fnrelay/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thomas-crane","download_url":"https://codeload.github.com/thomas-crane/nrelay/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243835951,"owners_count":20355611,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["javascript","nodejs","nrelay","rotmg","typescript"],"created_at":"2024-10-12T11:10:42.994Z","updated_at":"2025-03-17T00:31:24.891Z","avatar_url":"https://github.com/thomas-crane.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nrelay\r\n\r\nA console based modular client for Realm of the Mad God built with Node.js and TypeScript.\r\n\r\nUpgrading to v8? [Check out the migration guide.](docs/migration/7-to-8.md)\r\n\r\n## Contents\r\n\r\n+ [Docs](#docs)\r\n+ [Install](#install)\r\n  + [Prerequisites](#prerequisites)\r\n+ [Setup](#setup)\r\n  + [Using proxies](#using-proxies)\r\n  + [Using the Local Server](#using-the-local-server)\r\n+ [Run](#run)\r\n+ [Command line arguments](#command-line-arguments)\r\n+ [Build](#build)\r\n+ [Acknowledgements](#acknowledgements)\r\n\r\n## Docs\r\n\r\nThe documentation in this repository consists mostly of guides and tutorials about how to use nrelay and its components, and how to create plugins. All of the docs can be found [in the docs folder.](/docs/readme.md)\r\n\r\nThere is also extensive inline API documentation, which can be viewed [on the docs website.](https://docs.nrelay.net/)\r\n\r\n## Install\r\n\r\n### Prerequisites\r\n\r\nMake sure you have [Nodejs](https://nodejs.org/en/) installed before running nrelay.\r\n\r\n1. Install the nrelay cli.\r\n\r\n```bash\r\nnpm install -g nrelay-cli\r\n```\r\n\r\n2. Create a new nrelay project.\r\n\r\n```bash\r\nnrelay new my-new-project\r\n```\r\n\r\n## Setup\r\n\r\nWhen you create a new nrelay project, you will need to set up your `accounts.json` file. It has been generated for you, but currently only contains an example account.\r\n\r\nThe current contents of the file will resemble the following.\r\n\r\n```json\r\n[\r\n  {\r\n    \"alias\": \"Main Client\",\r\n    \"guid\": \"example@email.com\",\r\n    \"password\": \"password10\",\r\n    \"serverPref\": \"Australia\"\r\n  }\r\n]\r\n\r\n```\r\n\r\nTo use your own account, simply replace the `guid` and `password` values with your own account's email and password.\r\n\r\nIf you have multiple accounts which you want to run at the same time, you can add them by duplicating the segment in the curly braces `{ ... }`. E.g.\r\n\r\n```json\r\n[\r\n  {\r\n    \"alias\": \"Main Client\",\r\n    \"guid\": \"first.account@email.com\",\r\n    \"password\": \"SecretPassWord11\",\r\n    \"serverPref\": \"AsiaSouthEast\"\r\n  },\r\n  {\r\n    \"alias\": \"Secondary Client\",\r\n    \"guid\": \"second.account@email.com\",\r\n    \"password\": \"Password22\",\r\n    \"serverPref\": \"USSouth\"\r\n  }\r\n]\r\n\r\n```\r\n\r\n### Using proxies\r\n\r\nnrelay supports the use of SOCKSv4, SOCKSv4a, and SOCKSv5 proxies to route client connections through. Proxies can be added in the account config as a property of the account\r\n\r\n```json-with-comments\r\n{\r\n    \"alias\": \"Main Client\",\r\n    \"guid\": \"first.account@email.com\",\r\n    \"password\": \"SecretPassWord11\",\r\n    \"serverPref\": \"AsiaSouthEast\",\r\n    \"proxy\": {\r\n        \"host\": \"127.0.0.1\",  // The ip of the proxy.\r\n        \"port\": 8080,         // The port of the proxy. Use a number here, e.g. 8080 not \"8080\".\r\n        \"type\": 5,            // The type of the proxy. Use 5 for SOCKSv5 and 4 for SOCKSv4 or SOCKSv4a.\r\n        \"userId\": \"username\", // The username for the proxy, if one is required.\r\n        \"password\": \"secret\"  // The password for the proxy, if one is required.\r\n    }\r\n}\r\n```\r\n\r\nIf a proxy is specified, nrelay will route all traffic including the initial web request to get the character lists. Because of this, there may be greater delays when using proxies.\r\nThe proxy a client is using can also be changed during runtime by using the `Client.setProxy(proxy: IProxy): void` method.\r\n\r\n### Using the Local Server\r\n\r\nnrelay has a built in Local Server which can be used to transfer data between nrelay and another process, such as KRelay. If you are interested in using the local server, take a look at the [local server guide.](/docs/the-local-server.md)\r\n\r\n## Run\r\n\r\nAfter setting up the `accounts.json` file, nrelay is ready to go. To run nrelay, use the command `nrelay run` in the console. If you have setup your `accounts.json` properly (and used the correct credentials) you should see an output similar to this\r\n\r\n```bash\r\nC:\\Documents\u003e nrelay\r\n[17:25:23 | NRelay]           Starting...\r\n...\r\n[17:25:26 | Main Client]      Authorized account\r\n[17:25:26 | Main Client]      Starting connection to AsiaSouthEast\r\n[17:25:26 | Main Client]      Connected to server!\r\n[17:25:26 | Main Client]      Connecting to Nexus\r\n[17:25:27 | Main Client]      Connected!\r\n```\r\n\r\nThe `alias` property in the account config is optional. If one is not specified, the log will use a censored email instead\r\n\r\n```bash\r\n[17:25:26 | f***@e***.com]    Authorized account\r\n[17:25:26 | f***@e***.com]    Starting connection to AsiaSouthEast\r\n[17:25:26 | f***@e***.com]    Connected to server!\r\n```\r\n\r\n## Command line arguments\r\n\r\nThere are several command line arguments which can be provided when starting nrelay to change the behaviour.\r\n\r\n### `--version` or `-v`\r\n\r\nThis will print the nrelay version number to the console and exit.\r\n\r\n### `--debug`\r\n\r\nThis will start nrelay in debug mode. Debug mode provides a higher detail of logging. It is not recommended to use debug mode unless you are experiencing errors and need more info.\r\n\r\n### `--no-update`\r\n\r\nThis will stop nrelay from checking for updates when it starts.\r\n\r\n### `--no-log`\r\n\r\nThis will stop nrelay from writing to the log file.\r\n\r\n### `--no-plugins`\r\n\r\nThis will stop nrelay from loading any plugins.\r\n\r\n### `--force-update`\r\n\r\nThis will force nrelay to download the latest client and assets.\r\n\r\n### `--update-from=\"filepath\"`\r\n\r\nThis will update the packet ids using the client at the given filepath.\r\n\r\nIf `filepath` is a path to a file (e.g. `C:\\clients\\myclient.swf`), then the directory containing the swf will be used to store the decompiled scripts.\r\nIf `filepath` is a path to a directory, (e.g. `C:\\clients`), then nrelay will assume a file called `client.swf` exists in the directory, and will use the directory to store the decompiled scripts.\r\n\r\nPlease note that `filepath` should always be an absolute path to either a client or a directory containing a `client.swf`.\r\n\r\n### Examples\r\n\r\nTo start nrelay without checking for updates or log file writing, use\r\n\r\n```bash\r\nnrelay run --no-update --no-log\r\n```\r\n\r\nTo start nrelay and force an update, use\r\n\r\n```bash\r\nnrelay run --force-update\r\n```\r\n\r\nTo print the version number, use\r\n\r\n```bash\r\nnrelay -v\r\n```\r\n\r\n## Build\r\n\r\nWhenever any changes are made to the plugins, they will need to be recompiled in order for the changes to take effect.\r\n\r\nTo recompile the plugins simply use\r\n\r\n```bash\r\nnrelay build\r\n```\r\n\r\n## Acknowledgements\r\n\r\nThis project uses the following open source software:\r\n\r\n+ [JPEXS Free Flash Decompiler](https://github.com/jindrapetrik/jpexs-decompiler)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomas-crane%2Fnrelay","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthomas-crane%2Fnrelay","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomas-crane%2Fnrelay/lists"}