Compare commits

...

2 Commits

Author SHA1 Message Date
e53974a239 Fix ip not showing with proxy 2026-06-03 18:47:38 +02:00
db5b5aba2d Add readme.md 2026-06-03 12:39:23 +02:00
2 changed files with 53 additions and 1 deletions

52
README.md Normal file
View File

@@ -0,0 +1,52 @@
<h1 align="center">Image Tracker</h1>
<p align="center">
<img alt="Stars" src="https://img.shields.io/github/stars/Gabi-Zar/Image-Tracker?style=flat&color=magenta">
<img alt="Forks" src="https://img.shields.io/github/forks/Gabi-Zar/Image-Tracker?style=flat&color=purple">
<img alt="License" src="https://img.shields.io/github/license/Gabi-Zar/Image-Tracker?style=flat&color=BB0000">
<br>
<a href="https://github.com/Gabi-Zar"><img title="Developer" src="https://img.shields.io/badge/developer-GabiZar-blue"></a>
<img alt="Written In" src="https://img.shields.io/badge/Written%20In-Javascript-yellow?logo=javascript">
</p>
---
A tracking image tool that send data over ntfy.
## Config & Usage
Configure the server port and ntfy settings using a `.env` file.
```
PORT=3000
NTFY_USER=user
NTFY_PASSWORD=password
NTFY_TOPIC=my-topic
NTFY_SERVER=https://ntfy.sh
```
Add images by creating a config.json file containing an array of image paths and Base64-encoded data. See [exemple.config.json](exemple.config.json)
Installe dependencies with `npm install`
And just run `npm run start` or `node main.js`
## Output Exemple
```
New connection for image "path/to/image.gif"
At dd/mm/yyyy hh:mm:ss
IP: xxx.xxx.xxx.xxx | PORT: xxxxx
Browser: Chrome version xxx
OS: Windows version 10
CPU architecture: amd64
Languages: en-US,en;q=0.9
Source: document
```
## License
This project is licensed under the [GPL-3.0 license](LICENSE).
---
<p align="center">If you like this app, consider giving it a star on GitHub!</p>

View File

@@ -21,7 +21,7 @@ for (const image of config.images) {
const userAgent = UAParser(req.headers["user-agent"]); const userAgent = UAParser(req.headers["user-agent"]);
const title = `New connection for image "${image.name}"`; const title = `New connection for image "${image.name}"`;
const message = `At ${new Date(Date.now()).toLocaleString()}\n const message = `At ${new Date(Date.now()).toLocaleString()}\n
IP: ${req.socket.remoteAddress} | PORT: ${req.socket.remotePort}\n IP: ${req.ip} | PORT: ${req.socket.remotePort}\n
Browser: ${userAgent.browser.name} version ${userAgent.browser.version}\n Browser: ${userAgent.browser.name} version ${userAgent.browser.version}\n
OS: ${userAgent.os.name} version ${userAgent.os.version}\n OS: ${userAgent.os.name} version ${userAgent.os.version}\n
CPU architecture: ${userAgent.cpu.architecture}\n CPU architecture: ${userAgent.cpu.architecture}\n