GithubHelp home page GithubHelp logo

Comments (7)

tomakehurst avatar tomakehurst commented on July 1, 2024

I get the same result as you do, and there's nothing wrong with your configuration as far as I can tell, so I'll investigate.

from wiremock.

yogurtearl avatar yogurtearl commented on July 1, 2024

Are you running on Java 7? I have run into SSL exceptions running on Java 7
on a mac, but it worked fine on Java 6.

I get the same result as you do, and there's nothing wrong with your
configuration as far as I can tell, so I'll investigate.


Reply to this email directly or view it on
GitHubhttps://github.com//issues/62#issuecomment-26727481
.

from wiremock.

rossillingworth avatar rossillingworth commented on July 1, 2024

No, I get the same exception in 1.6.0.45 or 1.7.0.17

from wiremock.

tomakehurst avatar tomakehurst commented on July 1, 2024

I'm also seeing it with both versions.

from wiremock.

tomakehurst avatar tomakehurst commented on July 1, 2024

I've just realised that what you're trying to do isn't possible when using WireMock as a forward (i.e. browser) proxy for HTTPS. The reason is that HTTPS proxies don't attempt to decrypt the exchange, but make a CONNECT request to the destination and effectively become TCP tunnels. Although WireMock could be set up to mimic this behaviour, it'd be pointless because it couldn't read the (encrypted) request and hence map it to a suitable response.

from wiremock.

rossillingworth avatar rossillingworth commented on July 1, 2024

Sorry, I should have explained. I was simply using the browser as a test tool.

I am evaluating proxies for automation testing, but most of our traffic is SSL. Mostly I just want to inject 500s or 404s into the traffic SSL flow at controlled points, sometimes I will need more complex response modification, so I was looking for something extendable, ie: java.

I believe Wiremock is an SSL MITM capable debugging proxy that I can extend.

I believe I understand correctly that Wiremock does generate it's own certificates, and so can modify HTTPS response on the fly?
NB: I am quite happy adding a CA cert to the trusted list.

Does --enable-browser-proxying activate TCP tunneling rather than interception?

My apologies for the confusion, but I have been so busy evaluating everything out there that I had no time to read as much of the source code as I would like.

PS: just an FYI, did you know your proxy project is one of the very few that actually compiles out of the box.

from wiremock.

tomakehurst avatar tomakehurst commented on July 1, 2024

Any http client (browser or otherwise) will try to use CONNECT when requesting a page via a forward proxy, which is what WireMock is acting as with --enable-browser-proxying. Therefore the conversion will always stay encrypted and be unmodifyable.

However, configuring wiremock as a reverse proxy (either by setting the --proxy-all= param or adding a proxy stub mapping) will allow you to replace specific responses by adding stub mappings at higher priorities. The only catch is that you will need to point your browser directly at wiremock I.e. no proxy settings.

from wiremock.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.