bilde2910 / Hauk

Open-source realtime location sharing
Apache License 2.0
589 stars 59 forks source link

retrieves the storage data in any way? #203

Open yuis-ice opened 11 months ago

yuis-ice commented 11 months ago

While I respect that long term location tracking/logging is out of scope for the project,

Hauk is intended as a short-term location sharing service, and long-term sharing is really not in scope of the project

I (and seemingly some other users too) personally would like to make the location data rather persistent.

I've so far tried the following ways to retrieve the data:

Memcached way:

$ memcdump --servers=localhost
# => it shows only two keys (while I expected a dumped data of the historical location data)

API way:

curl 'https://hauk.mysite.com/api/fetch.php?id=ABCD-1234&since=1697813273.711'
# => it can get the locations, but at most 7 or so array of data (not the all historical data)

PHP way:

$file = fopen("location.txt", "a");
    fwrite($file, json_encode([$lat, $lon, $time, $provider, $accuracy, $speed]));
    fclose($file);
# => it seems this causes an error that leads to show "session expired" on the shared urls

For now, I'm using the chrome + mitmproxy way (it uses mitmproxy as a man in the middle proxy whereby it logs the /fetch.php api responses onto a file through a python script), but this method is 1. a little lengthy and complicated 2. solely sharing is not enough but accessing the shared url on the chrome instance is necessary, so any server-side way solution would be nicer for me. I also expect to know some apis or hooks for this kind of needs if there's any. But anyways a patching idea suffice my needs if modifying the source code is the only way. Thanks for your help.

licaon-kter commented 11 months ago

Related: https://github.com/bilde2910/Hauk/issues/174

I didn't find a way to actually survive a server restart :(

MarkToon commented 11 months ago

Couldn't agree more that a more permanent solution would be preferable.

Until then, it's services I'd rather not provide my data too sadly.

TheCataliasTNT2k commented 10 months ago

Related: #174

I didn't find a way to actually survive a server restart :(

Well that is the idea.

Use an external redis, make it permanent, boom, done.

I am thinking about creating a rust fork, and adding a few more features, like this one, adding external data providers in the app (like the ICE Portal here in Germany) and so forth. Sadly, I can not update the app, only @bilde2910 can do this, so I do not think this is going to happen, the repo seems very inactive at the moment. I tried to create a website instead of an app, but the problem is, that Android's power saving stuff makes this idea impossible it seems.

licaon-kter commented 10 months ago

@TheCataliasTNT2k

Use an external redis, make it permanent, boom, done.

And when you restart that one?

TheCataliasTNT2k commented 10 months ago

@TheCataliasTNT2k

Use an external redis, make it permanent, boom, done.

And when you restart that one?

You can configure redis in a way, that redis saves its data to disk, if you really want to.