2019-06-01 15:00:50 -04:00
2019-06-01 15:00:50 -04:00
2019-05-29 22:49:51 -04:00
2019-05-28 09:59:39 -04:00
2019-06-01 15:00:50 -04:00
2019-05-30 12:40:27 -04:00
2019-06-01 15:00:50 -04:00
2019-05-28 09:59:39 -04:00
2019-06-01 15:00:50 -04:00
2019-06-01 15:00:50 -04:00
2019-06-01 15:00:50 -04:00
2019-05-29 22:49:51 -04:00

Architeuthis 🦑

CodeFactor GitHub Build Status

NOTE: this is very WIP

HTTP(S) proxy with integrated load-balancing, rate-limiting and error handling. Built for automated web scraping.

  • Strictly obeys configured rate-limiting for each IP & Host
  • Seamless exponential backoff retries on timeout or error HTTP codes
  • Requires no additional configuration for integration into existing programs

Typical use case

user_case

Usage

wget https://simon987.net/data/architeuthis/11_architeuthis.tar.gz
tar -xzf 11_architeuthis.tar.gz

vim config.json # Configure settings here
./architeuthis

Hot config reload

# Note: this will reset current rate limiters, if there are many active
# connections, this might cause a small request spike and go over
# the rate limits.
./reload.sh

Sample configuration

{
  "addr": "localhost:5050",
  "timeout": "15s",
  "wait": "4s",
  "multiplier": 2.5,
  "retries": 3,
  "proxies": [
    {
      "name": "squid_P0",
      "url": "http://user:pass@p0.exemple.com:8080"
    },
    {
      "name": "privoxy_P1",
      "url": "http://p1.exemple.com:8080"
    }
  ],
  "hosts": [
    {
      "host": "*",
      "every": "500ms",
      "burst": 25,
      "headers": {
        "User-Agent": "Some user agent",
        "X-Test": "Will be overwritten"
      }
    },
    {
      "host": "*.reddit.com",
      "every": "2s",
      "burst": 2,
      "headers": {
        "X-Test": "Will overwrite default"
      }
    }
  ]
}
Description
Languages
Go 89.6%
Python 4.2%
HTML 3.2%
Dockerfile 2.8%
Shell 0.2%