[GH-ISSUE #1905] DNS spoofing with custom certificate doesn't work unless connecting before #1896

Closed
opened 2026-03-03 19:55:15 +03:00 by kerem · 2 comments
Owner

Originally created by @nihaals on GitHub (Jan 13, 2024).
Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/1905

Originally assigned to: @NghiaTranUIT on GitHub.

Description

When using DNS spoofing to map a HTTPS request to another IP with a certificate that is not normally trusted, Proxyman gives "Could not resolve the host name. Double check the domain or change DNS Setting might fix it.", even if the certificate is trusted. Disabling the spoof, sending a request to the host and then enabling the spoof again works.

Steps to Reproduce

  1. Run a HTTPS server with a custom CA-signed certificate (e.g. with Caddy and using tls internal) for example.com
    • This might also work with a self-signed certificate but I haven't tested it
  2. Trust the CA certificate
  3. Test that the certificate is trusted by e.g. editing the hosts file and notice you can connect
  4. Set up a DNS spoof for example.com pointing to the IP of the HTTPS server
  5. Restart Proxyman
  6. Attempt to send a request to example.com
  7. Notice the error "Could not resolve the host name. Double check the domain or change DNS Setting might fix it."
  8. Disable the spoof (uncheck it)
  9. Notice the request works
  10. Enable the spoof
  11. Notice the request works and correctly uses your own HTTPS server
  12. Restart Proxyman
  13. Notice the issue has returned
  • To generate a CA certificate you can run openssl genrsa -out root_ca_key.pem 2048 and openssl req -x509 -sha256 -new -nodes -key root_ca_key.pem -days 365 -out root_ca_cert.pem
  • An example Caddyfile:
{
  skip_install_trust
  pki {
    ca {
      root {
        cert "/etc/caddy/root_ca_cert.pem"
        key "/etc/caddy/root_ca_key.pem"
      }
    }
  }
}

https://example.com {
  tls internal
  respond "Hello, world!"
}

Current Behavior

The request fails and requires disabling, connecting and re-enabling.

Expected Behavior

The request just works (like it does outside of Proxyman).

Environment

  • App version: Proxyman 4.16.0
  • macOS version: macOS 13.6.2
Originally created by @nihaals on GitHub (Jan 13, 2024). Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/1905 Originally assigned to: @NghiaTranUIT on GitHub. ## Description When using DNS spoofing to map a HTTPS request to another IP with a certificate that is not normally trusted, Proxyman gives "Could not resolve the host name. Double check the domain or change DNS Setting might fix it.", even if the certificate is trusted. Disabling the spoof, sending a request to the host and then enabling the spoof again works. ## Steps to Reproduce 1. Run a HTTPS server with a custom CA-signed certificate (e.g. with Caddy and using `tls internal`) for `example.com` - This might also work with a self-signed certificate but I haven't tested it 2. Trust the CA certificate 3. Test that the certificate is trusted by e.g. editing the hosts file and notice you can connect 4. Set up a DNS spoof for `example.com` pointing to the IP of the HTTPS server 5. Restart Proxyman 6. Attempt to send a request to `example.com` 7. Notice the error "Could not resolve the host name. Double check the domain or change DNS Setting might fix it." 8. Disable the spoof (uncheck it) 9. Notice the request works 10. Enable the spoof 11. Notice the request works and correctly uses your own HTTPS server 12. Restart Proxyman 13. Notice the issue has returned - To generate a CA certificate you can run `openssl genrsa -out root_ca_key.pem 2048` and `openssl req -x509 -sha256 -new -nodes -key root_ca_key.pem -days 365 -out root_ca_cert.pem` - An example Caddyfile: ```caddyfile { skip_install_trust pki { ca { root { cert "/etc/caddy/root_ca_cert.pem" key "/etc/caddy/root_ca_key.pem" } } } } https://example.com { tls internal respond "Hello, world!" } ``` ## Current Behavior The request fails and requires disabling, connecting and re-enabling. ## Expected Behavior The request just works (like it does outside of Proxyman). ## Environment - App version: Proxyman 4.16.0 - macOS version: macOS 13.6.2
kerem 2026-03-03 19:55:15 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@nihaals commented on GitHub (Feb 1, 2024):

Unsure why as there hasn't been a new update but this all of a sudden works fine now.

<!-- gh-comment-id:1921300273 --> @nihaals commented on GitHub (Feb 1, 2024): Unsure why as there hasn't been a new update but this all of a sudden works fine now.
Author
Owner

@NghiaTranUIT commented on GitHub (Feb 2, 2024):

@nihaals Thanks for letting me know. If you're using v4.16.0, it's the latest version.

<!-- gh-comment-id:1922676538 --> @NghiaTranUIT commented on GitHub (Feb 2, 2024): @nihaals Thanks for letting me know. If you're using v4.16.0, it's the latest version.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Proxyman#1896
No description provided.