Skip to content
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

Ignore certain ports? #14

Open
GoogleCodeExporter opened this issue Apr 13, 2015 · 6 comments
Open

Ignore certain ports? #14

GoogleCodeExporter opened this issue Apr 13, 2015 · 6 comments

Comments

@GoogleCodeExporter
Copy link

I realise this is more of a request than a bug but I am not sure where requests 
should be posted?

What I'd really like to be able to do is exclude certain ports from the system. 
So for example a mail client connecting to IMAP or SMTP would bypass tun2socks 
and use the default gateway.

This is fairly easy to do in Linux but Windows does not offer any sort of per 
port routing.

I'm fairly sure it would be easy enough to have tun2socks detect those ports 
and do something different with them in case they are part of the exclusion 
list but where I'm getting stuck is the what..

Say a connection for port 25 comes in and tun2socks decides it should not send 
this connection through the SOCKS as far as I can tell there is no way for it 
to establish the connection as any attempt to make the connection directly will 
end up right back into tun2socks due to the system routing rules?

The only way I can think of is perhaps intercepting the packets with dest port 
25 from within tun2socks and forwarding them to another gateway kind of like an 
ip tables packet filter in linux..

That is where I'm getting stuck as packet processing goes beyond my knowledge 
of badvpn.

Is what I'm suggesting even possible?

I'm happy to look at the code if you could point me in the right direction?

Many thanks

Original issue reported on code.google.com by [email protected] on 3 Dec 2013 at 9:36

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant