pkrumins / nodejs-proxy

A HTTP proxy server written in node.js
http://www.catonmat.net/http-proxy-in-nodejs
413 stars 129 forks source link

where is /path/to/*.* file?(config.js) #26

Closed hktalent closed 5 years ago

hktalent commented 8 years ago

where is /path/to/. file?(config.js)

listen_ssl:fs.readFileSync('/path/to/ca.pem'), fs.readFileSync('/path/to/sub-ca.pem'), cert:fs.readFileSync('/path/to/ssl.crt'), ca:[fs.readFileSync('/path/to/ca.pem'), fs.readFileSync('/path/to/sub-ca.pem')] },{ ip:'::',//all secure ipv6 interfaces port:1443, key:fs.readFileSync('/path/to/ssl.key'), cert:fs.readFileSync('/path/to/ssl.crt'), ca:[fs.readFileSync('/path/to/ca.pem'), fs.readFileSync('/path/to/sub-ca.pem')]

        }   
       ]

where ? thanks

hktalent commented 8 years ago

1、 ls -la /System/Library/OpenSSL/openssl.cnf -rw-r--r-- 1 root wheel 9390 Aug 23 2015 /System/Library/OpenSSL/openssl.cnf 2、 openssl req -new -x509 -keyout ca.key -out ca.crt -config /System/Library/OpenSSL/openssl.cnf Generating a 1024 bit RSA private key .....++++++ ..++++++ writing new private key to 'ca.key' Enter PEM pass phrase:

Verifying - Enter PEM pass phrase:

You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value,

If you enter '.', the field will be left blank.

Country Name (2 letter code) [AU]:CN State or Province Name (full name) [Some-State]:sichuan Locality Name (eg, city) []:chengdu Organization Name (eg, company) [Internet Widgits Pty Ltd]:yinhai Organizational Unit Name (eg, section) []:MTXT Common Name (e.g. server FQDN or YOUR name) []:Summer Email Address []:11602011@qq.com 3、see http://www.mamicode.com/info-detail-906003.html

hktalent commented 8 years ago

openssl genrsa -out ryans-key.pem 1024 openssl req -new -key ryans-key.pem -out ryans-csr.pem openssl x509 -req -in ryans-csr.pem -signkey ryans-key.pem -out ryans-cert.pem