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