Changelog
Amazon API Gateway
The mubeng proxy rotator also supports integration with Amazon API Gateway. This allows you to route traffic through multiple AWS regions for enhanced redundancy and geographic distribution.
Format for AWS proxy strings:
aws://AWS_ACCESS_KEY_ID:AWS_SECRET_ACCESS_KEY@REGION
Tip
Since it uses a custom parser, the AWS secret access key (or any other parts) can be quoted for better readability. Example: aws://AKIAIOSFODNN7EXAMPLE:"wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"@us-west-1
.
This quoting feature only works for the aws
protocol scheme.
To get started, you'll need to:
- Export your AWS credentials as environment variables
export AWS_ACCESS_KEY_ID="AKIAIOSFODNN7EXAMPLE"
export AWS_SECRET_ACCESS_KEY="wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
- Create a proxy list file containing AWS regions
Generate proxy entries for multiple AWS regions:
echo "aws://{{AWS_ACCESS_KEY_ID}}:{{AWS_SECRET_ACCESS_KEY}}@"{us,eu}"-"{east,west}"-"{1,2} | tr ' ' '\n' > list.txt
This will create entries for regions like:
aws://{{AWS_ACCESS_KEY_ID}}:{{AWS_SECRET_ACCESS_KEY}}@us-east-1
aws://{{AWS_ACCESS_KEY_ID}}:{{AWS_SECRET_ACCESS_KEY}}@us-east-2
aws://{{AWS_ACCESS_KEY_ID}}:{{AWS_SECRET_ACCESS_KEY}}@us-west-1
- ...
- Start mubeng proxy server pointing to your AWS proxy list:
$ mubeng -f list.txt -a :8080
This setup enables mubeng to automatically rotate traffic through multiple AWS regions via API Gateway. When running the proxy server, mubeng will dynamically substitute your AWS credentials from environment variables using the templating feature described above.
Note
Ensure your AWS credentials have the appropriate permissions to access API Gateway in the specified regions.