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

is it possible to add entire subnets as ip_addrs, to create a server that acts as if there are any number of servers? #282

Closed
ghost opened this issue Mar 27, 2019 · 8 comments

Comments

@ghost
Copy link

ghost commented Mar 27, 2019

In the server example, IpCidr is used to add ip_addrs

https://github.com/m-labs/smoltcp/blob/master/examples/server.rs#L56

But after trying, it only responds as 192.168.69.1. Can I create a server that responds to any tcp connection destined to any address in 192.168.69.0/24? I want it to act as though there are servers listening on 192.168.69.1, 192.168.69.2, 192.168.69.3, etc. I tried 192.168.69.0/24, but it's just the one address 192.168.69.0.

tun2socks is a tool that seems to accept tcp connections going to any address, as long as it goes through a tun device. It's similar to what i'd like to do.

@whitequark
Copy link
Contributor

That's not currently supported. It is also a very niche feature, and I'm hesitant to make everyone who uses smoltcp pay for this in terms of space or complexity.

@ghost
Copy link
Author

ghost commented Mar 28, 2019

I understand. Continuing lookinf for a lwip alternative or wrapper in Rust. For those interested in similar features, there is a wrapper at https://github.com/iCepa/tun2tor/tree/master/lwip . although I couldn't lwip's tcp listener working. It may be easier to build something on top of smoltcp after all

@whitequark
Copy link
Contributor

I have an lwip wrapper you could possibly use (although it's not currently published as a separate project), but wouldn't it be easier to fork smoltcp?

@ghost
Copy link
Author

ghost commented Mar 28, 2019

@whitequark wow, I'd love to try your lwip wrapper, is it published as part of another project? I'm looking for the easiest way to create a wildcard tcp listener on a tun or tap device, judging by code from the iCepa project, the usage is quite simple, but I'm at a loss when there are problems outside the Rust part because I'm totally unfamiliar with C

@ghost
Copy link
Author

ghost commented Mar 29, 2019

i'm interested, i scrolled through your repositories but couldn't find one that looks like a repository with a lwip wrapper inside

@whitequark
Copy link
Contributor

@ghost
Copy link
Author

ghost commented Mar 30, 2019

thanks a lot! i'm looking into it

@whitequark
Copy link
Contributor

The issue author deleted their account, closing.

Sorry, something went wrong.

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

No branches or pull requests

1 participant