Proxyman icon indicating copy to clipboard operation
Proxyman copied to clipboard

Support DNS spoofing

Open tiamed opened this issue 3 years ago • 8 comments

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

tiamed avatar Apr 19 '21 11:04 tiamed

Thanks for requesting this feature @tiamed

I will check out what it's and see if It's reasonable to support it 👍

NghiaTranUIT avatar Apr 21 '21 13:04 NghiaTranUIT

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

fishioon avatar Sep 27 '21 01:09 fishioon

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

Here is the snippet code:

  • Matching rule = https://proxyman.io
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 👍

NghiaTranUIT avatar Sep 27 '21 01:09 NghiaTranUIT

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.

EeeMt avatar Dec 30 '21 03:12 EeeMt

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

keenwon avatar Mar 02 '22 07:03 keenwon

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

rxg9527 avatar Mar 17 '22 08:03 rxg9527

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

Treverr avatar Aug 01 '22 19:08 Treverr

I would find this useful as well. Thank you.

johnnypea avatar Aug 03 '22 23:08 johnnypea

I would love this feature as well. Thx.

rxg9527 avatar Nov 23 '22 08:11 rxg9527

Any progress for the ticket?

EeeMt avatar Jan 31 '23 09:01 EeeMt

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 avatar Jan 31 '23 09:01 NghiaTranUIT

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

  • It doesn't change the Host Header or the URL
  • Before connecting to the destination server, it lookups at the DNS Spoofing
  • Support wildcard

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


Let me know the result or any bugs that you can find 👍

NghiaTranUIT avatar Jun 30 '23 13:06 NghiaTranUIT

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

zineer avatar Jun 30 '23 15:06 zineer

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:

  • env:
    • Macbook pro 14 (apple M1 pro)
    • macOS 13.4 (22F66)
    • Proxyman Version 4.8.1 (48010)
    • Google Chrome Version 114.0.5735.198 (Official Build) (arm64)
  • config:
    • DNS spoofing: test.com -> 192.168.50.160
  • having tried:
    • enable DNS spoofing & SSL proxy Enable only for the domain: the bad symptom above ❗️
    • enable DNS spoofing & SSL proxy Enable all domain from "Google Chrome": the bad symptom above ❗️
    • enable DNS spoofing & disable SSL proxy: the good symptom above ✅
    • disable DNS spoofing & enable SSL proxy: the bad symptom above, but it's expected, because the domain is fake
    • disable DNS spoofing & disable SSL proxy: he bad symptom above but time out shorten to 6s~10s, but it's expected, because the domain is fake
image

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

EeeMt avatar Jul 01 '23 04:07 EeeMt

@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).

NghiaTranUIT avatar Jul 02 '23 08:07 NghiaTranUIT

@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!!!

EeeMt avatar Jul 02 '23 08:07 EeeMt

Awesome, I will release this feature in the next update, and soon port it the iOS app 👍

NghiaTranUIT avatar Jul 02 '23 11:07 NghiaTranUIT