# push (client certificate):
git remote set-url --push origin https://coredump.ws:8443/repos/CTracker.git
Branches and tags
| master | branch | 1 days ago | zip |
| stats-merge | branch | 14 days ago | zip |
| memory-fixes | branch | 24 days ago | zip |
Files at HEAD (b04de8fcd3) · download zip
| android-phone-tracker/ | |
| backdoor/ | |
| device_manuals_protocols/ | |
| device_server/ | |
| etc/ | |
| tracker-mailer/ | |
| var/ | |
| .gitattributes | 66 B |
| .gitignore | 1.0 KB |
| LICENSE | 34.3 KB |
| README.md | 3.6 KB |
Recent commits · all
| b04de8fc | config.h: the eight short alarms in the replay were under 10 m out, not 12 | no-body-in-particular | 1 days ago |
| ffe9072e | Fences: the edge is the edge again, and weak fixes no longer confirm an exit | no-body-in-particular | 1 days ago |
| 26da5959 | tracker: per-fence tolerance, its dashed ring, and a dot for coming back | no-body-in-particular | 1 days ago |
| d2d045dc | Fences: judge leaving by the device's speed, log every excursion, let weak fixes count | no-body-in-particular | 1 days ago |
| b84c0b7b | tracker-mailer: one small C daemon instead of a Python script run from cron | no-body-in-particular | 9 days ago |
| d2a4468f | Merge the device_server stats change from the server | no-body-in-particular | 9 days ago |
| 7de266e2 | Stop password-reset mail being usable to mail anyone, and send it from an outbox | no-body-in-particular | 9 days ago |
| 22b9c506 | STATS: readings with their own time, merged into the stats file in order | apol | 14 days ago |
| 4662ca25 | Stop device claiming from revealing and handing out IMEIs | no-body-in-particular | 17 days ago |
| 816df654 | Offer a new view-only link only where there is an old one to replace | no-body-in-particular | 23 days ago |
README.md
CTracker
Lightweight GPS tracker server - As seen on https://coredump.ws or in this talk: https://www.youtube.com/watch?v=jJehqls7yxM
This server was built originally to support the JIMI AM01 ankle monitor, before traccar supported this device. It has a few workaround for the quirks of it, and is really lightweight to run ( I run it on a budget VPS myself ) - taking less than 3gb of ram - very little bandwidth and computing power. It's web-UI is also optimized for mobile and low power devices ( and for ease of use ).
Protocol/device manuals are included - as well as the c-based server ( device_server folder ). The server can be installed by running "make && make install" in the device_server folder. Then the application should be run under the webserver user, with for instance "nohup su -c jimitrack hiawatha" for the user hiawatha. The /var/gps folder has a script to fetch the cell phone tower database - since GitHub isn't too great with large files ( it's 500mb ). You don't need to run this for the server to work, however it's a really nice speedup to have.
The website that shows the data is contained in the /var/www folder. Both /var/www and /var/gps should be chown'd to your webserver's user.
Password-reset mail is not sent by the website itself (since 2026-10-29). recover.php writes one job per reset into /var/spool/tracker-outbox (TRACKER_OUTBOX in config.php), and the small daemon in tracker-mailer/tracker-mailer.c sends a fixed message for each as soon as it appears. To set it up:
- change
SENDERandRESET_URLat the top oftracker-mailer.cto your own site, then build it with the command in its header comment (plain libc, no dependencies) and install it as/usr/local/sbin/tracker-mailer; - create a user and group
tracker-mail, the state directory/var/lib/tracker-mail(owned by it, 0700) and the outbox/var/spool/tracker-outboxowned bytracker-mail:tracker-mailwith mode 3770; add the webserver's (PHP) user to the grouptracker-mail; - keep the PHP user out of the
postdropgroup and disablemail()in its PHP configuration, so code running in the website can't submit mail of its own; - in Postfix, allow
tracker-mailinauthorized_submit_usersand pin its sender withlocal_login_sender_mapsto a no-reply address (whose bounces go to /dev/null); - start it with the OpenRC service
etc/init.d/tracker-mailer(rc-update add tracker-mailer default), which runs it astracker-mail. It logs to syslog.
Resets are limited to 10 requests per client address per hour and 20 sent per hour site-wide; registrations to 5 per address and 50 site-wide per day. Without these limits, anyone could make the site send its (DKIM-signed) reset mail to any address.
A default google API key is included for your (ab)use - and there are some sensible defaults set in "config.h" for file sizes on the device server - you should check yourself if these will work for you.
Contains icons from FontAwesome ( https://fontawesome.com/ ), a modified ( minimalized ) version of GregWar's captcha ( https://github.com/Gregwar/CaptchaBundle ), and a map by OpenLayers ( https://openlayers.org/ ). JQuery ( https://jquery.com/ ) is used, and JQuery Timepicker is also used for backwards browser compatibility (https://timepicker.co/#) . All with their respective licenses.
I'm aware the c-based server code could use some cleanup, maybe i'll get to that.. sometime :P
My code however, is GPL'd.
License
GPL-3.0-or-later, see LICENSE. The bundled third-party code listed above (FontAwesome, Gregwar's captcha, OpenLayers, jQuery and jQuery UI, jQuery Timepicker, Chart.js) keeps its own licence.