@mutagen-d/node-proxy-server
Advanced tools
+1
-1
| { | ||
| "name": "@mutagen-d/node-proxy-server", | ||
| "version": "1.0.0", | ||
| "version": "1.0.1", | ||
| "description": "Http and socks proxy server", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
| const net = require('net'); | ||
| const { createHttpProxy } = require('../src/http-proxy'); | ||
| const { createSocksProxy } = require('../src/socks-proxy'); | ||
| const time = () => new Date().toISOString(); | ||
| const port = 8080; | ||
| const server = net.createServer() | ||
| createSocksProxy(server, { | ||
| keepAliveMsecs: 5000, | ||
| onAuth: (username, password, callback) => { | ||
| if (username === 'test' && password === '123') { | ||
| callback(true) | ||
| } else { | ||
| callback(false) | ||
| } | ||
| }, | ||
| }) | ||
| createHttpProxy(server, { | ||
| authType: 'Basic', | ||
| authRealm: 'Proxy AUTH', | ||
| keepAliveMsecs: 5000, | ||
| onAuth: (auth, callback) => { | ||
| if (auth.username === 'test' && auth.password === '123') { | ||
| callback(true) | ||
| } else { | ||
| callback(false) | ||
| } | ||
| }, | ||
| }) | ||
| server.listen(port, () => console.log(time(), 'server listening port', port)) |
Network access
Supply chain riskThis module accesses the network.
Found 3 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 3 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
3
-40%25152
-3.11%10
-9.09%667
-4.03%