revert
parent
468eb62137
commit
8085681675
|
@ -5,10 +5,10 @@ const jsonApi = require('@docmirror/mitmproxy/src/json')
|
||||||
// 启动服务
|
// 启动服务
|
||||||
const mitmproxyPath = './mitmproxy'
|
const mitmproxyPath = './mitmproxy'
|
||||||
async function startup () {
|
async function startup () {
|
||||||
const banner = fs.readFileSync('./src/banner.txt')
|
const banner = fs.readFileSync('./banner.txt')
|
||||||
console.log(banner.toString())
|
console.log(banner.toString())
|
||||||
|
|
||||||
const configPath = './src/user_config.json5'
|
const configPath = './user_config.json5'
|
||||||
if (fs.existsSync(configPath)) {
|
if (fs.existsSync(configPath)) {
|
||||||
const file = fs.readFileSync(configPath)
|
const file = fs.readFileSync(configPath)
|
||||||
const userConfig = jsonApi.parse(file.toString())
|
const userConfig = jsonApi.parse(file.toString())
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<!doctype html>
|
<!DOCTYPE html>
|
||||||
<html lang="en" style="height: 100%">
|
<html lang="en" style="height: 100%">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
|
|
|
@ -264,7 +264,7 @@ export default {
|
||||||
this.$confirm({
|
this.$confirm({
|
||||||
title: '确定要恢复出厂设置吗?',
|
title: '确定要恢复出厂设置吗?',
|
||||||
width: 610,
|
width: 610,
|
||||||
content: h => (
|
content: (h) => (
|
||||||
<div class="restore-factory-settings">
|
<div class="restore-factory-settings">
|
||||||
<hr />
|
<hr />
|
||||||
<p>
|
<p>
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
const abort = require('./impl/req/abort')
|
|
||||||
|
|
||||||
const baiduOcr = require('./impl/req/baiduOcr')
|
|
||||||
const cacheReq = require('./impl/req/cacheReq')
|
|
||||||
// request interceptor impls
|
// request interceptor impls
|
||||||
const OPTIONS = require('./impl/req/OPTIONS.js')
|
const OPTIONS = require('./impl/req/OPTIONS.js')
|
||||||
const proxy = require('./impl/req/proxy')
|
|
||||||
|
|
||||||
const redirect = require('./impl/req/redirect')
|
|
||||||
|
|
||||||
const requestReplace = require('./impl/req/requestReplace')
|
|
||||||
const sni = require('./impl/req/sni')
|
|
||||||
|
|
||||||
const success = require('./impl/req/success')
|
const success = require('./impl/req/success')
|
||||||
|
const redirect = require('./impl/req/redirect')
|
||||||
|
const abort = require('./impl/req/abort')
|
||||||
|
const cacheReq = require('./impl/req/cacheReq')
|
||||||
|
|
||||||
|
const requestReplace = require('./impl/req/requestReplace')
|
||||||
|
|
||||||
|
const proxy = require('./impl/req/proxy')
|
||||||
|
const sni = require('./impl/req/sni')
|
||||||
|
|
||||||
|
const baiduOcr = require('./impl/req/baiduOcr')
|
||||||
|
|
||||||
// response interceptor impls
|
// response interceptor impls
|
||||||
const OPTIONSHeaders = require('./impl/res/AfterOPTIONSHeaders')
|
const OPTIONSHeaders = require('./impl/res/AfterOPTIONSHeaders')
|
||||||
|
@ -23,18 +23,12 @@ const script = require('./impl/res/script')
|
||||||
module.exports = [
|
module.exports = [
|
||||||
// request interceptor impls
|
// request interceptor impls
|
||||||
OPTIONS,
|
OPTIONS,
|
||||||
success,
|
success, redirect, abort, cacheReq,
|
||||||
redirect,
|
|
||||||
abort,
|
|
||||||
cacheReq,
|
|
||||||
requestReplace,
|
requestReplace,
|
||||||
proxy,
|
proxy, sni,
|
||||||
sni,
|
|
||||||
baiduOcr,
|
baiduOcr,
|
||||||
|
|
||||||
// response interceptor impls
|
// response interceptor impls
|
||||||
OPTIONSHeaders,
|
OPTIONSHeaders, cacheRes, responseReplace,
|
||||||
cacheRes,
|
|
||||||
responseReplace,
|
|
||||||
script,
|
script,
|
||||||
]
|
]
|
||||||
|
|
|
@ -9,17 +9,12 @@ const res = {
|
||||||
|
|
||||||
const proxyRes = {
|
const proxyRes = {
|
||||||
rawHeaders: [
|
rawHeaders: [
|
||||||
'Content-Type',
|
'Content-Type', 'application/json; charset=utf-8',
|
||||||
'application/json; charset=utf-8',
|
'Content-Length', '2',
|
||||||
'Content-Length',
|
'ETag', 'W/"2"',
|
||||||
'2',
|
'Date', 'Thu, 01 Jan 1970 00:00:00 GMT',
|
||||||
'ETag',
|
'Connection', 'keep-alive'
|
||||||
'W/"2"',
|
]
|
||||||
'Date',
|
|
||||||
'Thu, 01 Jan 1970 00:00:00 GMT',
|
|
||||||
'Connection',
|
|
||||||
'keep-alive',
|
|
||||||
],
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const newHeaders = {
|
const newHeaders = {
|
||||||
|
|
Loading…
Reference in New Issue