Skip to content
This repository has been archived by the owner on May 5, 2023. It is now read-only.

Commit

Permalink
Refactor to TypeScript (#46)
Browse files Browse the repository at this point in the history
* Refactor to TypeScript

* Remove `secureProxy`

* Remove 'pathname'

* Don't use `promisify()`

* Remove unused imports

* Cleanup and add `debug`

* Export type

* Allow explicit "type" property

* Fix comment

* Mark `userId` and `password` as non-enumerable

* More debug

* Use `keyof`

* Use `agent-base` v6

* Set default `type` to 5

* Allow `userId` and `password` in `opts`
  • Loading branch information
TooTallNate authored Feb 4, 2020
1 parent d90f7e8 commit 25b90e8
Show file tree
Hide file tree
Showing 8 changed files with 312 additions and 275 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/node_modules
/?.?s
/dist

# mac files
*.DS_Store
Expand Down
96 changes: 0 additions & 96 deletions History.md

This file was deleted.

145 changes: 0 additions & 145 deletions index.js

This file was deleted.

40 changes: 31 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@
"name": "socks-proxy-agent",
"version": "4.0.2",
"description": "A SOCKS proxy `http.Agent` implementation for HTTP and HTTPS",
"main": "./index.js",
"scripts": {
"test": "mocha --reporter spec"
},
"main": "dist/index",
"typings": "dist/index",
"files": [
"index.js"
"dist"
],
"scripts": {
"prebuild": "rimraf dist",
"build": "tsc",
"test": "mocha --reporter spec",
"test-lint": "eslint src --ext .js,.ts",
"prepublishOnly": "npm run build"
},
"repository": {
"type": "git",
"url": "git://github.com/TooTallNate/node-socks-proxy-agent.git"
Expand All @@ -17,6 +22,8 @@
"socks",
"socks4",
"socks4a",
"socks5",
"socks5h",
"proxy",
"http",
"https",
Expand All @@ -28,13 +35,28 @@
"url": "https://github.com/TooTallNate/node-socks-proxy-agent/issues"
},
"dependencies": {
"agent-base": "5",
"socks": "^2.3.2"
"agent-base": "6",
"debug": "4",
"socks": "^2.3.3"
},
"devDependencies": {
"mocha": "^5.1.0",
"@types/debug": "4",
"@types/node": "^12.12.11",
"@typescript-eslint/eslint-plugin": "1.6.0",
"@typescript-eslint/parser": "1.1.0",
"eslint": "5.16.0",
"eslint-config-airbnb": "17.1.0",
"eslint-config-prettier": "4.1.0",
"eslint-import-resolver-typescript": "1.1.1",
"eslint-plugin-import": "2.16.0",
"eslint-plugin-jsx-a11y": "6.2.1",
"eslint-plugin-react": "7.12.4",
"mocha": "^6.2.2",
"proxy": "1",
"raw-body": "^2.3.2",
"socksv5": "TooTallNate/socksv5#fix/dstSock-close-event"
"rimraf": "^3.0.0",
"socksv5": "TooTallNate/socksv5#fix/dstSock-close-event",
"typescript": "^3.5.3"
},
"engines": {
"node": ">= 6"
Expand Down
Loading

0 comments on commit 25b90e8

Please sign in to comment.