Git Product home page Git Product logo

hauk's People

Contributors

arajooj avatar ayyilmaz avatar bilde2910 avatar brookedot avatar brujerizmo90 avatar bwisn avatar code-surfer avatar crstian19 avatar hello71 avatar hurradiegams avatar kaelonr avatar krystiancha avatar lemmerk avatar licaon-kter avatar marmo avatar maximbaz avatar natrius avatar nickbouwhuis avatar osoitz avatar otbutz avatar rixvet avatar ruralyak avatar sanvit avatar sdstolworthy avatar thifranc avatar tuffnerdstuff avatar vieler avatar weblate avatar xordiet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hauk's Issues

Mind sharing your nginx conf ?

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

issue with Android power saving modes

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.

Shared position constantly visible

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.

Clean up intall instructions

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.

GPS lock already active?

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

Show how much time is left (app and browser)

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.

Rename config.php to config-sample.php

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.

Check for document.getElementById in main.js

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.

Unable to load Hauk page on domain [tech support]

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.

Feature request: optionally show position of 'viewers' on map

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?

Remove the password-warning

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

Support SASL user auth with memcached

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.

Feature request: display update lag, time since last location info update received

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.

Some enhancements that came up in my mind

I make a tour of the town with Hauk and some enhancements came up to my mind :

  • My phone kill the app to save the batterie, on the map its not showing that i'm not connected anymore it would be nice to have a timeout on the server side
  • When i'm not moving the arrow start doing some 360° freestyle, maybe you can attach it to the gyroscope of the phone ?
  • Is there any satellite maps except the one of google ? so we can choose on the live maps which one we want
    And for the last its maybe a little overkill
  • Can you add a list of public server that the phone can ping to see if they are up so any users can share their position without setup a server ? I would love to share mine !
    Thanks for your work and your fast support 😄

Getting 404 error for dynamic.js.php when trying to log in from App

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,

Docker container does not react on SIGTERM properly

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.

Feature request: indicate absence of data in a meaninful way

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

Unable to use own CA

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?

Connection error with User CA

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!

GNSS fix

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.

Password hash does not match same passed password

Hello, I experience problems with password. Android application gives "Incorrect password!" when non-default hash set for password.

Steps:

  1. With given password A4snLPxcNXaF6mnadoXTk3A2g calculate hash in the command line:
    openssl passwd -1
    Password:
    Verifying - Password:
    $1$mCrxMzkA$dKucnONZ3EQjio3WkEAQ10

  2. Replace hash value in config.php:
    "password_hash" => '$1$mCrxMzkA$dKucnONZ3EQjio3WkEAQ10',

  3. Restart docker container.

  4. Enter A4snLPxcNXaF6mnadoXTk3A2g in android application, press [START SHARING]
    ER: No error message
    AR: Incorrect password! messagebox appears

Blank page on connection

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:

Screenshot_20190829_184040_info varden hauk

Feature request: Add broadcast intents

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.

Install-script not working completely

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

Add ability to view miltiple devices on a single shared link

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?

Feature request: Add quick choice for timeouts(1h, 1d etc)

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.

Feature request: multiple sessions

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.

Server error: java.nio.charset.CharsetICU[UTF-8] on android app

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.

Use Matrix as transport for position updates

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:

  1. Login to Matrix
  2. Choose rooms which to publish location
  3. Send (and receive) m.location messages.

This way you don't need a specific server for Hauk. You can use any Matrix server (including self-hosted) and existing accounts.

map centering improvement

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.

Feature request: User accounts instead of one server password

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:

  • Better security: no need to change the server's password if a user leaks the password or if the permission for a user to use the server is revoked
  • Better compatibility: user accounts could be connected to other services (e.g. prosody in my case) with a single password per user for all services

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!

Sharing link uses example.com

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.

Save password

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)

Android: share link with clipboard option

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.

Only load tiles on valid share URL

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.