代码格式调整:packages/mitmproxy/**/*.js

This commit is contained in:
王良
2024-11-15 12:09:33 +08:00
parent 48132c39b0
commit 3e586bfd9b
56 changed files with 431 additions and 369 deletions

View File

@@ -2,21 +2,21 @@ const http = require('http')
const options = {
headers: {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36'
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36',
},
lookup (hostname, options, callback) {
const ip = '106.52.191.148'
console.log('lookup')
callback(null, ip, 4)
}
},
}
const request = http.get('http://test.target/', options, function (response) {
response.on('data', function (data) {
const request = http.get('http://test.target/', options, (response) => {
response.on('data', (data) => {
process.stdout.write(data)
})
})
request.on('error', function (error) {
request.on('error', (error) => {
console.log(error)
})