Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

retrieves the storage data in any way? #203

Open
yuis-ice opened this issue Oct 21, 2023 · 5 comments
Open

retrieves the storage data in any way? #203

yuis-ice opened this issue Oct 21, 2023 · 5 comments

Comments

@yuis-ice
Copy link

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
Copy link
Contributor

Related: #174

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

@MarkToon
Copy link

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
Copy link

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
Copy link
Contributor

@TheCataliasTNT2k

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

And when you restart that one?

@TheCataliasTNT2k
Copy link

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants