VPN_Tools/Mullvad/Mullvad_Account_Expiry_Notifier/README.md

64 lines
1.5 KiB
Markdown

# Mullvad Account Expiry Notifier
## # Features
* Reads 16-digit account numbers from a file (accounts.txt).
* Fetches expiration dates from the Mullvad API.
* Sends alerts to a specified Discord webhook if an account is nearing expiration.
* Ensures valid account numbers and handles API response errors gracefully.
### Prerequisites
- A valid accounts.txt file containing Mullvad account numbers (one per line).
- A Discord webhook URL for notifications.
- Required dependencies: curl, jq, and date.
### Installation
Ensure the script has execution permissions:
```
chmod +x check_mullvad_account_expiry.sh
```
### Usage
Create a file named accounts.txt and list Mullvad account numbers:
```
1234567890123456
9876543210987654
```
Set your Discord webhook URL in the script:
```
DISCORD_WEBHOOK_URL="your_discord_webhook_url"
```
Run the script:
```
./check_mullvad_account_expiry.sh
```
### Configuration
- TXT_FILE: The file containing Mullvad account numbers (default: accounts.txt).
- DAYS_THRESHOLD: Number of days before expiry to trigger an alert (default: 14).
- DISCORD_WEBHOOK_URL: The webhook URL to send alerts to Discord.
#### Example Output
Account 1234567890123456 expires in 10 days.
Sending Discord notification...
Account 9876543210987654 expires in 20 days.
### Notes
Ensure the accounts.txt file contains only valid 16-digit Mullvad account numbers.
The script adds a small delay between API requests to prevent rate-limiting.
Modify DAYS_THRESHOLD to adjust the notification period.