Proxy Server

wget https://github.com/z3APA3A/3proxy/archive/0.8.12.tar.gz
tar xvf 0.8.12.tar.gz
cd 3proxy-0.8.12/
cp Makefile.Linux Makefile
make
make install

Linux Webcam Streamer

Install utilities

apt-get install v4l-utils

Show which formats are available on the camera

v4l2-ctl --list-formats
ioctl: VIDIOC_ENUM_FMT
        Index       : 0
        Type        : Video Capture
        Pixel Format: 'YUYV'
        Name        : YUYV 4:2:2

        Index       : 1
        Type        : Video Capture
        Pixel Format: 'H264' (compressed)
        Name        : H.264

        Index       : 2
        Type        : Video Capture
        Pixel Format: 'MJPG' (compressed)
        Name        : Motion-JPEG

Serve the MJPG video format over TCP

cvlc --no-audio v4l2:///dev/video0 --v4l2-chroma MJPG  --sout '#standard{access=http,mux=mpjpeg,dst=:8080/}' -I dummy

To run while a root user (ie, within rc.local or using kali)

runuser -l pi -c '/home/pi/streammjpeg'