https support
This commit is contained in:
parent
a08fa4d353
commit
cf27817687
6
index.js
6
index.js
@ -1,7 +1,9 @@
|
||||
const fs = require('fs'),
|
||||
request = require('request'),
|
||||
Agent = require('socks5-http-client/lib/Agent'),
|
||||
host = process.argv[2]
|
||||
host = process.argv[2],
|
||||
Agent = host.match(/https.*/) ?
|
||||
require('socks5-https-client/lib/Agent') :
|
||||
require('socks5-http-client/lib/Agent')
|
||||
|
||||
fs.readFile(__dirname + '/path.txt', 'utf8', (err, data) => {
|
||||
if (err) console.log(err)
|
||||
|
@ -17,6 +17,7 @@
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"request": "^2.87.0",
|
||||
"socks5-http-client": "^1.0.4"
|
||||
"socks5-http-client": "^1.0.4",
|
||||
"socks5-https-client": "^1.2.1"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user