mirror of
https://github.com/http-party/node-http-proxy.git
synced 2025-12-08 20:59:18 +00:00
force cipher AES128-GCM-SHA256 in https tests
This commit is contained in:
parent
1dabda241f
commit
c33d1616cd
@ -35,6 +35,7 @@ describe('lib/http-proxy.js', function() {
|
|||||||
ssl: {
|
ssl: {
|
||||||
key: fs.readFileSync(path.join(__dirname, 'fixtures', 'agent2-key.pem')),
|
key: fs.readFileSync(path.join(__dirname, 'fixtures', 'agent2-key.pem')),
|
||||||
cert: fs.readFileSync(path.join(__dirname, 'fixtures', 'agent2-cert.pem')),
|
cert: fs.readFileSync(path.join(__dirname, 'fixtures', 'agent2-cert.pem')),
|
||||||
|
ciphers: 'AES128-GCM-SHA256',
|
||||||
}
|
}
|
||||||
}).listen(ports.proxy);
|
}).listen(ports.proxy);
|
||||||
|
|
||||||
@ -65,6 +66,7 @@ describe('lib/http-proxy.js', function() {
|
|||||||
var source = https.createServer({
|
var source = https.createServer({
|
||||||
key: fs.readFileSync(path.join(__dirname, 'fixtures', 'agent2-key.pem')),
|
key: fs.readFileSync(path.join(__dirname, 'fixtures', 'agent2-key.pem')),
|
||||||
cert: fs.readFileSync(path.join(__dirname, 'fixtures', 'agent2-cert.pem')),
|
cert: fs.readFileSync(path.join(__dirname, 'fixtures', 'agent2-cert.pem')),
|
||||||
|
ciphers: 'AES128-GCM-SHA256',
|
||||||
}, function (req, res) {
|
}, function (req, res) {
|
||||||
expect(req.method).to.eql('GET');
|
expect(req.method).to.eql('GET');
|
||||||
expect(req.headers.host.split(':')[1]).to.eql(ports.proxy);
|
expect(req.headers.host.split(':')[1]).to.eql(ports.proxy);
|
||||||
@ -105,6 +107,7 @@ describe('lib/http-proxy.js', function() {
|
|||||||
var source = https.createServer({
|
var source = https.createServer({
|
||||||
key: fs.readFileSync(path.join(__dirname, 'fixtures', 'agent2-key.pem')),
|
key: fs.readFileSync(path.join(__dirname, 'fixtures', 'agent2-key.pem')),
|
||||||
cert: fs.readFileSync(path.join(__dirname, 'fixtures', 'agent2-cert.pem')),
|
cert: fs.readFileSync(path.join(__dirname, 'fixtures', 'agent2-cert.pem')),
|
||||||
|
ciphers: 'AES128-GCM-SHA256',
|
||||||
}, function(req, res) {
|
}, function(req, res) {
|
||||||
expect(req.method).to.eql('GET');
|
expect(req.method).to.eql('GET');
|
||||||
expect(req.headers.host.split(':')[1]).to.eql(ports.proxy);
|
expect(req.headers.host.split(':')[1]).to.eql(ports.proxy);
|
||||||
@ -119,6 +122,7 @@ describe('lib/http-proxy.js', function() {
|
|||||||
ssl: {
|
ssl: {
|
||||||
key: fs.readFileSync(path.join(__dirname, 'fixtures', 'agent2-key.pem')),
|
key: fs.readFileSync(path.join(__dirname, 'fixtures', 'agent2-key.pem')),
|
||||||
cert: fs.readFileSync(path.join(__dirname, 'fixtures', 'agent2-cert.pem')),
|
cert: fs.readFileSync(path.join(__dirname, 'fixtures', 'agent2-cert.pem')),
|
||||||
|
ciphers: 'AES128-GCM-SHA256',
|
||||||
},
|
},
|
||||||
secure: false
|
secure: false
|
||||||
}).listen(ports.proxy);
|
}).listen(ports.proxy);
|
||||||
@ -150,6 +154,7 @@ describe('lib/http-proxy.js', function() {
|
|||||||
var source = https.createServer({
|
var source = https.createServer({
|
||||||
key: fs.readFileSync(path.join(__dirname, 'fixtures', 'agent2-key.pem')),
|
key: fs.readFileSync(path.join(__dirname, 'fixtures', 'agent2-key.pem')),
|
||||||
cert: fs.readFileSync(path.join(__dirname, 'fixtures', 'agent2-cert.pem')),
|
cert: fs.readFileSync(path.join(__dirname, 'fixtures', 'agent2-cert.pem')),
|
||||||
|
ciphers: 'AES128-GCM-SHA256',
|
||||||
}).listen(ports.source);
|
}).listen(ports.source);
|
||||||
|
|
||||||
var proxy = httpProxy.createProxyServer({
|
var proxy = httpProxy.createProxyServer({
|
||||||
@ -191,6 +196,7 @@ describe('lib/http-proxy.js', function() {
|
|||||||
var ownServer = https.createServer({
|
var ownServer = https.createServer({
|
||||||
key: fs.readFileSync(path.join(__dirname, 'fixtures', 'agent2-key.pem')),
|
key: fs.readFileSync(path.join(__dirname, 'fixtures', 'agent2-key.pem')),
|
||||||
cert: fs.readFileSync(path.join(__dirname, 'fixtures', 'agent2-cert.pem')),
|
cert: fs.readFileSync(path.join(__dirname, 'fixtures', 'agent2-cert.pem')),
|
||||||
|
ciphers: 'AES128-GCM-SHA256',
|
||||||
}, function (req, res) {
|
}, function (req, res) {
|
||||||
proxy.web(req, res, {
|
proxy.web(req, res, {
|
||||||
target: 'http://127.0.0.1:' + ports.source
|
target: 'http://127.0.0.1:' + ports.source
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user