Cannot proxy to https from http #44

Closed
bbyars opened this Issue Sep 1, 2014 · 1 comment

Projects

None yet

1 participant

@bbyars
Owner
bbyars commented Sep 1, 2014

I setup proxy imposters to talk to client webservice server (SOAP).
There are both HTTP and HTTPS
Here is the configuration

{
"port": 9094,
"protocol": "http",
"stubs": [{
"responses": [
{ "proxy": {
"to": "https://XXX-SERVER_NAME?wsdl",
"mode": "proxyAlways",
"predicateGenerators": [
{
"matches": {
"method": true,
"path": true,
"query": true
}
}
]
}
}
]
}]
}

I set up port 9094 to call HTTPS and this is the response

{"errors":[{"message":"Hostname/IP doesn't match certificate's altnames","name":"Error","stack":"Error: Hostname/IP doesn't match certificate's altnames\n at SecurePair. (tls.js:1379:23)\n at SecurePair.EventEmitter.emit (events.js:92:17)\n at SecurePair.maybeInitFinished (tls.js:982:10)\n at CleartextStream.read as _read\n at CleartextStream.Readable.read (_stream_readable.js:320:10)\n at EncryptedStream.write as _write\n at doWrite (_stream_writable.js:226:10)\n at writeOrBuffer (_stream_writable.js:216:5)\n at EncryptedStream.Writable.write (_stream_writable.js:183:11)\n at write (_stream_readable.js:583:24)"}]}

This is the response I got from MB. I’ve tried using my hostname, and IP, I got the same result.

  1.    {
    
  2.        "protocol": "http",
    
  3.        "port": 9094,
    
  4.        "requests": [],
    
  5.        "stubs": [{
    
  6.            "responses": [{
    
  7.                "proxy": {
    
  8.                    "to": "XXX-SERVER-XXX?wsdl",
    
  9.                    "mode": "proxyAlways",
    
  10.                 "predicateGenerators": [{
    
  11.                     "matches": {
    
  12.                         "method": true,
    
  13.                         "path": true,
    
  14.                         "query": true
    
  15.                     }
    
  16.                 }]
    
  17.             }
    
  18.         }]
    
  19.     }],
    
  20.     "_links": {
    
  21.         "self": {
    
  22.             "href": "http://127.0.0.1:2525/imposters/9097"
    
  23.         }
    
  24.     }
    
  25. }
    

Here is the response for 9095 when I try to connect to HTTP
Not Found
HTTP Error 404. The requested resource is not found.
Let me know if you need any more information

@bbyars
Owner
bbyars commented Dec 31, 2014

fixed in v1.1.72

@bbyars bbyars closed this Dec 31, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment