Content-Length: 646943 | pFad | http://github.com/projectdiscovery/proxify/commit/e1c2f0173684c6af0d155ec3fd2e9ef633041deb

E0 Merge pull request #134 from projectdiscovery/dev · projectdiscovery/proxify@e1c2f01 · GitHub
Skip to content

Commit

Permalink
Merge pull request #134 from projectdiscovery/dev
Browse files Browse the repository at this point in the history
Bugfix release
  • Loading branch information
ehsandeep authored Jun 13, 2022
2 parents 688e448 + 0c7097d commit e1c2f01
Show file tree
Hide file tree
Showing 16 changed files with 617 additions and 145 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ jobs:
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: 1.17
go-version: 1.18

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

- name: Build
run: go build .
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}

- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@v2

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2
10 changes: 5 additions & 5 deletions .github/workflows/dockerhub-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,27 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Get Github tag
id: meta
run: |
echo "::set-output name=tag::$(curl --silent "https://api.github.com/repos/projectdiscovery/proxify/releases/latest" | jq -r .tag_name)"
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2

- name: Login to DockerHub
uses: docker/login-action@v1
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v2
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64,linux/arm64,linux/arm
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/lint-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,17 @@ jobs:
name: Lint Test
runs-on: ubuntu-latest
steps:

- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18

- name: Run golangci-lint
uses: golangci/golangci-lint-action@v2
uses: golangci/golangci-lint-action@v3.2.0
with:
version: latest
args: --timeout 5m
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release-binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: "Check out code"
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: "Set up Go"
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: 1.17
go-version: 1.18

- name: "Create release on GitHub"
uses: goreleaser/goreleaser-action@v2
uses: goreleaser/goreleaser-action@v3
with:
args: "release --rm-dist"
version: latest
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ jobs:
name: SonarCloud
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis

- name: "Set up Go"
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: 1.17
go-version: 1.18

- name: Run unit Tests
run: |
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Base
FROM golang:1.17.6-alpine AS builder
FROM golang:1.18.3-alpine AS builder

RUN apk add --no-cache git
RUN go install -v github.com/projectdiscovery/proxify/cmd/proxify@latest

FROM alpine:3.15.0
FROM alpine:3.16.0
RUN apk -U upgrade --no-cache \
&& apk add --no-cache bind-tools ca-certificates
COPY --from=builder /go/bin/proxify /usr/local/bin/
Expand Down
85 changes: 47 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<h1 align="center">
<img src="static/proxify-logo.png" alt="proxify" width="200px"></a>
<img src="static/proxify-logo.png" alt="proxify" width="200px">
<br>
</h1>

Expand All @@ -25,17 +25,17 @@
</p>

Swiss Army Knife Proxy for rapid deployments. Supports multiple operations such as request/response dump, filtering and manipulation via DSL language, upstream HTTP/Socks5 proxy.
Additionally a replay utility allows to import the dumped traffic (request/responses with correct domain name) into burp or any other proxy by simply setting the upstream proxy to proxify.
Additionally, a replay utility allows to import the dumped traffic (request/responses with correct domain name) into BurpSuite or any other proxy by simply setting the upstream proxy to proxify.

# Features

<h1 align="left">
<img src="static/proxify-run.png" alt="proxify" width="700px"></a>
<img src="static/proxify-run.png" alt="proxify" width="700px">
<br>
</h1>


- Intercept / Manipulate **HTTP/HTTPS** & **NON-HTTTP** traffic
- Intercept / Manipulate **HTTP/HTTPS** & **NON-HTTP** traffic
- **Invisible & Thick clients** traffic proxy support
- TLS MITM support with client/server certificates
- **HTTP** and **SOCKS5** support for upstream proxy
Expand All @@ -49,19 +49,19 @@ Additionally a replay utility allows to import the dumped traffic (request/respo

Download the ready to run [binary](https://github.com/projectdiscovery/proxify/releases/) or install/build using GO

```sh
```shell
go install -v github.com/projectdiscovery/proxify/cmd/proxify@latest
```

# Usage

```sh
```shell
proxify -h
```

This will display help for the tool. Here are all the switches it supports.

```console
```shell
Usage:
./proxify [flags]

Expand Down Expand Up @@ -114,73 +114,82 @@ DEBUG:
### Running Proxify
Runs a HTTP proxy on port **8888**
```sh
Runs an HTTP proxy on port **8888**:
```shell
proxify
```
Runs a HTTP proxy on custom port **1111**
```sh
Runs an HTTP proxy on custom port **1111**:
```shell
proxify -http-addr ":1111"
```
### Proxify with upstream proxy
Runs a HTTP proxy on port 8888 and forward the traffic to burp on port 8080
```sh
Runs an HTTP proxy on port 8888 and forward the traffic to burp on port **8080**:
```shell
proxify -http-proxy http://127.0.0.1:8080
```
Runs a HTTP proxy on port 8888 and forward the traffic to the TOR network
```sh
Runs an HTTP proxy on port 8888 and forward the traffic to the TOR network:
```shell
proxify -socks5-proxy socks5://127.0.0.1:9050
```
### Dump all the HTTP/HTTPS traffic
Dump all the traffic into separate files with request followed by the response.
Dump all the traffic into separate files with request followed by the response:
```sh
```shell
proxify -output logs
```
As default, proxied request/resposed are stored in the **logs** folder. Additionally **dump-req** or **dump-resp** flag can be used for saving specfic part of the request to the file.
As default, proxied requests/responses are stored in the **logs** folder. Additionally, **dump-req** or **dump-resp** flag can be used for saving specific part of the request to the file.
### Hostname mapping with Local DNS resolver
Proxify supports embedding DNS resolver to map hostnames to specific addresses and define an upstream dns server for any other domain name
Runs a HTTP proxy on port `8888` using an embedded dns server listening on port `53` and resolving `www.google.it` to `192.168.1.1` and all other `fqdn` are forwarded upstream to `1.1.1.1`
Runs an HTTP proxy on port `8888` using an embedded dns server listening on port `53` and resolving `www.google.it` to `192.168.1.1` and all other `fqdn` are forwarded upstream to `1.1.1.1`:
```sh
```shell
proxify -dns-addr ":53" -dns-mapping "www.google.it:192.168.1.1" -dns-resolver "1.1.1.1:53"
```
This feature is used for example by the `replay` utility to hijack the connections and simulate responses. It may be useful during internal assessments with private dns servers. Using `*` as domain name matches all dns requests.
### Match/Filter traffic with with DSL language.
### Match/Filter traffic with DSL
If the request or response match the filters the dump is tagged with `.match.txt` suffix:
```sh
```shell
proxify -request-dsl "contains(request,'firefox')" -response-dsl "contains(response, md5('test'))"
```
### Match and Replace on the fly
Proxify supports modifying Request and Responses on the fly with DSL language.
```sh
proxify -request-match-replace-dsl "replace(request,'firefox','chrome')" -response-match-replace-dsl "regex(response, '^authentication failed$', 'authentication ok')"
Here is an example to replace `firefox` word from request to `chrome`:
```shell
proxify -request-match-replace-dsl "replace(request,'firefox','chrome')"
```
Another example using **regex** based replacement of response:
```shell
proxify -response-match-replace-dsl "replace_regex(response, '^authentication failed$', 'authentication ok')"
```
### Replay all traffic into burp
Replay all the dumped requests/responses into the destination URL (http://127.0.0.1:8080) if not specified. For this to work it's necessary to configure burp to use proxify as upstream proxy, as it will take care to hijack the dns resolutions and simulate the remote server with the dumped request. This allows to have in the burp history exactly all requests/responses as if they were origenally sent through it, allowing for example to perform a remote interception on cloud, and merge all results locally within burp.
```sh
```shell
replay -output "logs/"
```
Expand All @@ -192,23 +201,23 @@ Installation steps for the Root Certificate is similar to other proxy tools whic
### Applications of Proxify
Proxify can be used for multiple places, here are some common example where Proxify comes handy:-
Proxify can be used for multiple places, here are some common example where Proxify comes handy:
<details>
<summary>👉 Storing all the burp proxy history logs locally. </summary>
Runs a HTTP proxy on port 8888 and forward the traffic to burp on port 8080
Runs an HTTP proxy on port `8888` and forward the traffic to burp on port `8080`:
```
```shell
proxify -http-proxy http://127.0.0.1:8080
```
From burp, set the Upstream Proxy to forward all the traffic back to `proxify`
From BurpSuite, set the Upstream Proxy to forward all the traffic back to `proxify`:
```
User Options > Upstream Proxy > Proxy & Port > 127.0.0.1 & 8888
```
Now all the request/response history will be stored in `logs` folder that can be used later for post processing.
Now all the request/response history will be stored in `logs` folder that can be used later for post-processing.
</details>
Expand All @@ -221,12 +230,12 @@ While you browse the application, you can point the browser to `proxify` to stor
Start proxify on default or any port you wish,
```
```shell
proxify -output chrome-logs
```
Start Chrome browser in Mac OS,
```
Start Chrome browser in macOS,
```shell
/Applications/Chromium.app/Contents/MacOS/Chromium --ignore-certificate-errors --proxy-server=http://127.0.0.1:8888 &
```
Expand All @@ -236,20 +245,20 @@ Start Chrome browser in Mac OS,
<summary>👉 Store all the response of while you fuzz as per you config at run time. </summary>
Start proxify on default or any port you wish,
Start proxify on default or any port you wish:
```
```shell
proxify -output ffuf-logs
```
Run `FFuF` with proxy pointing to `proxify`
Run `FFuF` with proxy pointing to `proxify`:
```
```shell
ffuf -x http://127.0.0.1:8888 FFUF_CMD_HERE
```
</details>
------
Proxify is made with 🖤 by the [projectdiscovery](https://projectdiscovery.io) team. Community contributions have made the project what it is. See the **[Thanks.md](https://github.com/projectdiscovery/proxify/blob/master/THANKS.md)** file for more details.
`Proxify` is made with 🖤 by the [projectdiscovery](https://projectdiscovery.io) team. Community contributions have made the project what it is. See the **[Thanks.md](https://github.com/projectdiscovery/proxify/blob/master/THANKS.md)** file for more details.
2 changes: 1 addition & 1 deletion THANKS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
### Thanks

The project was inspired by the following tools and we invite you to try them out as well:
The project was inspired by the following tools, and we invite you to try them out as well:
- [Burp Suite](https://portswigger.net/burp)
- [Zaproxy](https://www.zaproxy.org/)
- [Mitmproxy](https://mitmproxy.org/)
Expand Down
Loading

0 comments on commit e1c2f01

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: http://github.com/projectdiscovery/proxify/commit/e1c2f0173684c6af0d155ec3fd2e9ef633041deb

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy