ProxymanApp / Proxyman

Modern. Native. Delightful Web Debugging Proxy for macOS, iOS, and Android ⚑️
https://proxyman.io
5.64k stars 187 forks source link

Support DNS spoofing #858

Open tiamed opened 3 years ago

tiamed commented 3 years ago

Feature request for DNS spoofing, pointing the domain to a different IP.

NghiaTranUIT commented 3 years ago

Thanks for requesting this feature @tiamed

I will check out what it's and see if It's reasonable to support it πŸ‘

fishioon commented 3 years ago

DNS spoofing is a useful feature for me. I need connect a new version server with a domain.

NghiaTranUIT commented 3 years ago

@fishioon you might try using Scripting to map your domain to a new domain on the fly.

Here is the snippet code:

function onRequest(context, url, request) {
    request.scheme = "http";
    request.host = "proxyman.dev";
    request.port = 9090;
    return request;
}

It will map https://proxyman.io -> http://proxyman.dev:9090 or your configure πŸ‘

EeeMt commented 2 years ago

In my case, the pre and prd has the same domain, but different ip address, so I need use something like ihosts/switchhosts to make requests reach the pre server. It will be very nice if proxyman supports this feature, and I can config network settings in one place.

keenwon commented 2 years ago

In my case, the pre and prd has the same domain, but different ip address, so I need use something like ihosts/switchhosts to make requests reach the pre server. It will be very nice if proxyman supports this feature, and I can config network settings in one place.

+1

rxg9527 commented 2 years ago

@NghiaTranUIT ,using Scripting you mentioned above doesn't work.

Treverr commented 2 years ago

I would love this feature as well. Any plans for this?

johnnypea commented 2 years ago

I would find this useful as well. Thank you.

rxg9527 commented 1 year ago

I would love this feature as well. Thx.

EeeMt commented 1 year ago

Any progress for the ticket?

NghiaTranUIT commented 1 year ago

Sorry, no progress so far. We're busy to port the app to Windows (1.2.0) and the Linux (on-going) 😒

Her is a workaround:

  1. Start Charles Proxy on port 8888
  2. Setup the DNS Spoofing on Charles Proxy.
  3. Start Proxyman -> At this point, Proxyman will override the Proxy at port 9090
  4. Go to Proxyman -> Tools -> Proxying Setting -> External Proxy -> Setup HTTP and HTTPS to 127.0.0.1 at port 8888.
  5. Done βœ…

This setup is: Your client -> Proxyman ---(external proxy)---> Charles Proxy (DNS Sppofing) -> The Internet.

You can use Proxyman as a main development tool, and Charles Proxy will handle the DNS πŸ‘

NghiaTranUIT commented 1 year ago

@EeeMt @rxg9527 @tiamed @johnnypea, if you don't mind, let's check out this Beta build: https://download.proxyman.io/beta/Proxyman_4.8.1_Support_DNS_Spoofing.dmg

You can access the DNS Spoofing in the Tool Menu. It's similar to what Charles Proxy does:

CleanShot 2023-06-30 at 20 48 09@2x


Let me know the result or any bugs that you can find πŸ‘

zineer commented 1 year ago

Awesome! I ran a couple quick checks for pointing domains to a new server that we are transferring to and it worked great! One fix - the checkbox says 'spoffing' instead of 'spoofing'. image

EeeMt commented 1 year ago

DNS Spoofing is great!!

But If I enable DNS spoofing along with SSL proxy, it hits the symptom that:

  1. Close all incognito tabs
  2. Open a chrome incognito tab
  3. Use [SwitchyOmega](chrome extension) to proxy all traffic to localhost:9091 where Proxyman listening
  4. Visit https://test.com
  5. Page stuck pending and then timeout in 30 seconds
  6. Proxyman captured no traffic

But, if I just enable DNS spoofing and disable SSL proxy, everything work fine, the sympton is:

  1. Close all incognito tabs
  2. Open a chrome incognito tab
  3. Use [SwitchyOmega](chrome extension) to proxy all traffic to localhost:9091 where Proxyman listening
  4. Visit https://test.com
  5. Page loaded
  6. Proxyman captured traffics.

Informations:

image

And the har (including bad case and good case): har.zip

NghiaTranUIT commented 1 year ago

@EeeMt if you don't mind, please test with this Beta build v2: https://download.proxyman.io/beta/Proxyman_4.8.1_DNS_Spoofing_v2.dmg

Changelog

In your test scenario, I suspect that Proxyman could not fetch the server certificate (because https://test.com is a fake domain).

EeeMt commented 1 year ago

@EeeMt if you don't mind, please test with this Beta build v2: https://download.proxyman.io/beta/Proxyman_4.8.1_DNS_Spoofing_v2.dmg

Changelog

  • Proxyman nows use DNS Spoofing to fetch the server certificate

In your test scenario, I suspect that Proxyman could not fetch the server certificate (because https://test.com is a fake domain).

Awesome, now it works great. Thank you!!!

NghiaTranUIT commented 1 year ago

Awesome, I will release this feature in the next update, and soon port it the iOS app πŸ‘