bilde2910 / hauk Goto Github PK
View Code? Open in Web Editor NEWOpen-source realtime location sharing
License: Apache License 2.0
Open-source realtime location sharing
License: Apache License 2.0
Hi I can't make it work nginx return a 405 error and if I add this
error_page 405 =200 $uri;
I took it from here
It simply send as a static file obviously and the hauk app show me the content of the create.php file
on my Xiaomi Phone, some power saving modes are enabled by default. As a consequence the Hauk-App is terminated after some time if running in background. To solve this, at least a hint to disable power saving mode for the app would be useful...
Additionally restarting the app does not reconnect to the previous session. In other words, the Hauk-App is not aware of another share already running and control over the share is lost.
A user shared his position and told me he was not able to end it manually in the app directly. He told me he could find options in the dropdown menu to end sharing, that was yesterday.
Unfortunately the last position is still visible via the link with the last known speed.
Is there a way to read what server version is right now "installed" and if i should have upgraded it? I will try to reproduce it myself and will give more info.
If you tell me where i can send you the link and what more information do you need, i will get you as much information as possible.
...in all launchers except those based on the Google Pixel one.
Eg. For these https://search.f-droid.org/?q=launcher&page=1&lang=en only Rootless Pixel Launcher and Lawnchair have it full size, all the others (KISS, BlissLauncher, Essential Launcher, Simple App Launcher, etc) show it at 25% or thereabout
In addition to memcached, how about a redis backend?
Hello,
do you plan an ios version for the app? Got this asked today :)
Greetings
Hi there,
I just upgraded to 1.1 and really like that frontend
and backend-php
are now separated out since I customized my frontend UI a bit. However, this is a bit unclear in the README.MD
Copy everything in the "backend-php" and "frontend" folders in this repository to somewhere in your web root.
Previously I pointed the web root to /html/backend
and everything worked. Since both frontend
and backend-php
are required it seems no longer possible to point to a single folder. I ended up copying everything in backend-php
and frontend
to /app
then pointing my webroot to this folder. Everything is now working as expected. Is this the intended method?
I'm happy to submit a PR for documentation improvements once I know how this is suppose to work.
Perhaps another method would be to have a main index.php
file that includes the required files, much like an auto-loader? Help figuring out how this is suppose to work would be great.
Hello,
Android client does not continue to share location when phone rebooted. Is it possible to store client state and restore it upon reboot?
Thank you.
Make it possible to see if the GPS lock is there or not. Because, when the lock is there, i can lock my phone and put it back in my pocket and not worry about it anymore.
I have gotten some people who got quite interested in the feature. I will set it up today evening i hope and i will have some users i guess :D
There is right now a notification when the location-sharing-time expires, but add a Timer on how much minutes are left, for example. No need to be over-detailed (seconds) in my opinion, but sometimes useful.
In the app itself so i can see how much time is left and/or on the map for the viewer.
As the includes/config.php
needs to be modified for each install should this file be renamed to something like config-sample.php
? This would allow Hauk to check if config.php
is found before trying to load and gracefully fail. It has the added advantage of making upgrades easier preventing the config file from being overwritten by a new version.
I use a slightly modified index.html
page which includes my custom CSS styles and text changes. With the most recent update I ran into an issue with the index
template where #url
was undefined causing a fatal JavaScript error.
I tracked this down to document.getElementById("url").textContent = url;
in main.js
https://github.com/bilde2910/Hauk/blob/master/frontend/main.js#L215
To keep things simple and to not make changes to main.js
I just set the color of the URL
div to match the background color which works. I think I could also use visibility:hidden
instead
Overall, I do like the new changes providing more information but wondering if we should wrap some of the getElementById
statements in a if type !== undefined)
checks. If so, which ones?
The main one the effects the layout I've found is #URL
so that's why I'm specifically mentioning that one.
Apologies if this isn't the right place to ask, but I'm not sure if you have a support contact anywhere.
I'm currently trying to setup hauk on my domain and running into an issue whenever I visit the page. The page is completely blank, and the console displays the following errors.
I installed hauk using the install script with /var/www/find
as my webroot. The files seem to be there. Here is my nginx configuration.
Please let me know if there's a better place to ask this question or if more info is needed. Thank you.
First of all thanks for sharing this great project!
From the 'viewer' point of view it would be nice to see not only the shared location but the own position (if available) as well.
Another idea: is it much work to integrate this into nextcloud as an app?
Or at least change the wording, because that is not a password the user with the app is going to choose, the server-admin chooses it. So it is completely his responsibility, not the one of my friend because he can not do anything about it :D
Would be cool to set unix:/run/memcached/socket
instead of 127.0.0.1:port
Howdy,
I use memcached
with Simple Authentication and Security Layer (SASL) meaning to connect to the sever a user and password must be passed to the memcache options. I have done this in my local install by modifying the memcached
wrapper with the required options, ie:
function __construct($host, $port) {
$this->memcache = new Memcached();
$this->memcache->setOption( Memcached::OPT_BINARY_PROTOCOL, true );
$this->memcache->setSaslAuthData( “USER”, “PASSWORD” );
$this->memcache->addServer(CONFIG["memcached_host"], CONFIG["memcached_port"])
or die ("Server could not connect to memcached!\n");
}
What I'm hoping is to find a way to have this supported via the config.php file. May be able to do something like addin memcached_binary_protocol
andmemcached_setSaslAuthData
to the options then check for them conditionally. I'm just not sure if this is helpful for others or if a more generic way of adding additional options would be better.
Interested to hear your thoughts on this.
Hello,
When connection or client is not stable it is hard to evaluate whether client stays still or just can not reach server. Is it possible to add technical info that will indicate ping or time since last location info updated? Location arrow might become semi-transparent or change its color when data has not been updated for a long time.(e.g. 3-5 times longer than update interval)
Thank you.
I make a tour of the town with Hauk and some enhancements came up to my mind :
Thanks for fixing #45!
I'm afraid I now have another error.
It complains of a 404 when trying to log in.
Looking at my server logs, my client is trying to load dynamic.js.php from the /frontend/ directory.
In /frontend/index.html, it references "./dynamic.js.php", but this file is in the /backend-php/ directory.
Should I copy/move the file, or change index.html?
Thanks,
Hello there,
Current implementation stuck on stop/kill command and does not pass sigterm signal to running instances of memcache and apache. This results in termination on timeout after 10 seconds. Proper reaction would be passing sigterm to downstream processes:
stop_apache()
{
kill $(cat $apache_pidfile)
rm -f $apache_pidfile
}
trap stop_apache INT TERM
apache &
echo $! > $apache_pidfile
wait $apache_pidfile
trap - TERM INT
wait $apache_pidfile
# run server
CMD ["/bin/bash", "start.sh"]
This should result in much more quicker turnover of docker container.
Thank you.
Hello, currently if android client waits for gnss fix no data provided to backend and shared location page appears empty. This confuses user. Could you please add some message (e.g."Waiting for location data") on the web page to indicate such state?
Thank you
I saw that support has been added for user CAs in version 1.1.1 (issue #26) but I'm not able to make use of it. Maybe it's my fault but this is my situation:
I created my own root CA, copied it to my phone and installed it. Before I installed it, I got this error: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found
. After I added my CA I got this: Hostname 192.168.xxx.xxx not verified: certificate: sha1/xxxxxxxxxx DN: CN=192.168.xxx.xxx,O=None ...
So he doesn't trust it completely. Did I missed something? Is it the certificate which is wrong or something? Can I only use certificates on domains or is it possible to also use IP-addresses?
Hello,
On the android client I get a Connection error: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
The endpoint I try to connect is configured on https with a certificate singed by my own CA.
The CA is installed and trusted on my android 9 phone and is available under Settings > ... > Trusted credentials > User and other apps that connect to similar endpoints work.
I've checked a bit the android documentation and it seems since Android 7 behavior for user trusted CA changed a bit.
https://android-developers.googleblog.com/2016/07/changes-to-trusted-certificate.html
Apps now have to specify in the manifest file if they trust user CAs...
https://developer.android.com/training/articles/security-config
https://developer.android.com/training/articles/security-config#certificates
I could try to make a change and pull request if you want to make this change ;).
Thanks!
My server URL is https://hauk.domain.com/hauk/ .
All works well to update the server. But the "Share tracking link" button in the Android app chops off the /hauk/ directory to
https://hauk.domain.com/?XXX123-YYY456
manually changing the URL in the browser to
https://hauk.domain.com/hauk/?XXX123-YYY456
works fine .
I am using app version 1.0.1
i've been using hauk since version 1.0 and the GNSS fix worked until version 1.1 for me. the more recent versions (1.1.1 and 1.2) hauk doesn't seem to access the location anymore on my device.
the location icon in the status bar at the top doesn't appear any more. as soon as i open a different app that requires the location (such as osmand or gpstest), the icon appears and all apps apart from hauk get a location fix.
one thing i noticed was, is that when i reinstall the app, the more recent versions don't request permission from the 'privacy guard', whereas the previous versions did.
Please set up german for translating :)
Greetings
Hello, I experience problems with password. Android application gives "Incorrect password!" when non-default hash set for password.
Steps:
With given password A4snLPxcNXaF6mnadoXTk3A2g calculate hash in the command line:
openssl passwd -1
Password:
Verifying - Password:
$1$mCrxMzkA$dKucnONZ3EQjio3WkEAQ10
Replace hash value in config.php:
"password_hash" => '$1$mCrxMzkA$dKucnONZ3EQjio3WkEAQ10',
Restart docker container.
Enter A4snLPxcNXaF6mnadoXTk3A2g in android application, press [START SHARING]
ER: No error message
AR: Incorrect password! messagebox appears
To minimize exposed surface I wanted to block default hauk url that does not have any reference to a particular endpoint document.
Like https://apps.varden.info/demo/hauk/ is blocked
but https://apps.varden.info/demo/hauk/?2HFB-4KOS allowed
Is that good idea?
Added translation for Web frontend and Android client so far
Hello!
I'm trying to run Hauk with your docker image but I always end up on a blank page and when I try to start sharing my location with my phone I get an an error. Here are my logs:
docker logs -f hauk
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.18.0.20. Set the 'ServerName' directive globally to suppress this message
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.18.0.20. Set the 'ServerName' directive globally to suppress this message
[Thu Aug 29 16:37:41.131733 2019] [mpm_prefork:notice] [pid 14] AH00163: Apache/2.4.38 (Debian) PHP/7.3.8 configured -- resuming normal operations
[Thu Aug 29 16:37:41.131782 2019] [core:notice] [pid 14] AH00094: Command line: '/usr/sbin/apache2 -D FOREGROUND'
172.18.0.19 - - [29/Aug/2019:16:37:47 +0000] "GET / HTTP/1.1" 200 1378 "-" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0"
172.18.0.19 - - [29/Aug/2019:16:37:47 +0000] "GET /style.css HTTP/1.1" 200 1446 "https://my.super.address/" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0"
172.18.0.19 - - [29/Aug/2019:16:37:47 +0000] "GET /main.js HTTP/1.1" 200 3064 "https://my.super.address/" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0"
172.18.0.19 - - [29/Aug/2019:16:37:47 +0000] "GET /dynamic.js.php HTTP/1.1" 200 679 "https://my.super.address/" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0"
172.18.0.19 - - [29/Aug/2019:16:37:47 +0000] "GET /assets/logo.svg HTTP/1.1" 304 126 "https://my.super.address/" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0"
I used your config.php
just changed password (and it seems to work as if I put the wrong password in the mobile app I get a proper error) and the public url to match mine.
Here is a mobile screenshot:
Would be great if we could use broadcast intents to start/stop sharing and launch the share link action. This way it can be easily automated with an app like (but not limited to) Tasker. Maybe an extra single intent could be added to start sharing and share tracking link if succeeded. The extra "connection established" confirmation dialog could be suppressed in that case.
When trying to install it over an old installation
user@server:~/hauk/Hauk$ sudo ./install.sh -c /var/www/hauk/
./install.sh: 31: [: /var/www/hauk/: unexpected operator
./install.sh: 31: [: /var/www/hauk/: unexpected operator
WARNING! Target directory is not empty. If you proceed with the
installation, all files in the directory will be deleted.
./install.sh: 100: read: Illegal option -e
./install.sh: 101: ./install.sh: [[: not found
Aborting...
after moving the folder and reinstalling the followind appears
user@server:~/hauk/Hauk$ sudo ./install.sh -c /var/www/hauk/
./install.sh: 31: [: /var/www/hauk/: unexpected operator
./install.sh: 31: [: /var/www/hauk/: unexpected operator
./install.sh: 77: read: Illegal option -e
./install.sh: 78: ./install.sh: [[: not found
-e Installation complete!
Before you use Hauk, make sure to change Hauk's configuration.
The configuration file can be found at:
/etc/hauk/config.php
Best regards
Hi,
Thanks for a neat application! I really like the idea and the execution is nice and easy to work with.
I think it would help a lot if the server will support some sort of multi-device sharing, for scenarios where several people coordinate to meet somewhere.
Not sure how this would be implemented UX-wise though. Maybe add a functionality on the shared link to "add my own location" or alike?
What do you think?
Hello,
Since ttl for session is defined in minutes it is not convenient to calculate values every time. Is it possible to add predefined time buttons that will populate 1h, 3h, 1d timeouts?
Additionally it would be nice to have an ability to quickly specify maximum possible ttl.
Thank you.
after manual installation of memcached server , when i tried to access hauk page on my apache server , it displayed location expired page.
Hello,
I would like to propose to discuss a possibility of having multiple running sharing sessions with ability to add, stop/start and kill them.
user story behind that is simple: sometimes you want to share your location for a longer period of time (e.g for family) but same time want to share location to acquaintances for a short time.
Thanx.
I have followed the manual install instructions, and I get the error on my Fairphone 2, running Android 6.0.1.
Do you know what I need to check?
I can't see any errors in my Apache access or error logs, which makes me feel it's not even trying to connect to my server URL.
You could consider using Matrix (https://matrix.org/) as transport for position data. I've been planning to do app like this for some time.
Matrix can share arbitrary json data and there is SDK for Android that can be used for the hard stuff.
It has already location message specified, but no client AFAIK uses it yet: https://matrix.org/docs/spec/client_server/latest#m-location
Things needed for minimal viable product:
This way you don't need a specific server for Hauk. You can use any Matrix server (including self-hosted) and existing accounts.
hi there, I might have an idea for an improvement.. as a viewer, it's annoying that the map always auto center on the target if you want to scroll around on the surroundings.. it would be nice if this feature could be turned on and off... if turned off a button for a manually centering would also be nice.
can you please add changelog.
what is CHANGELOG ?
Dear @bilde2910, please create Russian and Ukrainian translations for Hauk here https://traduki.varden.info/projects/hauk/#languages
As I would like to let several people use my server for location sharing, user accounts with separate password would come in handy. Consider the following advantages:
Off topic:
Thank you so much for the development of this app and server! I had virtually been trying every location sharing app on F-Droid, most of them didn't work, were bloated, or I couldn't manage to setup the server. I was about to write my own application when I finally found Hauk!
First off, thanks for creating this. I just stumbled over the app on F-Droid, and I love the simplicity of it. I only just did a quick test, and I noticed that sharing the tracking link results in
https://example.com/ABCD-1234
instead of my actual domain. The actual tracking works, though, I just need to replace example[.]com in the browser.
Most people will stick to one server, i guess. Make it at least optional to save the password with a checkbox or something like that.
Works like a charm btw. (non-docker installation)
Hello, I have the option to copy the video address in YouTube. (Share -> [Share Dialog appears] -> "Copy Link"). That would be an useful enhancement for the android app.
Currently when you load the app without a valid ID it loads leafly.js
and "tiles" from the map provider (in my case a single page load uses 32 tiles from Thunderforest). As many providers, such as Thunderforest bill per "tile" it would be ideal to not load any tiles unless a map is actually being displayed.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.