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 Mar 6, 2022. It is now read-only.
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/).
25
41
26
-
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:
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.
43
+
44
+
## Manual
45
+
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:
27
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.
28
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).
29
51
30
-
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.
31
53
32
-
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
48
70
```
49
71
50
-
6. Configure your web browser (or OS) to use the HTTP/SOCKS5 proxy on the publicly accessible host running `awslambdaproxy` on port 8080.
51
-
52
-
## Examples
53
-
```
54
-
# execute proxy in four different regions with rotation happening every 60 seconds
55
-
./awslambdaproxy run -r us-west-2,us-west-1,us-east-1,us-east-2 -f 60s
56
-
57
-
# choose a different port and username/password for proxy and add another listener on localhost with no auth
58
-
./awslambdaproxy run -l "admin:admin@:8888,localhost:9090"
59
-
60
-
# bypass certain domains from using lambda proxy
61
-
./awslambdaproxy run -b "*.websocket.org,*.youtube.com"
62
-
63
-
# specify a dns server for the proxy server to use for dns lookups
64
-
./awslambdaproxy run -l "admin:awslambdaproxy@:8080?dns=1.1.1.1"
65
-
66
-
# increase function memory size for better network performance
67
-
./awslambdaproxy run -m 512
68
-
```
72
+
7. Configure your web browser (or OS) to use the HTTP/SOCKS5 proxy on the publicly accessible host running `awslambdaproxy` on port 8080.
69
73
70
74
## Minimal IAM Policies
71
75
* This assumes you have the AWS CLI setup with an admin user
@@ -100,6 +104,24 @@ aws iam create-access-key --user-name awslambdaproxy-run
100
104
}
101
105
```
102
106
107
+
## Examples
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
+
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"
114
+
115
+
# bypass certain domains from using lambda proxy
116
+
./awslambdaproxy run -b "*.websocket.org,*.youtube.com"
117
+
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"
120
+
121
+
# increase function memory size for better network performance
122
+
./awslambdaproxy run -m 512
123
+
```
124
+
103
125
## FAQ
104
126
1. <b>Should I use awslambdaproxy?</b> That's up to you. Use at your own risk.
105
127
2. <b>Why did you use AWS Lambda for this?</b> The primary reason for using AWS Lambda in this project is the vast pool of IP addresses available that automatically rotate.
0 commit comments