Skip to main content

TREVORproxy wrapper that integrates with aws fargate based proxy cluster

Project description

TREVORproxy_serverless


Sets up an autoscaling cluster of SOCKS proxies to use along with TREVORproxy.

  • trevorproxy_serverless uses an SQS queue to control the autoscaling of the proxy cluster
  • as long as there is a proxy-intent message in the queue the cluster will stay up.
  • when running the cli it adds a message to the queue to signal it needs a running cluster of proxies
  • when the cli terminates gracefully it removes the message from the queue
  • if the cli is terminated non gracefully, the message will remain in the queue until the message retention period of the queue passes
  • while the cli is running it is using a sliding window approach to ensure the proxy intent message will not expire while the cli is running.

the proxy count can be adjusted trough terraform variables.


Dependencies for infra.sh

  • aws cli (configured with enough permissions)
  • terraform
  • docker
  • jq

trevorproxy_serverless Installation

$ pip install trevorproxy_serverless

Notes

Cost of one proxy instance running for an hour is 0,012$.

PS: Fargate bills per minute spent so if you spin up 100 servers for 30 minutes it will cost 0,012 * 100 / 2 = 0,60$

PS: Spin up time can take a few minutes because SQS pushes metrics to cloudwatch on an interval of 1 or 5 minues, the following aws regions support 1 minute metrics, so they are recommended: US East (Ohio), EU (Ireland), EU (Stockholm), Asia Pacific (Tokyo)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

trevorproxy_serverless-0.0.2.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

trevorproxy_serverless-0.0.2-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file trevorproxy_serverless-0.0.2.tar.gz.

File metadata

  • Download URL: trevorproxy_serverless-0.0.2.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for trevorproxy_serverless-0.0.2.tar.gz
Algorithm Hash digest
SHA256 3d2e89a79fbef9f68520fe568f7fecf9c28c252cb7e7ac9928189e26dadb02a5
MD5 ffb7165f0b6842ca50997aaed2df5107
BLAKE2b-256 f8d27e7e151e79f82b4cb0167263f57e3ea22f0ef8aaa42836b874429e2de04e

See more details on using hashes here.

File details

Details for the file trevorproxy_serverless-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for trevorproxy_serverless-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9d283d91d79210f822cbdac03106aaa794d0f16a203ea43b85e36e09c93e72eb
MD5 ba9dc375f2972386282afe50a53e1b4a
BLAKE2b-256 c650557239309f3cc642b144bcabd5de3865c9b7b8ab89a5ca7ff54159d5bfb0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page