优化sni拦截器
parent
8384b86d71
commit
ecbec8e11e
|
@ -64,7 +64,7 @@ module.exports = {
|
|||
|
||||
if (interceptOpt.sni != null) {
|
||||
rOptions.servername = interceptOpt.sni
|
||||
if (rOptions.agent) {
|
||||
if (rOptions.agent && rOptions.agent.options) {
|
||||
rOptions.agent.options.rejectUnauthorized = false
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ module.exports = {
|
|||
const { rOptions, log } = context
|
||||
if (interceptOpt.sni != null) {
|
||||
rOptions.servername = interceptOpt.sni
|
||||
if (rOptions.agent) {
|
||||
if (rOptions.agent && rOptions.agent.options) {
|
||||
rOptions.agent.options.rejectUnauthorized = false
|
||||
}
|
||||
log.info('sni intercept: sni replace servername:', rOptions.hostname, '➜', rOptions.servername)
|
||||
|
|
Loading…
Reference in New Issue