Skip to content

Ignore certain ports? #14

@GoogleCodeExporter

Description

@GoogleCodeExporter
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 mike...@gmail.com on 3 Dec 2013 at 9:36

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions