Skip to content

Commit

Permalink
调整 githubSpeedUp.js 拦截器的优先级。
Browse files Browse the repository at this point in the history
  • Loading branch information
wangliang181230 committed Apr 9, 2024
1 parent e67f051 commit 724f09f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const proxyApi = require('./proxy')

module.exports = {
name: 'githubSpeedUp',
priority: 131,
priority: 121,
requestIntercept (context, interceptOpt, req, res, ssl, next) {
const { rOptions, log } = context

Expand Down
2 changes: 1 addition & 1 deletion packages/mitmproxy/src/lib/interceptor/impl/req/proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function doProxy (proxyConf, rOptions, req, interceptOpt) {

module.exports = {
name: 'proxy',
priority: 121,
priority: 122,
doProxy,
requestIntercept (context, interceptOpt, req, res, ssl, next) {
const { rOptions, log, RequestCounter } = context
Expand Down
2 changes: 1 addition & 1 deletion packages/mitmproxy/src/lib/interceptor/impl/req/sni.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
name: 'sni',
priority: 122,
priority: 123,
requestIntercept (context, interceptOpt, req, res, ssl, next) {
const { rOptions, log } = context

Expand Down
6 changes: 2 additions & 4 deletions packages/mitmproxy/src/lib/interceptor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@ const abort = require('./impl/req/abort')

const cacheReq = require('./impl/req/cacheReq')

const githubSpeedUp = require('./impl/req/githubSpeedUp')
const proxy = require('./impl/req/proxy')
const sni = require('./impl/req/sni')

const githubSpeedUp = require('./impl/req/githubSpeedUp')

// response interceptor impls
const cacheRes = require('./impl/res/cacheRes')
const script = require('./impl/res/script')
Expand All @@ -21,8 +20,7 @@ module.exports = [
OPTIONS,
success, redirect, abort,
cacheReq,
proxy, sni,
githubSpeedUp,
githubSpeedUp, proxy, sni,

// response interceptor impls
cacheRes, script
Expand Down

0 comments on commit 724f09f

Please sign in to comment.