A Flash browser for DarkOrbit. Orbit Helper opens it from the globe button on the bot's window when an account logs in as the Flash client: the browser takes over the bot's game session and opens the game page, so the ship can be steered by hand in the real Flash game. Started on its own (from the Start menu) it is a plain DarkOrbit Flash browser.
This program is a modified version of DarkOrbit Client by Kaiserdj (version 2.8.0), licensed under the GNU Affero General Public License v3.0. This modified version is licensed under the same license; see LICENSE. The full source of every published build is available in this repository.
- Renamed to OH Bot Web Client (
com.orbithelper.webclient); Windows x64 only, a per-user NSIS setup. - New
launch.js: the bot passes the server, session id (dosid), profile and proxy in theOHWC_LAUNCHenvironment variable, never on the command line. The browser reads it and removes it from its environment before anything else runs; a request it can't use stops the program instead of opening anything. - A launch from the bot uses an in-memory session: the session id is never written to disk.
- Proxy support (HTTP and SOCKS5) for every window; WebRTC is kept from going past the proxy. Chromium can't log in to
a SOCKS5 proxy, so one with a username is reached through a SOCKS5 bridge on the loopback that logs in for it
(
socksBridge.js). - One profile folder per game account, so several accounts can be open at once.
- The user agent is looked up through the same session (and proxy) as the game.
- Orbit Helper's icon (
assets/icon.ico,assets/icon.png; the bot's own logo for now). - Orbit Helper's colors (dark space background, accent blue
#3DD6F5) on the tab strip and the loading bar instead of the original green. - One window with tabs (
tabs/): every page the site opens (the game, the board, the shop) is a tab, and all of them share the session and the proxy. A second game tab isn't opened; the open one is shown instead. The + after the last tab (Ctrl+T) opens Google in a new tab with the address bar ready. A tab takes clicks up to the strip's top edge. Tabs are reordered by dragging them, as in Chrome (the others slide out of the way); a right click on one reloads, duplicates or closes it (or the others). - No window frame since 1.1.0: the tab strip is the title bar, as in Chrome. Orbit Helper's logo sits at its start; minimize, maximize/restore and close at its end, level with the tabs. Its empty part moves the window, a double click maximizes it.
- The browser speaks the languages Chrome does (
i18n.js, the 53 of Electron'slocales/; texts instrings/<code>.json, missing ones from the base language, thenen-US). It starts in the system language; a right click on the logo picks another one or "System default", kept inlanguage.jsonin the app's data folder for every profile. The tab strip, menus, find box and theAccept-Languagesent to sites change at once; Chromium's own texts (form messages, error pages,navigator.languages) on the next start. Right-to-left languages are not mirrored. - Find in page (Ctrl+F;
tabs/find.html): a box at the page's top right; Enter/F3/Ctrl+G go to the next match, Shift with them to the previous one, Esc closes it. It belongs to the tab it was opened on. - An address bar under the tabs: back, forward, reload/stop and the address (typed text that isn't an address is searched for). The BP switch at its end gives DarkOrbit's sites the BigPoint client's user agent (on, at every start); every other site, and DarkOrbit's with it off, gets a current Chrome's. Pages take it when they load again.
- Site icons on the tabs. The main process downloads them through the page's own session (and proxy) and hands them
to the strip as
data:images, so the strip itself never goes online. - A bookmarks bar under the address bar (
bookmarks.js), kept inbookmarks.jsonin the app's data folder for every profile. It starts with DarkOrbit, DarkOrbit Forum, Orbit Helper, Orbit Helper Bot and Orbit Helper Forum; any of them can be deleted (after a confirmation). The star left of BP (Ctrl+D) adds or removes the open page. A right click on the bar hides it (Ctrl+Shift+B, or a right click on the star, shows it again); bookmarks that don't fit go under a » menu. Session parameters (dosid, sid...) are stripped from saved addresses, and a bookmark clicked while the game tab is open opens in a new tab. - The engine is Chromium 87. Common functions newer sites call and it lacks (structuredClone, Array.prototype.at,
Object.hasOwn...) are added before the page's scripts (
inject/polyfills.js). Cascade layers (@layer, Chrome 99), in which Tailwind CSS 4 puts all of a site's styles, are copied out of their layers in order, and@propertydefaults become a plain rule. Container queries (@container, Chrome 105), with which Google's results page lays out its columns, are emulated: each container is measured and marked with the conditions its width meets, and the queries' rules are copied under that mark (inject/cssCompat.js; a query matches any container ancestor with its name, not only the nearest one). Newer syntax, the rest of newer CSS (:is(),:where(),:has()...) and import maps can't be added, so some sites still break. - The page's right-click menu fits what was clicked, as in Chrome (
tools.js): picked text (copy, search Google, go to the address it is, print), a link (open in a new tab or in the system browser, save, copy its address), an image/video (open in a new tab, save, copy, copy its address), a text field (spelling suggestions, undo/redo, cut/copy/paste, paste as plain text, select all) and an empty spot (back, forward, reload, save as, print, full screen, zoom, game language, view page source). Inspect ends every menu; Developer Tools open with F12 or Ctrl+Shift+I, in a window of their own. - "Game language" in the right-click menu (
gameLanguage.js): the game's languages, as the site's picker lists them. The pick reloads the page withlang=<code>and is kept; until one is picked the first page opens in the system language, or English when the game hasn't it. - The first tab opens the account's start page (
indexInternal.es?action=internalStart) on the dosid cookie, as the official client does; the server's root is its logged-out home page whatever the session. A session the site refuses (loginError) is reported once. Logging out on the site closes the browser instead. - Removed: the self-updater, the
darkorbit-client://protocol,ignore-certificate-errors, command-line options, the saved-accounts manager and auto-login, the tray (and its "Copy SID"), the settings window, the developer tools (DarkDev, the packet dumper, custom JS/CSS/load), the WebSocket API mode, and the macOS Flash plugin.
Needs Node.js; Windows for the setup, Linux (WSL works) for the AppImage.
npm install
npm run dist # Windows: dist/OH-Bot-Web-Client-Setup-<version>.exe
npm run dist:linux # Linux: dist/OH-Bot-Web-Client-<version>.AppImage
npm start runs it from the source. node_modules can't be shared between the two: on Linux, install from a copy of
the folder without it.
The Flash plugins (flash/pepflashplayer.dll, flash/libpepflashplayer.so) are Adobe's and come from the original
project; Electron 11.5.0 is the last Electron that can load them. On Linux the bot starts the AppImage with
--no-sandbox, and unpacked to /tmp (APPIMAGE_EXTRACT_AND_RUN=1) where libfuse 2 is missing, as on Ubuntu 22.04
and later.