-
-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I create multiple instances with different IP's but always primary IP is used for connections made from the server to WAN #47
Comments
@Ozguner, can you show how you are instantiating the module with code? |
Hello @brozeph ! I set these IPs in listening part. My expectation was, outgoing connection would go from the IP we listen to.
|
Although I am late to respond, this may be good for reference. I have a fork of simple-socks that can do what you're looking for. The API is very different (promises, different method names). It can be found here. import { createProxyServer, waitForConnect } from '@e9x/simple-socks';
import { connect } from 'net';
const ip = '66.249.70.28';
const server = createProxyServer({
async connect(port, host) {
// create unconnected socket
const socket = connect({
port,
host,
localAddress: ip,
});
await waitForConnect(socket);
return socket;
},
});
server.listen(1080, ip, () => {
console.log('SOCKS5 proxy server started on %s:1080', ip);
}); |
There is also this lib if needed https://github.com/lqqyt2423/node-socks5-server/blob/master/examples/1-normal.js |
I have eth0 and eth0:1, eth0:2 total of 3 different IP's.
I have for example proxy server instances running on 10.0.0.1 and 10.0.0.2 and 10.0.0.3.
However, regardless of which socks5 server IP I connect to from a client, I get assigned 10.0.0.1
The text was updated successfully, but these errors were encountered: