
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
socks5-proxy-server
Advanced tools
This module provides a SOCKS5 proxy server with optional authentication and support for forwarding requests through an upstream SOCKS5 proxy.
socksv5
socks
net
ipv6
ipv4
npm install socks5-proxy-server
(async () => {
const proxyServer = await app({ port: 1080, user: "test", password: "pass" });
console.log(
`Socks5 server running on localhost:${proxyServer.port}, ${
proxyServer.user && proxyServer.password ? `user:${proxyServer.user}, password:${proxyServer.password}` : "no authentication"
}`
);
})();
(async () => {
const proxyServer = await app({ port: 1080 });
console.log(
`Socks5 server running on localhost:${proxyServer.port}, ${
proxyServer.user && proxyServer.password ? `user:${proxyServer.user}, password:${proxyServer.password}` : "no authentication"
}`
);
})();
(async () => {
const proxyServer = await app({ user: "test", password: "pass" });
console.log(
`Socks5 server running on localhost:${proxyServer.port}, ${
proxyServer.user && proxyServer.password ? `user:${proxyServer.user}, password:${proxyServer.password}` : "no authentication"
}`
);
})();
(async () => {
const proxyServer = await app(
{ port: 1080, user: "test", password: "pass" },
{ hostProxy: "172.31.24.202", portProxy: 2001, userProxy: "gemink", passwordProxy: "proxys" }
);
console.log(
`Socks5 server running on localhost:${proxyServer.port}, ${
proxyServer.user && proxyServer.password ? `user:${proxyServer.user}, password:${proxyServer.password}` : "no authentication"
}`
);
})();
To stop the proxy server, you can simply terminate the process running the script:
CTRL + C
If running as a background process, use:
kill $(lsof -t -i:1080)
Replace 1080
with the actual port if different.
Alternatively, you can stop the server within the script:
proxyServer.server.close(() => {
console.log("Proxy server closed.");
});
process.on('uncaughtException', (err) => {
console.error("Unhandled exception:", err);
});
process.on('unhandledRejection', (reason, promise) => {
console.error("Unhandled rejection:", reason);
});
findFreePort()
Finds an available port.
validateConfig(config)
Validates the user configuration.
validateProxy(proxy)
Validates the proxy settings.
app(config, proxy)
Starts the SOCKS5 proxy server.
{ server: Object, port: number, user: null, password: null }
if successful.{ server: Object, port: number, user: string, password: string }
if successful.{ server: null, port: null, user: null, password: null }
if an error occurs.FAQs
create local socks5
The npm package socks5-proxy-server receives a total of 0 weekly downloads. As such, socks5-proxy-server popularity was classified as not popular.
We found that socks5-proxy-server demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.