fix style
parent
3e586bfd9b
commit
b5fe1ca9ed
|
@ -37,7 +37,7 @@ config.resetDefault()
|
||||||
const server = modules.server
|
const server = modules.server
|
||||||
const serverStart = server.start
|
const serverStart = server.start
|
||||||
|
|
||||||
function newServerStart({ mitmproxyPath }) {
|
function newServerStart ({ mitmproxyPath }) {
|
||||||
return serverStart({ mitmproxyPath, plugins: plugin })
|
return serverStart({ mitmproxyPath, plugins: plugin })
|
||||||
}
|
}
|
||||||
server.start = newServerStart
|
server.start = newServerStart
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
server: require('./server'),
|
server: require('./server'),
|
||||||
proxy: require('./proxy'),
|
proxy: require('./proxy'),
|
||||||
plugin: require('./plugin')
|
plugin: require('./plugin'),
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,20 +5,17 @@ const execute = Shell.execute
|
||||||
const executor = {
|
const executor = {
|
||||||
async windows (exec, { certPath }) {
|
async windows (exec, { certPath }) {
|
||||||
const cmds = [`start "" "${certPath}"`]
|
const cmds = [`start "" "${certPath}"`]
|
||||||
// eslint-disable-next-line no-unused-vars
|
await exec(cmds, { type: 'cmd' })
|
||||||
const ret = await exec(cmds, { type: 'cmd' })
|
|
||||||
return true
|
return true
|
||||||
},
|
},
|
||||||
async linux (exec, { certPath }) {
|
async linux (exec, { certPath }) {
|
||||||
const cmds = [`sudo cp ${certPath} /usr/local/share/ca-certificates`, 'sudo update-ca-certificates ']
|
const cmds = [`sudo cp ${certPath} /usr/local/share/ca-certificates`, 'sudo update-ca-certificates ']
|
||||||
// eslint-disable-next-line no-unused-vars
|
await exec(cmds)
|
||||||
const ret = await exec(cmds)
|
|
||||||
return true
|
return true
|
||||||
},
|
},
|
||||||
async mac (exec, { certPath }) {
|
async mac (exec, { certPath }) {
|
||||||
const cmds = [`open "${certPath}"`]
|
const cmds = [`open "${certPath}"`]
|
||||||
// eslint-disable-next-line no-unused-vars
|
await exec(cmds, { type: 'cmd' })
|
||||||
const ret = await exec(cmds, { type: 'cmd' })
|
|
||||||
return true
|
return true
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
|
const path = require('path')
|
||||||
const log4js = require('log4js')
|
const log4js = require('log4js')
|
||||||
const config = require('../config/index')
|
const config = require('../config/index')
|
||||||
const path = require('path')
|
|
||||||
|
|
||||||
const level = process.env.NODE_ENV === 'development' ? 'debug' : 'info'
|
const level = process.env.NODE_ENV === 'development' ? 'debug' : 'info'
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,6 @@ describe('ssl.verify', () => {
|
||||||
// eslint-disable-next-line no-undef
|
// eslint-disable-next-line no-undef
|
||||||
it('regex.test.js', async () => {
|
it('regex.test.js', async () => {
|
||||||
// https.request('https://test1.gagedigital.com/ssltest.php')
|
// https.request('https://test1.gagedigital.com/ssltest.php')
|
||||||
|
|
||||||
await request()
|
await request()
|
||||||
|
|
||||||
// expect(ret).be.ok
|
// expect(ret).be.ok
|
||||||
|
|
|
@ -19,6 +19,6 @@ if (options.agent.options) {
|
||||||
|
|
||||||
request(options, (error, response, body) => {
|
request(options, (error, response, body) => {
|
||||||
console.info('error:', error, '\n---------------------------------------------------------------------------\n'
|
console.info('error:', error, '\n---------------------------------------------------------------------------\n'
|
||||||
+ 'response:', response, '\n---------------------------------------------------------------------------\n'
|
+ 'response:', response, '\n---------------------------------------------------------------------------\n'
|
||||||
+ 'body:', body)
|
+ 'body:', body)
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue