Scroll to top
© 2018 All Rights Reserved.
Share

How to Install Splash to use Tor/Privoxy in a Docker Cloud Stack


Dominik Sachsenhofer - 24. October 2017 - 1 comment

What is Splash?

Splash is a javascript rendering service. It’s a lightweight web browser with an HTTP API, implemented in Python 3 using Twisted and QT5. The (twisted) QT reactor is used to make the service fully asynchronous allowing to take advantage of webkit concurrency via QT main loop.

 

1. Setup

Directory Structure:

example
  - docker-stack.yml
  - splash
    - proxy-profiles
      - default.ini

 

1.1 Create file docker-stack.yml

version: '3'

services:
  torprivoxy:
    image: rdsubhas/tor-privoxy-alpine
    networks:
      - network1
    ports:
      - 8118:9050

  splash:
    image: scrapinghub/splash
    networks:
      - network1
    ports:
      - 5023:8050
    volumes:
      - ./splash/proxy-profiles:/etc/splash/proxy-profiles:ro

networks:
  network1:
  network2:

 

 1.2 Create directory /splash/proxy-profiles/ and create file /splash/proxy-profiles/default.ini

[proxy]
host=torprivoxy
port=8118

 

 1.3 Deploy stack

docker stack deploy --compose-file docker-stack.yml example

 

 1.4 Test

If everything is well configured, then Splash will render https://sachsenhofer.io using Tor/Privoxy as a proxy server.
curl 'http://localhost:5023/render.html?url=https://sachsenhofer.io/&timeout=20'

1 comment

  1. Mario

    Works great, thank you!

Post a Comment

Your email address will not be published. Required fields are marked *