You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

527 lines
17 KiB

4 years ago
  1. +++
  2. title = "Toxic Swamp"
  3. slug = "toxic-swamp"
  4. description = "Monero/Aeon Web Miner add-on module for After Dark."
  5. summary = "Monero/Aeon Web Miner."
  6. categories = ["addon"]
  7. tags = ["module", "monetization", "rewards", "cryptocurrency"]
  8. features = ["snippets", "related content"]
  9. [security.csp.directives]
  10. scriptSrc = [
  11. "'sha512-TKVuLlCT8+a0Chpa6Pw3clhu9fhZ9JOzgblgxQaUQVP/z4lfPnrdyWDOgucORnS2qapWu/iPVG2d0ywyGH2NjA=='"
  12. ]
  13. [[copyright]]
  14. owner = "Josh Habdas"
  15. date = "2019"
  16. license = "agpl-3.0-or-later"
  17. +++
  18. Monetize attention in one of more than 40 cryptocurrency mining pools with support for the March 2019 Monero hard fork.
  19. {{< hackcss-alert >}}
  20. {{< video controls="true" src="https://habd.as/code/toxic-swamp/assets/toxic-swamp-demo.mp4" preload="auto" poster="https://habd.as/code/toxic-swamp/images/after-dark-v6.15.0-homepage-fs8.png" width="100%" >}}
  21. {{< /hackcss-alert >}}
  22. # Features
  23. - Mine cryptocurrency while visitors browse your sites
  24. - Reward effort during site development and publishing
  25. - Transparent, unobtrusive multilingual user interface
  26. - Does not use cookies or connect to any third-parties
  27. - Obfuscates end-user IPs and other connection details
  28. - Automatically starts when external power is detected
  29. - Suspends operation during loss of power or attention
  30. - Optimized for low-bandwidth high-latency connections
  31. - Cannot be detected by MinerBlock extension at 1.2.12
  32. # Installation
  33. Choose a module download source:
  34. - {{< external "https://www.npmjs.com/package/toxic-swamp" />}} - npm
  35. - {{< external "https://www.jsdelivr.com/package/npm/toxic-swamp" />}} - cdn
  36. - {{< external "https://git.habd.as/comfusion/toxic-swamp" />}} - git
  37. Extract module contents into site themes directory:
  38. ```
  39. ├── static
  40. └── themes
  41. ├── after-dark
  42. └── toxic-swamp
  43. ```
  44. Verify [Release Hash]({{< relref "release-hashes" >}}) and GPG signature:
  45. ```sh
  46. cd themes/toxic-swamp && \
  47. npm install && npm run integrity && \
  48. git tag --verify v1.0.0-beta.28
  49. ```
  50. Specify module in site config:
  51. {{< highlight toml "linenos=inline,linenostart=6" >}}
  52. # Controls default theme and theme components
  53. theme = [
  54. "toxic-swamp", # sequence before "after-dark"
  55. "after-dark"
  56. ]
  57. {{< /highlight >}}
  58. Configure with payout address to start earning rewards:
  59. {{< highlight toml "linenos=inline,linenostart=36" >}}
  60. [params.modules.toxic_swamp]
  61. enabled = true # Optional, set false to disable module
  62. address = "your-address-here"
  63. {{< /highlight >}}
  64. # Earning Rewards
  65. Using [The Fire Swamp](#the-fire-swamp) with a configured payout address, you may view your hash metrics and payout information from the {{< external href="https://moneroocean.stream/?dark#/dashboard" text="MoneroOcean Dashboard" />}}:
  66. {{< figure alt="MoneroOcean Dashboard screenshots"
  67. src="/images/screenshots/monero-ocean-dashboard-fs8.png"
  68. caption="Monero Ocean Dashboard showing Toxic Swamp mining activity."
  69. >}}
  70. See the MoneroOcean {{< external href="https://moneroocean.stream/?dark#/help/faq" text="FAQ" />}} for more details.
  71. # The Fire Swamp
  72. After Dark provides upgrade incentives The Fire Swamp using {{< external href="https://moneroocean.stream/?dark" text="MoneroOcean" />}} to help you get started and as a fallback when custom proxies fail to connect.
  73. The proxy servers are located at `fs*.habd.as:80` and will be used by default until you [Create Your Own Proxy](#create-your-own-proxy) or fall more than two major versions behind.
  74. To maximize your rewards while using the Fire Swamp proxy you must try to keep your After Dark version up-to-date as illustrated here:
  75. <style>
  76. .dark table tbody td:first-child { color: inherit; }
  77. table tbody td:first-child { font-weight: initial; }
  78. </style>
  79. <table>
  80. <caption>Figure 1: Fire Swamp upgrade incentive based on After Dark version</caption>
  81. <thead>
  82. <tr>
  83. <th scope="col">Latest Version</th>
  84. <th scope="col">Your Version</th>
  85. <th scope="col">Upgrade Incentive</th>
  86. </tr>
  87. </thead>
  88. <tbody>
  89. <tr>
  90. <td>7.0.0</td>
  91. <td>7.0.0</td>
  92. <td>None</td>
  93. </tr>
  94. <tr>
  95. <td>7.0.2</td>
  96. <td>7.0.1</td>
  97. <td>2.2%</td>
  98. </tr>
  99. <tr>
  100. <td>7.1.0</td>
  101. <td>7.0.2</td>
  102. <td>13.6%</td>
  103. </tr>
  104. <tr>
  105. <td>8.0.0</td>
  106. <td>7.1.0</td>
  107. <td>34.1%</td>
  108. </tr>
  109. </tbody>
  110. </table>
  111. To describe in more detail:
  112. - If a bugfix, documentation update, refactoring or other patch release occurs your upgrade incentive is 2.2% of your total combined mining hash power.
  113. - If an enhancement, feature or other minor release occurs your upgrade incentive is 13.6% of your total combined mining hash power.
  114. - If a breaking change, license update or other major release occurs your upgrade incentive is 34.1% of your total combined mining hash power.
  115. - If you fall more than one point release behind any minor or patch release the upgrade incentive will remain the same as if you were only one release behind.
  116. - If you fall more than two majors behind your miner may continue to function but you will be required to upgrade to maintain your upgrade incentive.
  117. Maximize your incentive with reduced effort by using the [Upgrade Script](/feature/upgrade-script/) to check for and automatically update After Dark to the latest available version.
  118. {{< hackcss-alert type="success" >}}
  119. <strong>Tip:</strong> After Dark uses {{< external href="https://semver.org" text="Semantic Versioning" />}} and the <code>latest</code> version may be tracked programmatically using on the NPM registry and in JSON form {{< external href="https://registry.npmjs.org/-/package/after-dark/dist-tags" text="here" />}}.
  120. {{< /hackcss-alert >}}
  121. {{< hackcss-alert type="info" >}}
  122. <strong>Note:</strong> After Dark updates are typically backwards compatible with existing modules though there may be cases where module updates are required.
  123. {{< /hackcss-alert >}}
  124. # Create Your Own Proxy
  125. Advanced users may wish to configure their own proxy servers. To do so select <samp>Advanced Settings</samp> when generating configuration after standing-up your proxy server described in more detail here:
  126. <details>
  127. <summary>Expand to view details</summary>
  128. Use the instructions in {{< external "https://git.habd.as/comfusion/webminerpool" />}} to stand up your own proxy server and reference the following to understand connection activity:
  129. <style>
  130. table { caption-side: bottom; }
  131. caption { margin-top: 0.5rem; font-variant: all-small-caps; }
  132. dd, dt { display: inline-block; }
  133. dt { margin-left: 3rem; }
  134. dd { width: 10rem; }
  135. </style>
  136. <table>
  137. <legend>
  138. Legend
  139. <dl>
  140. <dt>A<dd>Active
  141. <dt>I<dd>Inactive
  142. <dt>S<dd>Standby
  143. <dt>E<dd>Error
  144. <dt>O<dd>Open
  145. <dt>C<dd>Closed
  146. <dt>K<dd>Known
  147. <dt>U<dd>Unknown
  148. </dl>
  149. </legend>
  150. <caption>Figure 2: Miner connection activity by device, proxy and toolbar state</caption>
  151. <thead>
  152. <tr>
  153. <th colspan="3" scope="col">Device</th>
  154. <th colspan="3" scope="col">Toolbar</th>
  155. <th colspan="4" scope="col">Miner</th>
  156. <th colspan="3" scope="col">Proxy</th>
  157. </tr>
  158. <tr>
  159. <th scope="col">Charging</th>
  160. <th scope="col">Online</th>
  161. <th scope="col">Cores</th>
  162. <th scope="col">Visible</th>
  163. <th scope="col">Powered</th>
  164. <th scope="col">Throttle</th>
  165. <th scope="col">Status</th>
  166. <th scope="col">Socket</th>
  167. <th scope="col">Workers</th>
  168. <th scope="col">Load</th>
  169. <th scope="col">Online</th>
  170. <th scope="col">Pool</th>
  171. <th scope="col">Allow</th>
  172. </tr>
  173. </thead>
  174. <tbody>
  175. <tr>
  176. <td>--</td>
  177. <td>--</td>
  178. <td>--</td>
  179. <td>--</td>
  180. <td>Off</td>
  181. <td>--</td>
  182. <td>I</td>
  183. <td>--</td>
  184. <td>--</td>
  185. <td>--</td>
  186. <td>--</td>
  187. <td>--</td>
  188. <td>--</td>
  189. </tr>
  190. <tr>
  191. <td>Yes</td>
  192. <td>Yes</td>
  193. <td>8</td>
  194. <td>No</td>
  195. <td>On</td>
  196. <td>Any</td>
  197. <td>S</td>
  198. <td>C</td>
  199. <td>8</td>
  200. <td>0</td>
  201. <td>--</td>
  202. <td>--</td>
  203. <td>--</td>
  204. </tr>
  205. <tr>
  206. <td>Yes</td>
  207. <td>No</td>
  208. <td>8</td>
  209. <td>Yes</td>
  210. <td>On</td>
  211. <td>Any</td>
  212. <td>S</td>
  213. <td>E</td>
  214. <td>8</td>
  215. <td>0</td>
  216. <td>--</td>
  217. <td>--</td>
  218. <td>--</td>
  219. </tr>
  220. <tr>
  221. <td>No</td>
  222. <td>Yes</td>
  223. <td>16</td>
  224. <td>Yes</td>
  225. <td>On</td>
  226. <td>25</td>
  227. <td>I</td>
  228. <td>C</td>
  229. <td>16</td>
  230. <td>4</td>
  231. <td>Yes</td>
  232. <td>K</td>
  233. <td>Yes</td>
  234. </tr>
  235. <tr>
  236. <td>Yes</td>
  237. <td>Yes</td>
  238. <td>16</td>
  239. <td>Yes</td>
  240. <td>On</td>
  241. <td>25</td>
  242. <td>A</td>
  243. <td>O</td>
  244. <td>16</td>
  245. <td>12</td>
  246. <td>Yes</td>
  247. <td>K</td>
  248. <td>Yes</td>
  249. </tr>
  250. <tr>
  251. <td>Yes</td>
  252. <td>Yes</td>
  253. <td>32</td>
  254. <td>Yes</td>
  255. <td>On</td>
  256. <td>50</td>
  257. <td>A</td>
  258. <td>O</td>
  259. <td>32</td>
  260. <td>16</td>
  261. <td>Yes</td>
  262. <td>K</td>
  263. <td>Yes</td>
  264. </tr>
  265. <tr>
  266. <td>Yes</td>
  267. <td>Yes</td>
  268. <td>32</td>
  269. <td>Yes</td>
  270. <td>On</td>
  271. <td>75</td>
  272. <td>A</td>
  273. <td>O</td>
  274. <td>32</td>
  275. <td>24</td>
  276. <td>Yes</td>
  277. <td>K</td>
  278. <td>Yes</td>
  279. </tr>
  280. <tr>
  281. <td>Yes</td>
  282. <td>Yes</td>
  283. <td>64</td>
  284. <td>Yes</td>
  285. <td>On</td>
  286. <td>Any</td>
  287. <td>S</td>
  288. <td>E</td>
  289. <td>64</td>
  290. <td>0</td>
  291. <td>Yes</td>
  292. <td>U</td>
  293. <td>No</td>
  294. </tr>
  295. <tr>
  296. <td>Yes</td>
  297. <td>Yes</td>
  298. <td>64</td>
  299. <td>Yes</td>
  300. <td>On</td>
  301. <td>Any</td>
  302. <td>S</td>
  303. <td>E</td>
  304. <td>64</td>
  305. <td>0</td>
  306. <td>No</td>
  307. <td>--</td>
  308. <td>--</td>
  309. </tr>
  310. </tbody>
  311. </table>
  312. Generate configuration with `Advanced Settings` specified:
  313. {{< hackcss-card header="Interactive Config Generator" >}}
  314. <style>.form { width: unset; }</style>
  315. {{< hackcss-form name="generator" disabled="true" action="http://localhost:1414/module/toxic-swamp/configuration/" >}}
  316. <noscript>
  317. {{< hackcss-helpblock >}}
  318. <p>Enable JavaScript for offline config generation.</p>
  319. {{< /hackcss-helpblock >}}
  320. </noscript>
  321. {{< hackcss-alert type="warning" class="js-usesameorigin" >}}
  322. <style>.js-usesameorigin { display: none }</style>
  323. <strong>NOPE!</strong> Attempting to submit to unknown origin.
  324. {{< /hackcss-alert >}}
  325. {{< hackcss-alert type="warning" class="js-useonlinehelp" >}}
  326. Please use <a href="/feature/online-help/">Online Help</a> to generate configuration while <a href="/feature/work-offline/">Working Offline</a>.
  327. {{< /hackcss-alert >}}
  328. {{< hackcss-alert type="warning" class="js-disconnect" >}}
  329. <style>.js-disconnect { display: none }</style>
  330. Please <a href="/feature/work-offline/">Disconnect</a> from the network before generating your configuration.
  331. {{< /hackcss-alert >}}
  332. {{< hackcss-formgroup name="addressgroup" >}}
  333. {{< hackcss-label for="address" >}}
  334. <abbr title="Monero">XMR</abbr> Address:
  335. {{< /hackcss-label >}}
  336. {{< hackcss-textinput
  337. required="true"
  338. disabled="true"
  339. type="text" id="address" name="address"
  340. placeholder="44ky1q4d..."
  341. pattern="^4[0-9AB][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{93}$"
  342. >}}
  343. {{< hackcss-helpblock >}}
  344. Enter payout address. {{< external href="https://getmonero.org/resources/user-guides/securely_purchase.html" >}}Create Secure Wallet{{< /external >}}.
  345. {{< /hackcss-helpblock >}}
  346. {{< /hackcss-formgroup >}}
  347. {{< hackcss-buttongroup formactions="true" >}}
  348. {{< hackcss-button class="muted" name="generate" type="success" text="Generate Config" disabled="true" />}}
  349. {{< /hackcss-buttongroup >}}
  350. <details>
  351. <summary>Advanced Settings</summary>
  352. <p>Optional. <a href="#create-your-own-proxy">Create Your Own Proxy</a> before using.</p>
  353. {{< hackcss-formgroup name="servergroup" >}}
  354. {{< hackcss-label for="server" text="Proxy Server:" />}}
  355. {{< hackcss-textinput type="url" id="server" name="server" placeholder="wss://domain.example:80" >}}
  356. {{< hackcss-helpblock >}}
  357. Web Socket URL for custom proxy server.
  358. {{< /hackcss-helpblock >}}
  359. {{< /hackcss-formgroup >}}
  360. {{< hackcss-formgroup name="poolgroup" >}}
  361. {{< hackcss-label for="pool" text="Mining pool:" />}}
  362. {{< hackcss-select id="pool" name="pool" >}}
  363. <option>moneroocean.stream</option>
  364. <option>etn.nanopool.org</option>
  365. <option>monero.hashvault.pro</option>
  366. <option>minemonero.pro</option>
  367. <option>moneroocean.stream:100</option>
  368. <option>aeon-pool.com</option>
  369. <option>aeon-pool.sytes.net</option>
  370. <option>aeonpool.xyz</option>
  371. <option>trtl.flashpool.club</option>
  372. <option>aeonpool.dreamitsystems.com</option>
  373. <option>clawde.xyz</option>
  374. <option>xmr.prohash.net</option>
  375. <option>aeon.uax.io</option>
  376. <option>aeonpool.net</option>
  377. <option>xmrminerpro.com</option>
  378. <option>minercircle.com</option>
  379. <option>xmrpool.net</option>
  380. <option>supportaeon.com</option>
  381. <option>usxmrpool.com</option>
  382. <option>aeonminingpool.com</option>
  383. <option>supportxmr.com</option>
  384. <option>aeonhash.com</option>
  385. <option>minexmr.com</option>
  386. <option>pooltupi.com</option>
  387. <option>xmrpool.eu</option>
  388. <option>slowandsteady.fun</option>
  389. <option>etn.hashvault.pro</option>
  390. <option>poolmining.org</option>
  391. <option>aeon.rupool.tk</option>
  392. <option>aeon.semipool.com</option>
  393. <option>etn.spacepools.org</option>
  394. <option>osiamining.com</option>
  395. <option>durinsmine.com</option>
  396. <option>dwarfpool.com</option>
  397. <option>arhash.xyz</option>
  398. <option>xmr.nanopool.org</option>
  399. <option>aeon.hashvault.pro</option>
  400. <option>minereasy.com</option>
  401. <option>moneropool.com</option>
  402. <option>aeon.n-engine.com</option>
  403. <option>aeon.sumominer.com</option>
  404. <option>monerohash.com</option>
  405. <option>monero.crypto-pool.fr</option>
  406. {{< /hackcss-select >}}
  407. {{< hackcss-helpblock >}}
  408. Select a {{< external href="https://git.habd.as/comfusion/webminerpool/src/branch/master/server/pools.json" text="supported pool" />}} to mine with.
  409. {{< /hackcss-helpblock >}}
  410. {{< /hackcss-formgroup >}}
  411. {{< hackcss-formgroup name="poolpassgroup" >}}
  412. {{< hackcss-label for="poolpass" text="Password:" />}}
  413. {{< hackcss-textinput type="password" id="poolpass" name="poolpass" >}}
  414. {{< hackcss-helpblock >}}
  415. Password for your pool. Often not needed.
  416. {{< /hackcss-helpblock >}}
  417. {{< /hackcss-formgroup >}}
  418. {{< hackcss-formgroup name="throttlegroup" >}}
  419. {{< hackcss-label for="throttle" text="Throttle:" />}}
  420. {{< hackcss-textinput type="number" id="throttle" name="throttle" placeholder="Use 90 for 10% capacity" step="5" min="70" max="90" >}}
  421. {{< hackcss-helpblock >}}
  422. Override default of 70 (30% capacity).
  423. {{< /hackcss-helpblock >}}
  424. {{< /hackcss-formgroup >}}
  425. {{< hackcss-formgroup name="useridgroup" >}}
  426. {{< hackcss-label for="userid" text="User Id:" />}}
  427. {{< hackcss-textinput type="text" id="userid" name="userid" placeholder="Any string with a length < 200 characters" maxlength="200" >}}
  428. {{< hackcss-helpblock >}}
  429. Combine hash metrics for all users.
  430. {{< /hackcss-helpblock >}}
  431. {{< /hackcss-formgroup >}}
  432. </details>
  433. {{< /hackcss-form >}}
  434. {{< /hackcss-card >}}
  435. Enable debugging to output detailed socket messages from the proxy to the browser console by adding the following to your site config:
  436. ```toml
  437. [params.modules.toxic_swamp]
  438. debugging = true
  439. ```
  440. </details>
  441. # Internationalization
  442. English translations available for toolbar display:
  443. - Indonesian (id)
  444. - Russian (ru)
  445. - Greek (el)
  446. - German (de)
  447. - Polish (pl)
  448. - Italian (it)
  449. Enable them with module `translations` whitelist:
  450. ```toml
  451. [params.modules.toxic_swamp]
  452. translations = ["id", "ru", "el", "de", "pl", "it"] # English translations enabled
  453. ```
  454. Use `languageCode` site config to control which is displayed:
  455. ```toml
  456. languageCode = "en-US" # English (United States) or English by default
  457. languageCode = "id-ID" # Indonesian (Indonesia) or Indonesian, if available
  458. languageCode = "ru-RU" # Russian (Russia) or Russian, if available
  459. languageCode = "el-GR" # Greek (Greece) or Greek, if available
  460. languageCode = "de-DE" # German (Germany) or German, if available
  461. languageCode = "pl-PL" # Polish (Poland) or Polish, if available
  462. languageCode = "it-IT" # Italian (Italy) or Italian, if available
  463. ```
  464. {{< hackcss-alert type="info" >}}
  465. <strong>Note:</strong> Language tag syntax is defined by the <abbr title="Internet Engineering Task Force">IETF</abbr>'s {{< external href="https://tools.ietf.org/html/bcp47" text="BCP 47" />}}.
  466. {{< /hackcss-alert >}}
  467. Modify translations from `inline.jsonld.html` in your site `layouts` directory. If the file doesn't exist yet, copy it from module default:
  468. ```sh
  469. mkdir -p layouts/partials/modules/toxic-swamp/ && \
  470. cp themes/toxic-swamp/layouts/partials/modules/toxic-swamp/inline.jsonld.html $_
  471. ```
  472. Remove config and customizations to return to module defaults.