Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

121
Views
Reverse proxy to remove digest authentication

I'm already looking for days for a solution but I'm not able to find something. I have a few IP camera's (Dahua) which don't have an option for unauthorized, public so to say, viewing. I'm now looking for a proxy server which can do the following:

  1. Connect to the IP camera stream (MJPEG)
  2. If the camera returns a 401 the proxy must login with a saved username and password
  3. Transmit the IP camera stream

I can accomplish this with nginx by adding the Authorization header but, and this is the difficult part, only when the camera uses Basic authentication.

Some models however only support Digest authentication which is not static.

Can someone point me to some software or nginx/apache plugin which can do this? I'm looking for something like this https://github.com/jantman/python-amcrest-noauth-proxy but written in C so that I can run it on OpenWRT embedded device.

Kind regards, Daan

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

I used fcgiwrap with curl to do this.

nginx.conf:

server {
    listen 8080;
    root /usr/share/nginx/html;

    location /tmp/ {
        internal;
        alias /tmp/;
    }

    location / {
        include fastcgi_params;
        fastcgi_pass unix:/var/run/fcgiwrap.socket;
    }
}

screenshot.cgi:

#!/bin/bash

TMPF=$(mktemp /tmp/screenshot_XXXXXXX.jpg)

curl -sL --digest --output $TMPF http://guest:guest@10.100.0.95/cgi-bin/snapshot.cgi?1

echo -e "X-Accel-Redirect: $TMPF"
echo -e ""
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!