xiaojunnuo
4 years ago
12 changed files with 76 additions and 30 deletions
@ -0,0 +1,2 @@
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const start = require('./start/index.js') |
@ -1,6 +1,7 @@
|
||||
const proxy = require('./impl/proxy') |
||||
const redirect = require('./impl/redirect') |
||||
const abort = require('./impl/abort') |
||||
|
||||
const modules = [proxy, redirect] |
||||
const modules = [proxy, redirect, abort] |
||||
|
||||
module.exports = modules |
||||
|
@ -0,0 +1,17 @@
|
||||
const https = require('https') |
||||
|
||||
var 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' |
||||
} |
||||
} |
||||
|
||||
var request = https.get('https://api.github.com/', options, function (response) { |
||||
response.on('data', function (data) { |
||||
process.stdout.write(data) |
||||
}) |
||||
}) |
||||
|
||||
request.on('error', function (error) { |
||||
console.log(error) |
||||
}) |
Loading…
Reference in new issue