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.
*[ ] I am running the [latest version](https://github.com/dan-v/awslambdaproxy/releases) of awslambdaproxy
10
+
*[ ] I am have read the [README](https://github.com/dan-v/awslambdaproxy#usage) instructions and the [FAQ](https://github.com/dan-v/awslambdaproxy#faq)
11
+
12
+
### Description
13
+
14
+
[Description of the issue]
15
+
16
+
### Steps to Reproduce
17
+
18
+
1.[First Step]
19
+
2.[Second Step]
20
+
3.[and so on...]
21
+
22
+
**Expected behavior:**[What you expected to happen]
23
+
24
+
**Actual behavior:**[What actually happened]
25
+
26
+
### Environment
27
+
* If you are using CLI, get the version and specify the full command you are using.
28
+
```
29
+
./awslambdaproxy version
30
+
awslambdaproxy version 0.0.12
31
+
./awslambdaproxy -r us-west-2,us-west-1 -f 60
32
+
```
33
+
* If you are using Docker, get the version and specify the full command you are using.
34
+
```
35
+
docker run -it --rm --entrypoint /app/awslambdaproxy vdan/awslambdaproxy -v
36
+
awslambdaproxy version 0.0.12
37
+
docker run -d vdan/awslambdaproxy -r us-west-2,us-west-1 -f 60
Copy file name to clipboardExpand all lines: README.md
+34-17Lines changed: 34 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -1,22 +1,21 @@
1
1
<b>awslambdaproxy</b> is an [AWS Lambda](https://aws.amazon.com/lambda/) powered HTTP/SOCKS web proxy. It provides a constantly rotating IP address for your network traffic from all regions where AWS Lambda is available. The goal is to obfuscate your traffic and make it harder to track you as a user.
2
2
3
-

3
+

4
4
5
5
## Features
6
6
* HTTP/HTTPS/SOCKS5 proxy protocols support (including authentication).
7
-
* No special software required. Just configure your system to use a proxy.
8
-
* Each AWS Lambda region provides 1 outgoing IP address that gets rotated roughly every 4 hours. That means if you use 10 AWS regions, you'll get 60 unique IPs per day.
7
+
* No special client side software required. Just configure your system to use a proxy.
8
+
* Each configured AWS Lambda region provides a large pool of constantly rotating IP address.
9
9
* Configurable IP rotation frequency between multiple regions.
10
-
* Personal proxy server not shared with anyone else.
11
10
* Mostly [AWS free tier](https://aws.amazon.com/free/) compatible (see FAQ below).
12
11
13
12
## Project status
14
13
Current code status: <b>proof of concept</b>. This is the first Go application that I've ever written. It has no tests. It may not work. It may blow up. Use at your own risk.
15
14
16
15
## How it works
17
-
At a high level, awslambdaproxy proxies TCP/UDP traffic through AWS Lambda regional endpoints. To do this, awslambdaproxy is setup on a publicly accessible host (e.g. EC2 instance) and it handles creating Lambda resources that run a proxy server ([ginuerzh/gost](https://github.com/ginuerzh/gost)). Since Lambda does not allow you to connect to bound ports in executing functions, a reverse SSH tunnel is established from the Lambda function to the host running awslambdaproxy. Once a tunnel connection is established, all user traffic is forwarded through this reverse tunnel to the proxy server. Lambda functions have a max execution time of 15 minutes, so there is a goroutine that continuously executes Lambda functions to ensure there is always a live tunnel in place. If multiple regions are specified, user traffic will be routed in a round robin fashion across these regions.
16
+
At a high level, awslambdaproxy proxies TCP/UDP traffic through AWS Lambda regional endpoints. To do this, awslambdaproxy is setup on a publicly accessible host (e.g. EC2 instance) and it handles creating Lambda resources that run a proxy server ([gost](https://github.com/ginuerzh/gost)). Since Lambda does not allow you to connect to bound ports in executing functions, a reverse SSH tunnel is established from the Lambda function to the host running awslambdaproxy. Once a tunnel connection is established, all user traffic is forwarded through this reverse tunnel to the proxy server. Lambda functions have a max execution time of 15 minutes, so there is a goroutine that continuously executes Lambda functions to ensure there is always a live tunnel in place. If multiple regions are specified, user traffic will be routed in a round robin fashion across these regions.
18
17
19
-

18
+

20
19
21
20
## Installation
22
21
@@ -27,13 +26,13 @@ The easiest way is to download a pre-built binary from the [GitHub Releases](htt
27
26
28
27
## Manual
29
28
30
-
1. Copy `awslambdaproxy` binary to a publicly accessible linux host (e.g. EC2 instance, VPS instance, etc). You will need to open the following ports on this host:
31
-
* Port 22 - 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.
32
-
* Port 8080 - 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
+
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:
30
+
*<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.
31
+
*<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).
33
32
34
33
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.
35
34
36
-
3.`awslambdaproxy` will need access to credentials for AWS in some form. This can be either through exporting environment variables (as shown below), shared crendential 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.
35
+
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.
37
36
38
37
```shell script
39
38
export AWS_ACCESS_KEY_ID=XXXXXXXXXX
@@ -51,14 +50,32 @@ The easiest way is to download a pre-built binary from the [GitHub Releases](htt
51
50
./awslambdaproxy run -r us-west-2,us-west-1,us-east-1,us-east-2
52
51
```
53
52
54
-
6. Configure your web browser (or OS) to use the SOCKS5 proxy on the publicly accessible host running `awslambdaproxy` on port 8080.
53
+
6. Configure your web browser (or OS) to use the HTTP/SOCKS5 proxy on the publicly accessible host running `awslambdaproxy` on port 8080.
54
+
55
+
## Examples
56
+
```
57
+
# execute proxy in four different regions with rotation happening every 60 seconds
58
+
./awslambdaproxy run -r us-west-2,us-west-1,us-east-1,us-east-2 -f 60s
59
+
60
+
# choose a different port and username/password for proxy and add another listener on localhost with no auth
61
+
./awslambdaproxy run -l "admin:admin@:8888,localhost:9090"
62
+
63
+
# bypass certain domains from using lambda proxy
64
+
./awslambdaproxy run -b "*.websocket.org,*.youtube.com"
65
+
66
+
# specify a dns server for the proxy server to use for dns lookups
67
+
./awslambdaproxy run -l "admin:awslambdaproxy@:8080?dns=1.1.1.1"
68
+
69
+
# increase function memory size for better network performance
70
+
./awslambdaproxy run -m 512
71
+
```
55
72
56
73
## Minimal IAM Policies
57
74
* This assumes you have the AWS CLI setup with an admin user
58
75
* Create a user with proper permissions needed to run the setup command. This user can be removed after running the setup command.
59
76
```shell script
60
77
aws iam create-user --user-name awslambdaproxy-setup
61
-
aws iam put-user-policy --user-name awslambdaproxy-setup --policy-name awslambdaproxy-setup --policy-document file://iam/setup.json
78
+
aws iam put-user-policy --user-name awslambdaproxy-setup --policy-name awslambdaproxy-setup --policy-document file://deployment/iam/setup.json
62
79
aws iam create-access-key --user-name awslambdaproxy-setup
63
80
{
64
81
"AccessKey": {
@@ -73,7 +90,7 @@ aws iam create-access-key --user-name awslambdaproxy-setup
73
90
* Create a user with proper permission needed to run the proxy.
74
91
```shell script
75
92
aws iam create-user --user-name awslambdaproxy-run
76
-
aws iam put-user-policy --user-name awslambdaproxy-run --policy-name awslambdaproxy-run --policy-document file://iam/run.json
93
+
aws iam put-user-policy --user-name awslambdaproxy-run --policy-name awslambdaproxy-run --policy-document file://deployment/iam/run.json
77
94
aws iam create-access-key --user-name awslambdaproxy-run
78
95
{
79
96
"AccessKey": {
@@ -109,25 +126,25 @@ It will create all dependent resources and run awslambdaproxy inside Docker cont
109
126
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.
110
127
3. <b>How big is the pool of available IP addresses?</b> This I don't know, but I do know I did not have a duplicate IP while running the proxy for a week.
111
128
4. <b>Will this make me completely anonymous?</b> No, absolutely not. The goal of this project is just to obfuscate your web traffic by rotating your IP address. All of your traffic is going through AWS which could be traced back to your account. You can also be tracked still with [browser fingerprinting](https://panopticlick.eff.org/), etc. Your [IP address may still leak](https://ipleak.net/) due to WebRTC, Flash, etc.
112
-
5. <b>How often will my external IP address change?</b> For each region specified, the IP address will change roughly every 4 hours. This of course is subject to change at any moment as this is not something that is documented by AWS Lambda.
129
+
5. <b>How often will my external IP address change?</b> I'm not positive as that's specific to the internals of AWS Lambda, and that can change at any time. However, I'll give an example, with 4 regions specified rotating every 5 minutes it resulted in around 15 unique IPs per hour.
113
130
6. <b>How much does this cost?</b> awslambdaproxy should be able to run mostly on the [AWS free tier](https://aws.amazon.com/free/) minus bandwidth costs. It can run on a t2.micro instance and the default 128MB Lambda function that is constantly running should also fall in the free tier usage. The bandwidth is what will cost you money; you will pay for bandwidth usage for both EC2 and Lambda.
114
-
7. <b>Why does my connection drop periodically?</b> AWS Lambda functions can currently only execute for a maximum of 15 minutes. In order to maintain an ongoing proxy a new function is executed and all new traffic is cut over to it. Any ongoing connections to the previous Lambda function will hard stop after a timeout period. You generally won't see any issues for normal web browsing as connections are very short lived, but for any long lived connections you may see issues.
131
+
7. <b>Why does my connection drop periodically?</b> AWS Lambda functions can currently only execute for a maximum of 15 minutes. In order to maintain an ongoing proxy a new function is executed and all new traffic is cut over to it. Any ongoing connections to the previous Lambda function will hard stop after a timeout period. You generally won't see any issues for normal web browsing as connections are very short lived, but for any long lived connections you will see issues. Consider using the `--bypass` flag to specify known domains that you know use persistent connections to avoid having your connection constantly dropping for these.
115
132
116
133
# Powered by
117
134
*[gost](https://github.com/ginuerzh/gost) - A simple security tunnel written in Golang.
0 commit comments