chromium / badssl.com

:lock: Memorable site for testing clients against bad SSL configs.
https://badssl.com
Apache License 2.0
2.78k stars 186 forks source link

how to use the badssl docker image with custom DNS name not badssl.test server for testing purposes ? #522

Open rehamkhalil3 opened 1 year ago

professorabhay commented 1 year ago

Hey @rehamkhalil3 , You can do it by just modifying the host file and add an entry mapping the custom DNS name to the IP address of the Docker container.127.0.0.1 mycustomdomain.com Then again pull the image from hub and run it on your desired port and after running successfully you can access it by your custom DNS.

christhompson commented 1 month ago

You can change the test server domain by changing the variable in the main Makefile the Domain config variable for generating the test certs (here https://github.com/chromium/badssl.com/blob/master/Makefile#L36). You'll then also need to change the /etc/hosts list to use the new domain (or however you are setting up DNS for your test server instance).

I have not tried re-configuring the test server in a long time though, so there may be some rough edges. If you do this and report back I'd be happy to brainstorm improvements to running and customizing the test server.