Squid Proxy with basic username and password authentication.

The basic squid config /etc/squid3/squid.conf instead of the default config file.

auth_param basic program /usr/lib/squid3/basic_ncsa_auth /etc/squid3/passwords
auth_param basic realm proxy
acl authenticated proxy_auth REQUIRED
http_access allow authenticated
http_port 3128

Setting up a user:

sudo htpasswd -c /etc/squid3/passwords username

and then restart the squid3 by

/etc/init.d/squid3 or systemctl restart squid3.service

Motion and reverse proxy mode.

Apache HTTP Server can be configured in both a forward and reverse proxy (also known as gateway) mode. An ordinary forward proxy is an intermediate server that sits between the client and the origin server. In order to get content from the origin server, the client sends a request to the proxy naming the origin server as the target and the proxy then requests the content from the origin server and returns it to the client. The client must be specially configured to use the forward proxy to access other sites. Reverse Proxy example:

ProxyPass "/foo" "http://foo.example.com/bar"
ProxyPassReverse "/foo" "http://foo.example.com/bar"

ProxyPass /camera
ProxyPassReverse /camera

Continue reading “Motion and reverse proxy mode.”