About

myanonamouse.net is a private torrent tracker aimed solely at books and documents. The following guide is a complete run through all the methods that can be used to set up myanonamouse.net with the sake of automating tasks. These instructions should be suitable for people that will be running a seedbox or an unattended torrenting system.

Website Setup (myanonamouse.net)

The first step is to access myanonamouse.net and go to the invite application:

and then proceed to the IRC chat:

in order to join the Support channel (#help on IRC).

The instructions once joining the help channel should guide you to request an interview - at the time of writing, typing !inv on the #help channel queues the user for an interview to become a member.

You will be given an interview consisting in some general knowledge and knowledge of the rules (some of the knowledge is also available on the FAQ).

During the interview, a few questions will be asked that will allow the administrators to create an account:

  • a working E-Mail address,
  • an unique nickname

It is a good idea for the E-Mail address to not be disposable since it will be the means to communicate in case something goes wrong.

Once you are a fully-fledged member, you can begin uploading and downloading as well as having access to the forums and the members-only IRC channels.

Observations

The following are some notes pertaining to the site and the functionality provided. These observations might change depending on how myanonamouse is run in the future but they make some good remarks:

  • myanonamouse has the following virtual currencies:
    • bonus points,
    • upload/download ratio,
    • cheese,
    • freeleech wedges,
  • the user will be granted bonus points for/from:
    • seeding torrents (measured in time not in upload bytes),
    • being connected to IRC,
    • as random gifts from users,
    • buying bonus points with real currency
  • myanonamouse requires a global ratio of $1:1$ for uploads and downloads
    • the upload ratio is tied to the amount of time spend seeding, not the actual metric of how much the torrent client has been effectively downloading (in other words, just having a torrent seed is enough to win points),
  • in case the global ratio of $1:1$ cannot be achieved (ie: torrents that nobody is downloading) the user is still required to seed the torrent (at the time of writing, for $72$ hours in a period of $30$ days).
    • $n$ hours in $m$ days means that a torrent must be seeded at least $72$ hours over a total timespan of $30$ days
  • mmyanonamouse.net relies heavily on the IP address of connecting clients, clients with a dynamic IP from ISPs can update their registered IP both manually and programatically

Setting up Dynamic IP

Even if the seedbox benefits from a static IP address, it is still beneficial to set up a system that will update the IP in case it ever changes. Doing so, requires that the user access myanonamouse.net from a browser and set up a session token (in myanonamouse.net, a mam_id). To do so, log in to myanonamouse.net and click on the username at the top and then navigate to Preferences→Security where some settings have to be made:

In order:

  1. (1) enter the seedbox IP in the IP box and click Submit changes!
    1. a token will be generated and displayed, it is not important so head back
    2. a row will have been generated as the newly created session containing the buttons Switch to ASN locked session, Allow session to set dynamic seedbox IP, 'View IP locked session cookie' and Remove session
  2. (2) click the Allow session to set dynamic seedbox IP,
  3. (3) click View IP locked session cookie
    1. a session cookie containing a large number of characters will be displayed, this is the mam_id and this value should be stored for the following steps

Set up a task that will run every hour (for instance, using crontab) on the seedbox. It is imperative that this script connects to the myanonamouse.net website using the same IP address as the torrent client. If crontab is used on a relatively modern distro, create a file at /etc/cron.hourly/myanonamouse-seedbox-update with the following contents:

#!/bin/bash
 
curl -s -b 'mam_id=REPLACE_MAM_ID' \
    https://t.myanonamouse.net/json/dynamicSeedbox.php 2>/dev/null 2>&1 >/dev/null

where REPLACE_MAM_ID should be set to the mam_id retrieved from the View IP locked session cookie on the User→Preferences→Security page.

The script can then be made executable:

chmod +x myanonamouse-seedbox-update

To test, execute the following command:

curl -b 'mam_id=REPLACE_MAM_ID' \
    https://t.myanonamouse.net/json/dynamicSeedbox.php

where:

  • REPLACE_MAM_ID should be set to the mam_id,

and it should either say No Change (if you have previously executed the script) or confirm that the IP has been updated (Completed). Here are some terse explanations for the error codes:

  • No Session Cookie the mam_id might be missing from the command,
  • Incorrect session type make sure that the Allow session to set dynamic seedbox IP option is enabled for the mam_id provided to the commmand.

The script will now be run every hour and update the IP address registered with myanonamouse.net.

Torrent and PVR Settings

The following settings should be safe:

  • $1.1$ seed ratio,
  • $72$ hours minimum seeding

Make sure that connecting PVRs do not remove the torrent prematurely, specifically, for Readarr go to Settings→Download Clients, click the Show Advanced gear at the top and make sure that Remove imported downloads from download client history is unchecked.

Prowlarr

For Prowlarr, the myanonamouse.net indexer can now be added. Go to Indexers and click Add Indexer at the top. You will have to enter the mam_id in the MAM ID textfield of the popup when adding the MyAnonamouse indexer.

External Ratio Management

If qbittorrent is used as the torrent client, it is a good idea to disable the automatic pausing or deletion of torrents by accessing the settings from the menu Tools→Options…→Seeding Limits and unticking both When ratio reaches and When seeding time reaches. Then, an external substitute for those options can be used as explained on the external ratio management for qBittorrent FUSS page.

Essentially, two qman files might be helpful for myanonamouse. First would be a qman file specifically for myanonamouse:

myanonamouse-readarr.qman
{
    "category": "readarr",
    "tracker": "t.myanonamouse.net",
    "public": {
        "min_seed_ratio": 2,
        "max_seed_ratio": 2,
        "min_seed_time": 72,
        "max_seed_time": 120
    },
    "private": {
        "min_seed_ratio": 2,
        "max_seed_ratio": 2,
        "min_seed_time": 72,
        "max_seed_time": 120
    },
    "delete_files": true
}

that will seed up to a ratio of $2$, a minimal seeding time of $72$ hours and up to $5$ days after which the torrent will be removed (this setting should guarantee VIP status).

As well as a default fallback for all other torrents:

all.qman
{
    "category": "*",
    "public": {
        "min_seed_ratio": 1.1,
        "max_seed_ratio": 1.1,
        "min_seed_time": 1,
        "max_seed_time": 1
    },
    "private": {
        "min_seed_ratio": 1.1,
        "max_seed_ratio": 1.1,
        "min_seed_time": 1,
        "max_seed_time": 1
    },
    "delete_files": true
}

with a default seed ratio of $1.1$ and $1$ hour maximum seed time.

Setting up IRC

Since myanonamouse.net rewards some bonus points from being connected to their IRC server, an IRC client can run in the background on the seedbox and left connected to the IRC server. One IRC client of choice is BitchX but any other client would do.

First, create a separate user and group, for example, myanonamouse:

groupadd myanonamouse
useradd -g myanonamouse -s /bin/bash -d /opt/myanonamouse myanonamouse

then change the user to myanonamouse:

su - myanonamouse

and create a .bitchxrc dot file in the myanonamouse home directory with the following contents:

# disable auto-away
set auto_away off

# create a new window for each channel I join
set join_new_window on
set join_new_window_type new hide swap last double on

# kill the current window when you leave the channel in it
set window_destroy_part on

# press ^x (ctrl+x) to switch between each channel window
bind ^x parse_command window next

bind ^b new_scroll_backward
bind ^f new_scroll_forward

set dcc_autorename on
set dcc_dldir /opt/myanonamouse

on connect "*myanonamouse*" {
    sleep 1
    nick MYNICKNAME
    msg nickserv identify MYPASSWORD
    sleep 1
    on ^notice "NickServ *Password accepted - you are now recognized.*" {
        window new hide swap last double on name help
        window new hide swap last double on name am-members
        window new hide swap last double on name anonamouse.net
        window swap help channel #help
        window swap am-members channel #am-members
        window swap anonamouse.net channel #anonamouse.net
        window swap am-members
    }
}

whilst replacing:

  • MYNICKNAME with the nickname chosen when signing up with myanonamouse.net,
  • MYPASSWORD with the password chosen when signing up with myanonamouse.net

After that, create a .bashrc dot file in the myanonamouse home directory with the following contents:

export IRCNICK="MYNICKNAME"
export IRCUSER="Any"
export IRCNAME="MYNICKNAME"
export IRCSERVER="irc.myanonamouse.net"

and replace MYNICKNAME with the nickname chosen when signing up with myanonamouse.net.

Check that everything is working properly and that BitchX logs onto the irc.myanonamouse.net server by issuing the command:

BitchX -s irc.myanonamouse.net:6697

The process of connecting to irc.myanonamouse.net, setting the nickname, identifying with NickServ and joining the channels #help, #anonamouse.net and #am-members should now be fully automated.

In order to make the IRC client start up in the background when the seedbox boots, create a file at /etc/systemd/system/myanonamouse.service with the following contents:

[Unit]
Description=myanonamouse IRC
Requires=network.target local-fs.target remote-fs.target
After=network.target local-fs.target remote-fs.target
 
[Install]
WantedBy=multi-user.target
 
[Service]
# Configuration
Environment=HOME_DIRECTORY="/opt/myanonamouse"
Environment=TMUX_SESSION_NAME="myanonamouse"
# Internals
Type=oneshot
User=myanonamouse
ExecStart=/usr/bin/tmux new-session -d -c "$HOME_DIRECTORY" -s "$TMUX_SESSION_NAME" -n "$TMUX_SESSION_NAME" /usr/local/bin/BitchX -s irc.myanonamouse.net:6697
ExecStop=/usr/bin/tmux send-keys -t "$TMUX_SESSION_NAME" C-c
RemainAfterExit=yes

and issue:

systemctl daemon-reload

followed by:

systemctl enable myanonamouse.service

to enable the service and make sure that it starts on bootup.

In order to now access BitchX, change the user to myanonamouse:

su - myanonamouse

list all tmux sessions:

tmux list-sessions

and attach to the myanonamouse session with:

tmux attach -t myanonamouse

Finally, to detach from the BitchX session, hit the key-combo Ctrl+B+D.

Extreme Automation

myanonamouse.net requires users to log in every $30$ to the website itself and just being present on IRC will not contribute to that requirements. As such, Selenium can be used to automate a login followed by a logout every week by executing a side script periodically, for example, via cron. In fact, a Selenium script can be derived to automate spending bonus points, contributing to the millionaire vault, etc. in order to satisfy all the requirements of the tracker automatically.

Order of Execution

Using cron, the following logic is implemented:

  • log in every day,
  • top up the VIP status to the maximum number of weeks,
    • if the VIP status is at the maximum,
      • use the credit to buy upload ratio status,
    • if the VIP status is not at the maximum,
      • exit execution

The idea is that all the bonus will be spent on extending the VIP status and, if the VIP status is already at the maximum number of weeks, then the rest of the bonus is spent on purchasing upload ratio status. In doing so, one can ensure that the VIP status is always maintained, opening access to VIP-only torrents, as well as having plenty of credit to download. The freeleech wedges are ignored, mostly because the price of a wedge ($50000$ bonus points) is too high compared to just buying upload status.

In order to accomplish this, a script is created at /etc/cron.daily/myanonamouse-chores that will be ran daily using cron, with the following contents:

#!/bin/bash
 
# Restart the script as an user via sudo.
if [ "$(id -u)" -eq 0 ]; then
    exec su myanonamouse "$0" -- "$@"
fi
 
# Run the Selenium side script.
cd /opt/myanonamouse
EXECUTE=$(selenium-side-runner \
    -c "goog:chromeOptions.args=[--headless,--nogpu,--no-sandbox] browserName=chrome" \
    /opt/myanonamouse/selenium/mam-extend-vip.side 2>&1  | grep -Po "(?<=')(vip)(?=')")
 
if [ "$EXECUTE" != "vip" ]; then
   echo "Could not buy VIP status."
   exit 0
fi
 
selenium-side-runner \
    -c "goog:chromeOptions.args=[--headless,--nogpu,--no-sandbox] browserName=chrome" \
    /opt/myanonamouse/selenium/mam-spend-bonus.side 2>&1 2>/dev/null >/dev/null

Note that the login and logout Selenium script is not used because the two scripts will end up logging in anyway.

Notes

  • Realistically speaking, there will be very rare occasions when the torrent client will be uploading but fortunately myanonamouse policy states that only seeding time is relevant.

linux/automating_myanonamouse_private_tracker.txt · Last modified: 2023/10/21 00:37 by office

Access website using Tor Access website using i2p Wizardry and Steamworks PGP Key


For the contact, copyright, license, warranty and privacy terms for the usage of this website please see the contact, license, privacy, copyright.