![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@sansamour/node-socks
Advanced tools
A simple SOCKS/HTTP/HTTPS proxy implementation and demo proxy in node.js <http://nodejs.org>
_.
It supports both socks5/socks4/socks4a/http/https proxy You can run it easily as:
node ./test/socksproxy5.js
node ./test/socksproxy4.js
node ./test/httpproxy.js
Under windows you can run run.vbs
This will create a proxy socks5 at 127.0.0.1
on port 8888
.
This will create a proxy socks4 socks4a at 127.0.0.1
on port 9999
.
This will create a proxy http https at 127.0.0.1
on port 8080
.
All with user:password is user:pass
You can use this as a good starting point for writing a proxy or a tunnel!
npm install @sansamour/node-socks
// TypeScript
import { http, socks4, socks5 } from '@sansamour/node-socks';
// ES6 JavaScript
import { http, socks4, socks5 } from '@sansamour/node-socks';
// Legacy JavaScript
const socks5 = require('@sansamour/node-socks').socks5;
http.createServer(options);
socks4.createServer(options);
socks5.createServer(options);
authorization - (< function >validateUserPassword) A function with two parameters (user, password).
fileBannedIPs - File location with content banned IPs semicolon separated.
onAccept - A callback function with four parameters (socket, info, accept, deny)
ssh - < object > {host, port, username, password}
timeout (< number > miliseconds) default: 60000
Create SOCKS v5 server: socks5://user:pass@127.0.0.1:9999 with file banned IPs ip.txt
(semicolon separated)
const { socks5 } = require('@sansamour/node-socks')
socks5.createServer({
authorization: function(u,p){
return u == 'user' && p == 'pass'
},
port: 9999,
fileBannedIPs: './ip.txt'
});
With SOCKS v4/v4a proxy server support only Username Authentication (no Password).
Create SOCKS v4/v4a server: socks4://user:anypass@127.0.0.1:8888 with file banned IPs ip.txt
(semicolon separated)
const { socks4 } = require('@sansamour/node-socks')
socks4.createServer({
authorization:function(u){
return u == 'user'
},
port: 8888,
fileBannedIPs: './ip.txt'
});
SSH relay example
const { socks5 } = require('@sansamour/node-socks')
socks5.createServer({
port: 9999,
ssh:{
host: '103.92.28.100',
port: 22,
username: 'root',
password: 'xxxx'
}
});
Example with onAccept: limit number of clients
onAccept:function(socket, info, accept, deny){
console.log(info)
if(info.numClients > 100){
return deny()
}
accept();
}
Associate Example (UDP Relay) with SOCKS v5
Detail about this package. http://tutorialspots.com/nodejs-create-socks4socks4asocks5httphttps-proxy-server-with-authentication-5653.html
Please read the SOCKS 5 specifications for more information on how to use Associate. http://www.ietf.org/rfc/rfc1928.txt
This work is licensed under the MIT license.
FAQs
A simple SOCKS/HTTP/HTTPS proxy implementation
We found that @sansamour/node-socks demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.