代理拦截器:添加日志。
parent
1b96838e67
commit
d6a1d40cf6
|
@ -3,6 +3,8 @@ module.exports = {
|
|||
requestIntercept (context, interceptOpt, req, res, ssl, next) {
|
||||
const { rOptions, log, RequestCounter } = context
|
||||
|
||||
const originHostname = rOptions.hostname
|
||||
|
||||
let proxyConf = interceptOpt.proxy
|
||||
if (RequestCounter && interceptOpt.backup && interceptOpt.backup.length > 0) {
|
||||
// 优选逻辑
|
||||
|
@ -67,7 +69,11 @@ module.exports = {
|
|||
if (rOptions.agent && rOptions.agent.options) {
|
||||
rOptions.agent.options.rejectUnauthorized = false
|
||||
}
|
||||
log.info('proxy intercept: hostname:', originHostname, ', target:', proxyTarget, ', sni replace servername:', rOptions.servername)
|
||||
} else {
|
||||
log.info('proxy intercept: hostname:', originHostname, ', target:', proxyTarget)
|
||||
}
|
||||
|
||||
return true
|
||||
},
|
||||
is (interceptOpt) {
|
||||
|
|
Loading…
Reference in New Issue