You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 1, 2025. It is now read-only.
The easiest way is to download a pre-built binary from the [GitHub Releases](https://github.com/dan-v/awslambdaproxy/releases) page.
31
+
2. Configure your Terrafom backend. Read more about Terraform backend [here](https://www.terraform.io/docs/backends/index.html).
32
+
33
+
3. Create and fill variable defenitions file ([read more here](https://www.terraform.io/docs/configuration/variables.html#variable-definitions-tfvars-files)) if you don't want to use default variables values.
34
+
35
+
4. Run those commands to init and apply configuration:
36
+
```sh
37
+
terraform init && terraform apply -auto-approve
38
+
```
39
+
40
+
It will create all dependent resources and run awslambdaproxy inside Docker container. EC2 instance SSH key can be found in AWS Secret Manager in your [AWS Management Console](https://console.aws.amazon.com/).
41
+
42
+
NOTE: Some AWS regions have a big list of IP CIDR blocks and they can overhead default limits of security group ([read more](https://docs.aws.amazon.com/vpc/latest/userguide/amazon-vpc-limits.html#vpc-limits-security-groups)). Need to make limit increase request through the AWS Support Center by choosing Create Case and then choosing Service Limit Increase to prevent deployment issues.
25
43
26
44
## Manual
27
45
28
-
1. Copy `awslambdaproxy` binary to a <b>publicly accessible</b> linux host (e.g. EC2 instance, VPS instance, etc). You will need to <b>open the following ports</b> on this host:
46
+
1. Download a pre-built binary from the [GitHub Releases](https://github.com/dan-v/awslambdaproxy/releases) page.
47
+
48
+
2. Copy `awslambdaproxy` binary to a <b>publicly accessible</b> linux host (e.g. EC2 instance, VPS instance, etc). You will need to <b>open the following ports</b> on this host:
29
49
* <b>Port 22</b> - functions executing in AWS Lambda will open SSH connections back to the host running `awslambdaproxy`, so this port needs to be open to the world. The SSH key used here is dynamically generated at startup and added to the running users authorized_keys file.
30
50
* <b>Port 8080</b> - the default configuration will start a HTTP/SOCKS proxy listener on this port with default user/password authentication. If you don't want to publicly expose the proxy server, one option is to setup your own VPN server (e.g. [dosxvpn](https://github.com/dan-v/dosxvpn) or [algo](https://github.com/trailofbits/algo)), connect to it, and just run awslambdaproxy with the proxy listener only on localhost (-l localhost:8080).
31
51
32
-
2. Optional, but I'd highly recommend taking a look at the Minimal IAM Policies section below. This will allow you to setup minimal permissions required to setup and run the project. Otherwise, if you don't care about security you can always use an access key with full administrator privileges.
52
+
3. Optional, but I'd highly recommend taking a look at the Minimal IAM Policies section below. This will allow you to setup minimal permissions required to setup and run the project. Otherwise, if you don't care about security you can always use an access key with full administrator privileges.
33
53
34
-
3.`awslambdaproxy` will need access to credentials for AWS in some form. This can be either through exporting environment variables (as shown below), shared credential file, or an IAM role if assigned to the instance you are running it on. See [this](https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html#specifying-credentials) for more details.
54
+
4.`awslambdaproxy` will need access to credentials for AWS in some form. This can be either through exporting environment variables (as shown below), shared credential file, or an IAM role if assigned to the instance you are running it on. See [this](https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html#specifying-credentials) for more details.
./awslambdaproxy run -r us-west-2,us-west-1,us-east-1,us-east-2
50
70
```
51
71
52
-
6. Configure your web browser (or OS) to use the HTTP/SOCKS5 proxy on the publicly accessible host running `awslambdaproxy` on port 8080.
53
-
54
-
## Examples
55
-
```
56
-
# execute proxy in four different regions with rotation happening every 60 seconds
57
-
./awslambdaproxy run -r us-west-2,us-west-1,us-east-1,us-east-2 -f 60s
58
-
59
-
# choose a different port and username/password for proxy and add another listener on localhost with no auth
60
-
./awslambdaproxy run -l "admin:admin@:8888,localhost:9090"
61
-
62
-
# bypass certain domains from using lambda proxy
63
-
./awslambdaproxy run -b "*.websocket.org,*.youtube.com"
64
-
65
-
# specify a dns server for the proxy server to use for dns lookups
66
-
./awslambdaproxy run -l "admin:awslambdaproxy@:8080?dns=1.1.1.1"
67
-
68
-
# increase function memory size for better network performance
69
-
./awslambdaproxy run -m 512
70
-
```
72
+
7. Configure your web browser (or OS) to use the HTTP/SOCKS5 proxy on the publicly accessible host running `awslambdaproxy` on port 8080.
71
73
72
74
## Minimal IAM Policies
73
75
* This assumes you have the AWS CLI setup with an admin user
@@ -102,25 +104,23 @@ aws iam create-access-key --user-name awslambdaproxy-run
102
104
}
103
105
```
104
106
105
-
## Terraform
106
-
107
-
1. Clone repository and go to Terraform component folder:
108
-
```sh
109
-
git clone git@github.com:dan-v/awslambdaproxy.git && cd awslambdaproxy/deployment/terraform
107
+
## Examples
110
108
```
109
+
# execute proxy in four different regions with rotation happening every 60 seconds
110
+
./awslambdaproxy run -r us-west-2,us-west-1,us-east-1,us-east-2 -f 60s
111
111
112
-
2. Configure your Terrafom backend. Read more about Terraform backend [here](https://www.terraform.io/docs/backends/index.html).
113
-
114
-
3. Create and fill variable defenitions file ([read more here](https://www.terraform.io/docs/configuration/variables.html#variable-definitions-tfvars-files)) if you don't want to use default variables values.
112
+
# choose a different port and username/password for proxy and add another listener on localhost with no auth
113
+
./awslambdaproxy run -l "admin:admin@:8888,localhost:9090"
115
114
116
-
4. Run those commands to init and apply configuration:
117
-
```sh
118
-
terraform init && terraform apply -auto-approve
119
-
```
115
+
# bypass certain domains from using lambda proxy
116
+
./awslambdaproxy run -b "*.websocket.org,*.youtube.com"
120
117
121
-
It will create all dependent resources and run awslambdaproxy inside Docker container. EC2 instance SSH key can be found in AWS Secret Manager in your [AWS Management Console](https://console.aws.amazon.com/).
118
+
# specify a dns server for the proxy server to use for dns lookups
119
+
./awslambdaproxy run -l "admin:awslambdaproxy@:8080?dns=1.1.1.1"
122
120
123
-
NOTE: Some AWS regions have a big list of IP CIDR blocks and they can overhead default limits of security group ([read more](https://docs.aws.amazon.com/vpc/latest/userguide/amazon-vpc-limits.html#vpc-limits-security-groups)). Need to make limit increase request through the AWS Support Center by choosing Create Case and then choosing Service Limit Increase to prevent deployment issues.
121
+
# increase function memory size for better network performance
122
+
./awslambdaproxy run -m 512
123
+
```
124
124
125
125
## FAQ
126
126
1. <b>Should I use awslambdaproxy?</b> That's up to you. Use at your own risk.
0 commit comments