Added LXC support, Fedora setup script, auto vpn add script, updated README

This commit is contained in:
2023-05-13 17:42:26 +02:00
parent 72e99dbae0
commit e4fdd51924
4 changed files with 36 additions and 11 deletions

View File

@@ -6,13 +6,11 @@ This repo contains the script to manage multiple mcr bot on a single VM/Containe
```bash
├── start.sh
│ ├── bot-name-1
│ ├── Microsoft-Rewards-bot
│ │ ├── ms_rewards_farmer.py
│ ├── bot-name-2
│ ├── ms_rewards_farmer.py
│ ├── bot-name-3
│ │ ├── ms_rewards_farmer.py
│ ├── ...
│ ├── vpnname.json
│ ├── vpn
│ ├── vpnname.ovpn
```
## How to run
@@ -20,17 +18,25 @@ This repo contains the script to manage multiple mcr bot on a single VM/Containe
Clone the project
```bash
git clone https://git.justw.tf/Lightemerald/mcr-bot
curl -sSL https://git.justw.tf/Lightemerald/mcr-bot/raw/branch/main/setup-fedora.sh | bash
```
Go to the project directory
Add your VPN files to `./vpn` then run
```bash
cd mcr-bot
sh setup-vpn.sh
```
Copy your bots with the same name as the VPN then run the script
Copy your accounts file named as [vpnname].json in the Bot then run
```bash
sh start.sh
```
### If using LXC
Execute this command to allow the container to use TUN kernel module, replace [id_ct] with the LXC id in proxmox
```bash
echo -e "lxc.cgroup.devices.allow: c 10:200 rwm\nlxc.mount.entry: /dev/net/tun dev/net/tun none bind,create=file" >> /etc/pve/lxc/[id_ct].conf
```
ps: container must be powered off before and restarted only after

10
setup-fedora.sh Normal file
View File

@@ -0,0 +1,10 @@
#!/bin/bash
dnf up -y
dnf in NetworkManager NetworkManager-openvpn openvpn python python-pip python-tkinter chromedriver chromium xorg-x11-server-Xvfb git -y
git clone https://git.justw.tf/Lightemerald/mcr-bot
cd mrc-bot
git clone https://github.com/farshadz1997/Microsoft-Rewards-bot
pip install -r Microsoft-Rewards-bot/requirements.txt
mkdir vpn
echo "Add your VPN files in ./vpn and your accounts file with the same name as the vpn in ./Microsoft-Rewards-bot then run setup-vpn.sh"

9
setup-vpn.sh Normal file
View File

@@ -0,0 +1,9 @@
#!/bin/bash
folder_path="vpn"
for file in "$folder_path"/*; do
if [[ -f "$file" ]]; then
nmcli con import type openvpn file "$file"
fi
done

View File

@@ -85,7 +85,7 @@ do
echo "Starting script..."
if [ -d "./$vpn" ]
then
gnome-terminal -- sh -c "cd ./$vpn && python ms_rewards_farmer.py --dont-check-for-updates --shuffle --session --superfast --on-finish exit --no-webdriver-manager --discord $webhook; exit; exec bash" &
gnome-terminal -- sh -c "cd Microsoft-Rewards-bot && python ms_rewards_farmer.py --dont-check-for-updates --shuffle --session --superfast --on-finish exit --no-webdriver-manager --accounts-file $vpn.json --discord $webhook; exit; exec bash" &
read -t 2
echo "Script started"
read -t 1