vladpen / cams

Android mobile app
MIT License
129 stars 19 forks source link

Digest Access Authentication #66

Open Quantum-Future opened 1 year ago

Quantum-Future commented 1 year ago

Hi, I tried your application and I think it's great !

However, I found an issue with one camera: the app tries to connect for a very long time, but nothing happens and no error is shown (it seems the app waits forever with no time-out). I discovered the problem is because the cam uses digest access authentication, and I guess the app does not support it. Is it possible to add support for digest authentication? Thank you.

vladpen commented 1 year ago

Hi!

The app supports digest authentication. Can you try connection to you camera via VLC app to check it? (Possible the reason is unsupported TCP/UDP mode or something else.)

Quantum-Future commented 1 year ago

I tried with with VLC Android app and can't connect.

I also tried with the latests Windows version of VLC (Ver 3.0.18 win32) on a desktop PC, with the same result: can't connect. It asks for user & password on a dialog box, but when I press OK, the connection can't be established and the dialog box appears again asking for the user credentials. The dialog box appears whether you put the credentials embedded in the URI or not (it's indistinct).

I copy here some lines of the log: main warning: Password in a URI is DEPRECATED live555 error: Failed to connect with rtsp://192.168.0.50:80/live/0/h264.sdp satip error: Failed to setup RTSP session access_realrtsp warning: Cseq mismatch, got 1, assumed 0 access_realrtsp warning: only real/helix rtsp servers supported for now

I guess you're right with some unsupported mode. I was checking wikipedia (https://en.wikipedia.org/wiki/Digest_access_authentication), and mentions that the original standard was RFC 2069, but later revised and upgraded in RFC 2617. "Many of the security options in RFC 2617 are optional. If quality-of-protection (qop) is not specified by the server, the client will operate in a security-reduced legacy RFC 2069 mode" I don't know wich version of the protocol (RFC) is supported by the cam and VLC, but maybe there is a mistmatch and they're not understanding.

vladpen commented 1 year ago

Well, I hope next libVLC stable version 4.X will decide this issue.

Quantum-Future commented 3 months ago

I upgraded to Ver 2.3 and this problem persists. Which version of libVLC are you using now?

vladpen commented 3 months ago

The stable 4х version is still not released. I'll update the libVLC as soon as possible after release.