Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • N node-http-proxy
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 482
    • Issues 482
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 102
    • Merge requests 102
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • http ... PARTY!
  • node-http-proxy
  • Issues
  • #915
Closed
Open
Issue created Nov 28, 2015 by Administrator@rootContributor

node-http-proxy SSL connections is not working.

Created by: BadBoy21

I have set up a proxy node-http-proxy server on port 8009. and my actual http server on port 3000. But it seems like they are not working. My code looks like this:

var fs = require('fs');

var httpProxy = require('http-proxy');

httpProxy.createServer({
  target: 'http://127.0.0.1:3000/',
  ssl: {
    key: fs.readFileSync('./sslcerts/key.pem', 'utf8'),
    cert: fs.readFileSync('./sslcerts/cert.pem', 'utf8'),
    passphrase: 'password1'
  },
  requestCert: true,
  rejectUnauthorized: true
}).listen(8009, function(){
  console.log("SSL server started listening on port 8009");
});

// thats the node http proxy

var http = require('http');

var port = 3000;
app.set('port', port);

var server = http.createServer(app);

server.listen(port, function(){
  console.log("Express non-SSL server listening on port " + port);
});

Now I have used wireshark to sniff the traffic and there was a post field that was sending data to the https://localhost:8009/ server and it was viewable in plain text on the localhost loopback interface. Not only that, the wireshark protocol detected was http (not TLS/SSL like its supposed to show). there was no indication of TLS handshake or anything like that. I have tested with other legitimate webpages with wireshark and what I found was those webpages have a TLS key handshake like the client hello/server hello stuff but that was not seen when I used wireshark on a request to localhost:8009 https server. So I would like to know what I could do to fix the issue and go through the steps of the TLS server hello/client hello handshake and make sure the data is not being sent on plaintext but rather, encrypted.

Assignee
Assign to
Time tracking