You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
dev-sidecar/packages/mitmproxy/test/proxyTest.js

23 lines
551 B

4 years ago
const http = require('http')
8 months ago
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'
4 years ago
},
lookup (hostname, options, callback) {
const ip = '106.52.191.148'
console.log('lookup')
callback(null, ip, 4)
}
}
8 months ago
const request = http.get('http://test.target/', options, function (response) {
response.on('data', function (data) {
process.stdout.write(data)
})
})
request.on('error', function (error) {
console.log(error)
})