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