Skip to content

Bug in upstream proxy feature #732

Closed
Closed

Description

@mjkim610

Proxify version:

v0.0.16

Current Behavior:

-hp flag does not seem to work. Traffic is not forwarded to upstream proxy.

"main" proxify instance:

❯ go build ; ./proxify -http-proxy http://127.0.0.1:9999 -vv

                       _ ___    
   ___  _______ __ __ (_) _/_ __
  / _ \/ __/ _ \\ \ // / _/ // /
 / .__/_/  \___/_\_\/_/_/ \_, / 
/_/                      /___/

                projectdiscovery.io

[INF] Current proxify version v0.0.16 (latest)
[INF] HTTP Proxy Listening on 127.0.0.1:8888
[INF] Socks5 Proxy Listening on 127.0.0.1:10080
[INF] Saving proxify logs to proxify_logs.jsonl
[INF] Saving proxify logs (raw) to proxify_logs
[INF] Using upstream HTTP proxies: ["http://127.0.0.1:9999"]
GET http://www.facebook.com/ HTTP/1.1
Accept: */*
Accept-Encoding: 
Connection: close
User-Agent: curl/8.7.1

GET http://www.facebook.com/ HTTP/1.1
Accept: */*
Accept-Encoding: 
Connection: close
User-Agent: curl/8.7.1

HTTP/1.1 301 Moved Permanently
Connection: close
Content-Type: text/plain
Date: Wed, 10 Sep 2025 06:47:33 GMT
Location: https://www.facebook.com/
Server: proxygen-bolt
Content-Length: 0

"upstream" proxify instance (receives no traffic):

❯ ./proxify -ha 127.0.0.1:9999 -sa 127.0.0.1:10090 -vv -sr proxify_logs_upstream -o proxify_logs_upstream.jsonl

                       _ ___    
   ___  _______ __ __ (_) _/_ __
  / _ \/ __/ _ \\ \ // / _/ // /
 / .__/_/  \___/_\_\/_/_/ \_, / 
/_/                      /___/

                projectdiscovery.io

[INF] Current proxify version v0.0.16 (latest)
[INF] HTTP Proxy Listening on 127.0.0.1:9999
[INF] Socks5 Proxy Listening on 127.0.0.1:10090
[INF] Saving proxify logs to proxify_logs_upstream.jsonl
[INF] Saving proxify logs (raw) to proxify_logs_upstream
- Ctrl+C pressed in Terminal

Expected Behavior:

"upstream" proxy receives traffic. I can confirm it is working in v0.0.8.

"main" proxify instance:

❯ go build ; ./proxify -http-proxy http://127.0.0.1:9999 -vv

                       _ ___    
   ___  _______ __ __ (_) _/_ __
  / _ \/ __/ _ \\ \ // / _/ // /
 / .__/_/  \___/_\_\/_/_/ \_, / 
/_/                      /___/  v0.0.8

                projectdiscovery.io

[INF] HTTP Proxy Listening on 127.0.0.1:8888
[INF] Socks5 Proxy Listening on 127.0.0.1:10080
[INF] Saving proxify traffic to logs
[INF] Using upstream HTTP proxies: ["http://127.0.0.1:9999"]
2025/09/10 15:49:32 [001] INFO: Got request / www.facebook.com GET http://www.facebook.com/
GET http://www.facebook.com/ HTTP/1.1
Accept: */*
Proxy-Connection: Keep-Alive
User-Agent: curl/8.7.1

2025/09/10 15:49:32 [001] INFO: Sending request GET http://www.facebook.com/
2025/09/10 15:49:32 [001] INFO: Received response 301 Moved Permanently
HTTP/1.1 301 Moved Permanently
Connection: keep-alive
Content-Type: text/plain
Date: Wed, 10 Sep 2025 06:49:32 GMT
Location: https://www.facebook.com/
Server: proxygen-bolt
Content-Length: 0

2025/09/10 15:49:32 [001] INFO: Copying response to client 301 Moved Permanently [301]
2025/09/10 15:49:32 [001] INFO: Copied 0 bytes to client error=<nil>

"upstream" proxify instance:

❯ ./proxify -ha 127.0.0.1:9999 -sa 127.0.0.1:10090 -vv 

                       _ ___    
   ___  _______ __ __ (_) _/_ __
  / _ \/ __/ _ \\ \ // / _/ // /
 / .__/_/  \___/_\_\/_/_/ \_, / 
/_/                      /___/  v0.0.8

                projectdiscovery.io

[INF] HTTP Proxy Listening on 127.0.0.1:9999
[INF] Socks5 Proxy Listening on 127.0.0.1:10090
[INF] Saving proxify traffic to logs
2025/09/10 15:49:32 [001] INFO: Got request / www.facebook.com GET http://www.facebook.com/
GET http://www.facebook.com/ HTTP/1.1
Accept: */*
Accept-Encoding: gzip
User-Agent: curl/8.7.1

2025/09/10 15:49:32 [001] INFO: Sending request GET http://www.facebook.com/
2025/09/10 15:49:32 [001] INFO: Received response 301 Moved Permanently
HTTP/1.1 301 Moved Permanently
Connection: keep-alive
Content-Type: text/plain
Date: Wed, 10 Sep 2025 06:49:32 GMT
Location: https://www.facebook.com/
Server: proxygen-bolt
Content-Length: 0

2025/09/10 15:49:32 [001] INFO: Copying response to client 301 Moved Permanently [301]
2025/09/10 15:49:32 [001] INFO: Copied 0 bytes to client error=<nil>

Steps To Reproduce:

  1. Run ./proxify -http-proxy http://127.0.0.1:9999 -vv
  2. Run some upstream proxy (another proxify instance, burp suite proxy, etc.)
  3. Send some traffic
  4. Verify that the upstream proxy is not receiving traffic

Anything else:

Activity

  1. added
    Type: BugInconsistencies or issues which will cause an issue or problem for users or implementors.
    on Sep 10, 2025
  2. mjkim610 commented on Sep 10, 2025

    @mjkim610
    ContributorAuthor

    Related: #713
    Given green light by pdteam on discord, I will work on this.

  3. changed the title [-]Bug in upstream proxy feature(?)[/-] [+]Bug in upstream proxy feature[/+] on Sep 10, 2025
  4. mjkim610 commented on Sep 12, 2025

    @mjkim610
    ContributorAuthor
  5. dogancanbakir commented on Sep 17, 2025

    @dogancanbakir
    Member

    I was unable to reproduce the issue; I was able to successfully receive data in the upstream proxy, in this case, Burp Suite.

  6. mjkim610 commented on Sep 18, 2025

    @mjkim610
    ContributorAuthor

    I was unable to reproduce the issue; I was able to successfully receive data in the upstream proxy, in this case, Burp Suite.

    Hi @dogancanbakir. Can you provide the steps you took?

    Here are my steps:

    Setup

    Burp suite config:

    Image

    Session 1:

    ❯ cd [...]/proxify/cmd/proxify
    ❯ git checkout v0.0.16
    ❯ go build ; ./proxify -hp http://127.0.0.1:8080/
    

    Session 2:

    curl -x http://127.0.0.1:8888/ www.google.com
    

    Before fix

    No packet intercepted
    Image

    After fix

    Image
  7. mjkim610 commented on Sep 29, 2025

    @mjkim610
    ContributorAuthor

    Hi @dogancanbakir , any update?

  8. mjkim610 commented on Nov 25, 2025

    @mjkim610
    ContributorAuthor

    All related PRs merged, closing issue.
    Please re-open if there are issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type: BugInconsistencies or issues which will cause an issue or problem for users or implementors.

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions