Using Squid as Substitute for MTN SimpleServer

Been using the Pythonic SimpleServer which is cool, but I’ve got some issues with it; it tries to use up any available resource and sometimes have issues in sending cookie headers the right way. I’ve been using Squid some time ago but never thought of it serving this function, now i have tested and it works. Now do same! 🙂

  • Install Squid from your repo
    $ sudo apt-get install squid3


    $ sudo apt-get install squid

    If squid3 is not available in your repo

  • Change into this directory /etc/squid3 and edit squid.conf, look for
    http_access deny all

    Change to

    http_access allow all

    Goto the last line of the config file and paste these

    cache_peer parent 8080 0 no-query no-digest
    never_direct allow all
    dns_v4_first on
    request_header_add Host

    cache_peer: This tells Squid to use a proxy to process a request, which we are using as proxy server here
    never_direct allow all: This sets Squid never to fallback to direct connection when proxy fails
    dns_v4_first: By default Squid first go for IPv6 which not everyone has, so this enforces it to first check for IPv4
    request_header_add: This option adds a custom header to the request Squid is sending to the proxy

  • Save the file, restart squid service
    $ sudo systemctl restart squid3


    $ sudo service squid3 restart

    now set your proxy host and port to

Have fun! 🙂