Skip to main content

TREVORproxy wrapper that integrates with aws fargate based proxy cluster

Project description

TREVORproxy_serverless


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

trevorproxy_serverless puts a proxy-intent message in an sqs queue which causes the proxy cluster to scale up if it is not already up.

when stopped trevorproxy_serverless deletes the proxy-intent message to signal that it does not need the proxies anymore.

the sqs queue has a message retention limit which acts as a hard timeout to prevent proxies from running too long.

the message retention & 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.1.tar.gz (2.8 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.1-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for trevorproxy_serverless-0.0.1.tar.gz
Algorithm Hash digest
SHA256 5ecc60139aea42fc2bb44e9312ed894a4d1ef34ed6958ad2f9b2ae79d4afd318
MD5 61f5ea237ba5a3f0ef7aeafd0dbd0dd2
BLAKE2b-256 adbd442c9f4e48150c866bef996c1896ecd403715b88819708b0268c521cd0ae

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for trevorproxy_serverless-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c1597396f785e0c6a1f80960cdf75dd8ea90306f85e730f94cd3e6bb7dae0f8d
MD5 286829b9539cef5802ab3fc292d27f04
BLAKE2b-256 2223d3780b00b325a58e1a43a05d2c9e3da11ccfc1560fb6a156097e68ba4f84

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