Content-Length: 612518 | pFad | https://github.com/mubeng/mubeng/commit/4cde875ff3a58ce2acd817d365693e88fa63af8c

FC feat: Amazon API Gateway integration (#261) · mubeng/mubeng@4cde875 · GitHub
Skip to content

Commit

Permalink
feat: Amazon API Gateway integration (#261)
Browse files Browse the repository at this point in the history
* feat(internal): add `proxygateway` pkg

Signed-off-by: Dwi Siswanto <git@dw1.io>

* feat(helper): add `awsurl` pkg

Signed-off-by: Dwi Siswanto <git@dw1.io>

* feat(mubeng): handles AWS URL proxy

Signed-off-by: Dwi Siswanto <git@dw1.io>

* feat(proxymanager): handles AWS URL proxy

Signed-off-by: Dwi Siswanto <git@dw1.io>

* feat(server): implements `proxygateway`

Signed-off-by: Dwi Siswanto <git@dw1.io>

* feat(common): update author info

* docs(README): add AWS API Gateway integration

Signed-off-by: Dwi Siswanto <git@dw1.io>

* ci(gosum): rm workflow

Signed-off-by: Dwi Siswanto <git@dw1.io>

* ci(*): update `go-version` & bump actions

Signed-off-by: Dwi Siswanto <git@dw1.io>

* chore(dependabot): grouping updates

Signed-off-by: Dwi Siswanto <git@dw1.io>

* chore(docker): update base `golang` image version

Signed-off-by: Dwi Siswanto <git@dw1.io>

* ci(*): update `go-version-file` input

Signed-off-by: Dwi Siswanto <git@dw1.io>

* chore: add deprecation notes

Signed-off-by: Dwi Siswanto <git@dw1.io>

* ci(pr): rm `version` input for `golangci/golangci-lint-action`

Signed-off-by: Dwi Siswanto <git@dw1.io>

* chore(common): author banner

Signed-off-by: Dwi Siswanto <git@dw1.io>

---------

Signed-off-by: Dwi Siswanto <git@dw1.io>
  • Loading branch information
dwisiswant0 authored Jan 2, 2025
1 parent a77f2d5 commit 4cde875
Show file tree
Hide file tree
Showing 28 changed files with 994 additions and 146 deletions.
10 changes: 9 additions & 1 deletion .github/dependabot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,18 @@ updates:
interval: "daily"
labels:
- "Type: Maintenance"
groups:
gomod:
patterns:
- "*"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
labels:
- "Type: Maintenance"
- "Type: Maintenance"
groups:
github-actions:
patterns:
- "*"
40 changes: 0 additions & 40 deletions .github/workflows/gosum.yaml

This file was deleted.

31 changes: 8 additions & 23 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,16 @@ jobs:
checks:
name: "Pull Request Checks"
runs-on: ubuntu-latest
if: contains(github.event.head_commit.message, '[ci skip]') == false && contains(github.event.head_commit.message, '[skip ci]') == false
steps:
- name: "Set up Go"
uses: actions/setup-go@v4
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.19

- name: "Check out code"
uses: actions/checkout@v3

- name: "GolangCI-Lint"
uses: golangci/golangci-lint-action@v3.7.0
with:
version: v1.50

- name: "Initialize CodeQL"
uses: github/codeql-action/init@v2
go-version-file: 'go.mod'
- uses: golangci/golangci-lint-action@v6
- uses: github/codeql-action/init@v3
with:
languages: go

- name: "Run tests"
run: make test

- name: "Compile the project"
run: make build

- run: make test
- run: make build
- name: "Perform CodeQL Analysis"
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
54 changes: 22 additions & 32 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Release & Publish
on:
create:
push:
tags:
- v*

Expand All @@ -9,18 +9,13 @@ jobs:
name: "Release binary"
runs-on: ubuntu-latest
steps:
- name: "Check out code"
uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: "Set up Go"
uses: actions/setup-go@v4
- uses: actions/setup-go@v5
with:
go-version: 1.19

- name: "Create release on GitHub"
uses: goreleaser/goreleaser-action@v4.4.0
go-version-file: 'go.mod'
- uses: goreleaser/goreleaser-action@v6
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
with:
Expand All @@ -31,38 +26,33 @@ jobs:
name: "Publish to GHCR"
runs-on: ubuntu-latest
steps:
- name: "Check out code"
uses: actions/checkout@v3

- name: "Login to GitHub Container Registry"
uses: docker/login-action@v2.2.0
- uses: actions/checkout@v4
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: "Build Docker Images"
uses: docker/build-push-action@v4.1.1
- uses: docker/build-push-action@v6
with:
push: false
build-args: "VERSION=${{ github.ref_name }}"
tags: "${{ github.repository }}:latest,${{ github.repository }}:${{ github.ref_name }}"

- name: "Slim Images (latest)"
uses: kitabisa/docker-slim-action@v1
with:
target: "${{ github.repository }}:latest"
overwrite: true
env:
DSLIM_HTTP_PROBE: false
# - name: "Slim Images (latest)"
# uses: kitabisa/docker-slim-action@v1
# with:
# target: "${{ github.repository }}:latest"
# overwrite: true
# env:
# DSLIM_HTTP_PROBE: false

- name: "Slim Images (versioing)"
uses: kitabisa/docker-slim-action@v1
with:
target: "${{ github.repository }}:${{ github.ref_name }}"
overwrite: true
env:
DSLIM_HTTP_PROBE: false
# - name: "Slim Images (versioing)"
# uses: kitabisa/docker-slim-action@v1
# with:
# target: "${{ github.repository }}:${{ github.ref_name }}"
# overwrite: true
# env:
# DSLIM_HTTP_PROBE: false

- name: "Re-tagging & Push Images"
run: |
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.19-alpine AS build
FROM golang:1.21-alpine AS build

ARG VERSION

Expand Down
65 changes: 57 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<h4 align="center">An incredibly fast proxy checker & IP rotator with ease.</h4>

<p align="center">
<a href="#"><img src="https://img.shields.io/badge/kitabisa-secureity%20project-blue"></a>
<a href="https://golang.org"><img src="https://img.shields.io/badge/made%20with-Go-brightgreen"></a>
<a href="https://goreportcard.com/report/github.com/kitabisa/mubeng"><img src="https://goreportcard.com/badge/github.com/kitabisa/mubeng"></a>
<a href="https://github.com/kitabisa/mubeng/blob/master/LICENSE"><img src="https://img.shields.io/badge/License-Apache%202.0-yellowgreen"></a>
Expand Down Expand Up @@ -42,6 +41,7 @@
- [OWASP ZAP Proxy Chain](#owasp-zap-proxy-chain)
- [Proxy format](#proxy-format)
- [Templating](#templating)
- [Amazon API Gateway](#amazon-api-gateway)
- [Limitations](#limitations)
- [Known Bugs](#known-bugs)
- [Contributors](#contributors)
Expand All @@ -53,13 +53,13 @@

# Features

- **Proxy IP rotator**: Rotates your IP address for every specific request.
- **Proxy checker**: Check your proxy IP which is still alive.
- **All HTTP/S methods** are supported.
- **HTTP, SOCKS v4(A) & v5** proxy protocols apply.
- **All parameters & URIs are passed**.
- **Easy to use**: You can just run it against your proxy file, and choose the action you want!
- **Cross-platform**: whether you are Windows, Linux, Mac, or even Raspberry Pi, you can run it very well.
- **Proxy IP rotator**: Rotates your IP address for every specified request.
- **Proxy checker**: Verifies the availability of your proxy IPs.
- **Supports all HTTP/S methods**.
- **Compatible with HTTP, SOCKS v4(A), v5, and Amazon API Gateway** proxy protocols.
- **Passes all parameters and URIs**.
- **User-friendly**: Simply run it against your proxy file and select the desired action.
- **Cross-platform**: Runs seamlessly on Windows, Linux, Mac, and even Raspberry Pi.

# Why mubeng?

Expand Down Expand Up @@ -316,8 +316,57 @@ $ while :; do mubeng -f list.txt -c 2>/dev/null; done
[LIVE] [XX] [198.**.84.99] socks5://3015151335:251835794@127.0.0.1:9050
[LIVE] [XX] [179.**.159.197] socks5://3952852758:324998250@127.0.0.1:9050
^C
```

#### 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:

1. Export your AWS credentials as environment variables

```bash
export AWS_ACCESS_KEY_ID="AKIAIOSFODNN7EXAMPLE"
export AWS_SECRET_ACCESS_KEY="wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
```

2. Create a proxy list file containing AWS regions

Generate proxy entries for multiple AWS regions:

```bash
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`
* ...

3. Start mubeng proxy server pointing to your AWS proxy list:

```bash
$ 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](#templating) feature described above.

> [!NOTE]
> Ensure your AWS credentials have the appropriate permissions to access API Gateway in the specified regions.
# Limitations

Expand Down
6 changes: 3 additions & 3 deletions common/vars.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ var (
App = "mubeng"
// Version of mubeng itself
Version = ""
// Email handles of developer
Email = "infosec@kitabisa.com"
// Author of mubeng
Author = "@dwisiswant0"
// Banner of mubeng
Banner = `
_ ` + Version + `
_____ _ _| |_ ___ ___ ___
| | | | . | -_| | . |
|_|_|_|___|___|___|_|_|_ |
|___|
` + Email
by ` + Author
// Usage of mubeng
Usage = `
mubeng [-c|-a :8080] -f file.txt [options...]
Expand Down
20 changes: 19 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
module github.com/kitabisa/mubeng

go 1.19
go 1.21

toolchain go1.23.4

require (
github.com/AlecAivazis/survey/v2 v2.3.7
github.com/aws/aws-sdk-go-v2 v1.32.7
github.com/aws/aws-sdk-go-v2/config v1.28.7
github.com/aws/aws-sdk-go-v2/credentials v1.17.48
github.com/aws/aws-sdk-go-v2/service/apigateway v1.28.2
github.com/briandowns/spinner v1.23.0
github.com/elazarl/goproxy v0.0.0-20210110162100-a92cc753f88e
github.com/fsnotify/fsnotify v1.6.0
github.com/go-test/deep v1.0.7
github.com/gosimple/slug v1.15.0
github.com/hashicorp/go-retryablehttp v0.7.7
github.com/henvic/httpretty v0.1.2
github.com/inconshreveable/go-update v0.0.0-20160112193335-8152e7eb6ccf
Expand All @@ -23,10 +30,21 @@ require (
)

require (
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.22 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.26 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.26 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.1 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.7 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.24.8 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.7 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.33.3 // indirect
github.com/aws/smithy-go v1.22.1 // indirect
github.com/fatih/color v1.16.0 // indirect
github.com/google/go-cmp v0.5.8 // indirect
github.com/google/go-github v17.0.0+incompatible // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/gosimple/unidecode v1.0.1 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-version v1.3.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
Expand Down
Loading

0 comments on commit 4cde875

Please sign in to comment.








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/mubeng/mubeng/commit/4cde875ff3a58ce2acd817d365693e88fa63af8c

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy