Skip to content

Commit ac9d3d6

Browse files
committed
Merge remote-tracking branch 'upstream/dev' into new_code
2 parents ea442a5 + 70cabf6 commit ac9d3d6

26 files changed

Lines changed: 1778 additions & 471 deletions

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
with:
2121
fetch-depth: 0
2222
ref: ${{ github.event.workflow_run.head_sha || github.sha }}
23-
- uses: actions/setup-python@v6
23+
- uses: actions/setup-python@v7
2424
with:
2525
python-version: '3.x'
2626
- name: Install docs dependencies

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
steps:
2424
- uses: actions/checkout@v7
2525
- name: Set up Python
26-
uses: actions/setup-python@v6
26+
uses: actions/setup-python@v7
2727
with:
2828
python-version: "3.x"
2929
- name: Install build

.github/workflows/stale.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
stale:
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/stale@v10
15+
- uses: actions/stale@v11
1616
with:
1717
repo-token: ${{ secrets.GITHUB_TOKEN }}
1818
days-before-stale: 30

.github/workflows/tests.yml

Lines changed: 48 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
uses: actions/checkout@v7
2424

2525
- name: Set up Python ${{ matrix.python-version }}
26-
uses: actions/setup-python@v6
26+
uses: actions/setup-python@v7
2727
with:
2828
python-version: ${{ matrix.python-version }}
2929

@@ -46,15 +46,60 @@ jobs:
4646
uses: actions/checkout@v7
4747

4848
- name: Set up Python
49-
uses: actions/setup-python@v6
49+
uses: actions/setup-python@v7
5050
with:
5151
python-version: "3.13"
5252

5353
- name: Install dependencies
5454
run: python -m pip install -e ".[test]"
5555

5656
- name: Run setup wizard smoke tests
57-
run: python -m pytest tests/test_setup_wizard.py tests/test_install_method_commands.py tests/test_config_generation.py tests/test_webhook_delivery.py
57+
run: python -m pytest tests/test_setup_wizard.py tests/test_install_method_commands.py tests/test_config_generation.py tests/test_webhook_delivery.py tests/test_packaging.py
58+
59+
browser-e2e:
60+
name: dashboard browser E2E (Chromium)
61+
runs-on: ubuntu-latest
62+
permissions:
63+
contents: read
64+
65+
steps:
66+
- name: Checkout repository
67+
uses: actions/checkout@v7
68+
69+
- name: Set up Python
70+
uses: actions/setup-python@v7
71+
with:
72+
python-version: "3.13"
73+
74+
- name: Install test and browser dependencies
75+
run: python -m pip install -e '.[test,e2e]'
76+
77+
- name: Install Chromium
78+
run: python -m playwright install --with-deps chromium
79+
80+
- name: Run browser E2E tests
81+
run: python -m pytest tests/test_browser_e2e.py
82+
83+
docs-check:
84+
name: documentation strict build
85+
runs-on: ubuntu-latest
86+
permissions:
87+
contents: read
88+
89+
steps:
90+
- name: Checkout repository
91+
uses: actions/checkout@v7
92+
93+
- name: Set up Python
94+
uses: actions/setup-python@v7
95+
with:
96+
python-version: "3.13"
97+
98+
- name: Install documentation dependencies
99+
run: python -m pip install -r docs/requirements.txt
100+
101+
- name: Build documentation with strict validation
102+
run: mkdocs build --strict --site-dir local/docs-site
58103

59104
container-smoke:
60105
name: container smoke checks

.gitleaks.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ description = "Skip placeholders and variable references"
3333
regexTarget = "secret"
3434
regexes = [
3535
'''(?i)^legacy-secret$''',
36+
'''(?i)^github_pat_private$''',
37+
'''(?i)^lastfm-key$''',
38+
'''(?i)^lastfm-secret$''',
39+
'''(?i)^new-github-token$''',
40+
'''(?i)^new-refresh-token$''',
41+
'''(?i)^spotify-secret$''',
42+
'''^\{api_key\}$''',
3643
'''(?i)^your_[a-z0-9_]+$''',
3744
'''(?i)^example(?:_[a-z0-9_]+)?$''',
3845
'''(?i)^dummy(?:_[a-z0-9_]+)?$''',

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ Powerful, real-time OSINT suite for tracking every activity on Instagram - from
2222

2323
#### Python from PyPI
2424

25+
New to Python or unsure what is installed? Follow the [Python install walkthrough](https://misiektoja.github.io/instagram_monitor/installation/#new-to-python-install-everything) first.
26+
2527
```sh
2628
pip install instagram_monitor
2729
```
@@ -142,17 +144,18 @@ Use [Quick Install & Run](#-quick-install-run) above for first-time setup. The t
142144
| I want to... | Run this |
143145
| --- | --- |
144146
| Try public monitoring without a login | `instagram_monitor <target_insta_user>` |
145-
| Start targets saved in `TARGET_USERNAMES` | `instagram_monitor --config-file instagram_monitor.conf` |
147+
| Monitor a target with a logged in session (see stories, reels and follower details) | Import a [browser session](https://misiektoja.github.io/instagram_monitor/configuration/#option-3-session-login-using-browser-cookies-recommended) then run `instagram_monitor -u <your_insta_user> <target_insta_user>` |
148+
| Monitor targets saved in `TARGET_USERNAMES` | `instagram_monitor --config-file instagram_monitor.conf` |
146149
| Start a browser control panel without targets | `instagram_monitor --web-dashboard` |
147-
| Monitor several accounts | `instagram_monitor target_1 target_2` or `instagram_monitor --targets target_1,target_2` |
150+
| Monitor several accounts without login | `instagram_monitor target_1 target_2` or `instagram_monitor --targets target_1,target_2` |
148151
| Check the selected login, connectivity and targets | `instagram_monitor --doctor` |
149-
| See stories, reels and follower details | Import a [browser session](https://misiektoja.github.io/instagram_monitor/configuration/#option-3-session-login-using-browser-cookies-recommended) then run `instagram_monitor -u <your_insta_user> <target_insta_user>` |
152+
150153

151154
Running the tool with no arguments offers the wizard if you have not saved any targets or enabled the Web Dashboard. If targets are already saved, it starts monitoring them.
152155

153156
For browser choices, saved targets, configuration backups and setup recovery, see the [full Setup & First Run guide](https://misiektoja.github.io/instagram_monitor/setup-and-first-run/).
154157

155-
For container operation, browser profiles, email alerts, Discord, ntfy and advanced settings, see [Configuration](https://misiektoja.github.io/instagram_monitor/configuration/) and [Usage](https://misiektoja.github.io/instagram_monitor/usage/). Keep private webhook URLs in `.env` or enter them through the setup wizard. See [Webhook Notifications](https://misiektoja.github.io/instagram_monitor/usage/#webhook-notifications) for complete setup and testing instructions.
158+
For container operation, browser profiles, email alerts, Discord, ntfy and advanced settings, see [Configuration](https://misiektoja.github.io/instagram_monitor/configuration/) and [Usage](https://misiektoja.github.io/instagram_monitor/usage/). Keep private webhook URLs in `.env` by using `instagram_monitor --set-webhook-url` or enter them through the setup wizard. See [Webhook Notifications](https://misiektoja.github.io/instagram_monitor/usage/#webhook-notifications) for complete setup and testing instructions.
156159

157160
<a id="documentation"></a>
158161
## Documentation

RELEASE_NOTES.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,29 @@
11
# instagram_monitor release notes
22

3+
This is a high-level summary of the most important changes.
4+
5+
# Changes in 3.8 (30 Jul 2026)
6+
7+
Version **3.8** strengthens **Discord and ntfy webhook delivery**, adds safer **private URL setup**, improves **proxy IP detection** and brings better notification controls.
8+
9+
**Features and improvements**:
10+
11+
- **IMPROVE:** Added ordered **proxy IP lookup fallback endpoints** with backward-compatible single-URL configuration, IPv4 and IPv6 validation plus documented privacy controls (thanks [@tomballgithub](https://github.com/tomballgithub), from [#113](https://github.com/misiektoja/instagram_monitor/pull/113))
12+
- **NEW:** Added private **webhook URL setup** through `--set-webhook-url` with hidden entry and complete HTTPS destination validation
13+
- **IMPROVE:** Added stricter **webhook request validation** for destinations, avatars, templates, transforms and expanded headers plus Discord mention suppression
14+
- **IMPROVE:** Added **bounded webhook delivery** with isolated requests, capped rate-limit delays, one retry for temporary failures and automatic provider correction across CLI, Doctor and Web Dashboard flows
15+
- **IMPROVE:** Added **native ntfy image attachments** with a 5 MiB limit and automatic text-only fallback when image preparation or upload fails
16+
- **IMPROVE:** Made the **status, follower and error webhook controls** enable webhook delivery for the current run
17+
- **IMPROVE:** Split the startup notification summary into compact **email and webhook rows** across concise, verbose and logged views
18+
19+
**Bug fixes**:
20+
21+
- **BUGFIX:** Stopped startup summaries and Web Dashboard setting-change logs from writing private webhook URLs to logs
22+
- **BUGFIX:** Kept long ntfy messages below its 4 KB attachment boundary, added a visible truncation explanation and preserved complete UTF-8 characters
23+
- **BUGFIX:** Restored green `On` and red `Off` status cues in compact notification rows without coloring category text
24+
- **BUGFIX:** Made `SIGHUP` apply rotated proxy credentials to active Instaloader sessions and redetect Discord or ntfy when the private webhook destination changes
25+
- **BUGFIX:** Made proxy IP failover try every configured endpoint before the long retry delay, reject invalid successful responses without crashing and preserve custom endpoint lists in generated configuration
26+
327
# Changes in 3.7.1 (24 Jul 2026)
428

529
**Bug fixes**:

docs/configuration.md

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,22 @@ If the same setting appears in more than one place, the item later in this list
4242

4343
The `.env` and process environment layer applies only to `SESSION_PASSWORD`, `SMTP_PASSWORD`, `WEBHOOK_URL`, `PROXY_URL` and `NTFY_ACCESS_TOKEN`. For these keys, a value in the selected `.env` file replaces a value that was already exported in the shell. Use `--config-file PATH` and `--env-file PATH` if you do not want automatic file discovery.
4444

45+
### Proxy IP Lookup Endpoints
46+
47+
When proxy routing is enabled, Instagram Monitor checks the proxy exit address through `IP_ADDRESS_URL`. The setting accepts one complete HTTP or HTTPS URL or an ordered non-empty list:
48+
49+
```ini
50+
IP_ADDRESS_URL = [
51+
"https://checkip.amazonaws.com",
52+
"https://api.ipify.org?format=json",
53+
"https://api.my-ip.io/v2/ip.json",
54+
]
55+
```
56+
57+
Each retry cycle tries every configured endpoint in order before the long retry delay. A response is accepted only when a recognized JSON field or plain-text body contains a valid IPv4 or IPv6 address. Empty lists, incomplete URLs and URLs with embedded credentials are rejected with an unavailable status instead of crashing monitoring.
58+
59+
Each public lookup service can observe the proxy exit IP. Set one trusted endpoint or a self-hosted service if you do not want fallback requests sent to multiple providers. These lookup requests do not include Instagram session credentials.
60+
4561
Save one or more monitoring targets through setup or set `TARGET_USERNAMES` yourself:
4662

4763
```ini
@@ -175,10 +191,10 @@ Every supported browser can have several profiles with separate cookies. Use one
175191

176192
- **Pick by name** with `--browser-profile`. Use the Firefox profile name (e.g. `default-release`) or the Chromium profile directory (e.g. `Default`, `Profile 1`):
177193

178-
```sh
179-
instagram_monitor --import-browser-session --browser chrome --browser-profile "Profile 1"
180-
instagram_monitor --import-browser-session --browser firefox --browser-profile "default-release"
181-
```
194+
```sh
195+
instagram_monitor --import-browser-session --browser chrome --browser-profile "Profile 1"
196+
instagram_monitor --import-browser-session --browser firefox --browser-profile "default-release"
197+
```
182198

183199
- **Let it prompt you.** If you do not pass `--browser-profile` and several profiles exist, the tool lists them so you can choose.
184200
- **On the [Web Dashboard](view-modes.md#web-dashboard-mode)**, pick the browser, click **Import** and select a profile if prompted.
@@ -240,6 +256,14 @@ instagram_monitor --send-test-email
240256

241257
A `.env` file is a plain text file that holds private values separately from regular configuration. Store `SESSION_PASSWORD`, `SMTP_PASSWORD`, `WEBHOOK_URL`, `NTFY_ACCESS_TOKEN` and `PROXY_URL` there. Do not commit this file or share it.
242258

259+
The recommended way to save a Discord or ntfy destination is:
260+
261+
```sh
262+
instagram_monitor --set-webhook-url
263+
```
264+
265+
Paste the complete HTTPS URL at the hidden prompt. Instagram Monitor validates it then updates only `WEBHOOK_URL` in `.env` without displaying the value. Standard Discord and public `ntfy.sh` URLs select the matching request format automatically. Configure `WEBHOOK_PROVIDER` in `instagram_monitor.conf` for a self-hosted or compatible endpoint. Use `--env-file PATH` with this command to select another dotenv destination.
266+
243267
You can use operating system environment variables instead of a file. Set them with `export` on Linux, Unix, macOS or WSL:
244268

245269
```sh

docs/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ Powerful, real-time OSINT suite for tracking every activity on Instagram - from
2222

2323
#### Python from PyPI
2424

25+
New to Python or unsure what is installed? Follow the [Python install walkthrough](https://misiektoja.github.io/instagram_monitor/installation/#new-to-python-install-everything) first.
26+
2527
```sh
2628
pip install instagram_monitor
2729
```

0 commit comments

Comments
 (0)