Skip to content

Standard SSL proxy #12

@smsohan

Description

@smsohan

Hi, I'm trying to set up a standard SSL proxy with MITM for some research work. Say, I'm trying to create a MITM proxy for *.github.com

I've created the local CA as in the example and I see the sockets created in /tmp as per the example ssl proxy. However, I cannot get it to serve data as intended.

echo $http_proxy
http://localhost:9000
echo $HTTPS_PROXY
https://localhost:9000
export HTTPS_PROXY=http://localhost:9000
curl https://api.github.com/users/smsohan/repos
curl: (56) Proxy CONNECT aborted 

Here's my code, see the transSslPort config is set to undefined.

var myProxy = proxy.createProxyServer({
                                        sslCerts: sslCerts,
                                        sslSockDir: '/tmp',
                                        port: 9000,
                                        // transSslPort: 9001,
                                        via: 'my test proxy/1.1' // use false to turn off via
                                    });

In the code, I see the server waits for an upgrade event to start the sslProxy. Do I need to do something to trigger this? Thank you for your amazing code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions