In Linux we trust!

curl proxy checkups using tinyproxy

Let's start from installing tinyproxy to a Debian-like server:

# apt-get install tinyproxy

I setup default config (/etc/tinyproxy/tinyproxy.conf):

User tinyproxy
Group tinyproxy
Port 8888
Timeout 600
DefaultErrorFile "/usr/share/tinyproxy/default.html"
StatFile "/usr/share/tinyproxy/stats.html"
Logfile "/var/log/tinyproxy/tinyproxy.log"
LogLevel Info
PidFile "/var/log/tinyproxy/tinyproxy.pid"
MaxClients 100
MinSpareServers 5
MaxSpareServers 20
StartServers 10
MaxRequestsPerChild 0
Allow 127.0.0.1
Allow 1.2.3.4/8
ConnectPort 443
ConnectPort 563
ConnectPort 80

Pay attention to Allow directive. It's IP address you are connecting to proxy from. You can use Debian way of starting / stopping:

# /etc/init.d/tinyproxy restart

In case of errors or you have not corresponding init.d script, launch proxy manually:

# tinyproxy

curl:

Test HTTP proxy:

# curl --proxy 'http://10.20.30.40:8888' 'http://api.ipify.org'
10.20.30.40

Test HTTPS proxy:

# curl --proxy 'https://10.20.30.40:8888' 'https://api.ipify.org'
10.20.30.40

HTTPS is proxied via CONNECT method, if you want you can use CONNECT also for HTTP add --proxytunnel argument. In this case you tunnel your request, double check tinyproxy configuration - ConnectPort 80 should exist.

Good luck!