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

[lwip] I think I'm sending ip packets (containg tcp) to netif correctly, but TcpListener doesn't seem to get new connections. I think it's a good idea to add tests to the lwip sub crate to help debugging #11

Open
ghost opened this issue Mar 28, 2019 · 0 comments

Comments

@ghost
Copy link

ghost commented Mar 28, 2019

I managed to wire up rust-tun on Linux, but the detail is not essential, the important thing is to send IpPacket to the lwip component.

In lib.rs, in start_send of impl Sink for DnsTcpStack, with some logging, I can see that IpPacket is successfully parsed, when I use any program that uses tcp, it can be recognized as well, and self.tcp.start_send is called, then it's sent to netif, which goes into territory I'm not familiar with.

In src/tcp.rs, I see a TcpListener listening on 0.0.0.0, but when I add a simple println line in listener.for_each, nothing happends.

I think a simple test can be added to the lwip wrapper to confirm that when certain IpPacket is sent to it, the listener gets new connections. tun does not need to be involved in this test at all.

lwip wrapper still seems to be the easiest to use for a tun to socks program, I think I'm just a tiny step away from benefiting from it, it would be great if there is a test or example for the wrapper, it will help me a lot, right now I don't know how to start debugging, as I don't know either lwip or C

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

No branches or pull requests

0 participants