Support for IPv6 subnets #12
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
First of all, thanks for making this. This is a really interesting project.
I was wondering how hard it would be to support IPv6-only subnets. By the looks of it, only https://github.com/skx/simple-vpn/blob/master/cmd_server.go#L170 assumes IPv4 and that's because we treat it like a string instead of like an IP address.
The use-case is when using simple-vpn within another private subnet, using IPv6-only makes it easy to pick an IP block that won't clash with the rest of the subnet.
Would you be able to support this use-case? Open to PRs?
I'd be open to a pull-request which allowed the CIDR range to be an IPv6 range, presumably within
fd00::/8as a /48 or /64.For example:
or:
Instead of:
Ranges picked via the unique local address-ranges.
I think there shouldn't be too many changes required, but I'd probably not make them alone.
I was trying to setup the project locally and I get the following error when I try to get dependencies:
Did the
waterlibrary change their interface for tapConfig? It might be worth usingdepto lock down the dependencies to specific versionsWorks for me, on a fresh host:
I'll assume you're on Linux, if you're not that might explain it. Otherwise I see you ran "
go get ./...", but not "go build ..".Thanks for checking, what version of golang are you using? I'll ensure I'm using the same version.
Edit: I'm on Mac OS X
Ahh Mac OS X is probably going to cause you some pain :/
I see the same thing:
Looks like that's noted in the source:
You'd need to switch to tun-based stuff instead of tap-based stuff, and I'm not sure how much would be required to change :/
That's OK, I'll use a linux VM instead. Easy enough to switch
Ha, hit an OOM trying to start the server using a relatively "small" subnet like
subnet = fde4:8dba:82e1:fefe::/64because it tried to create theassignedmap with 2^64 entries 😆A couple of options to deal with this:
I think it's OK to call out the limitation and just use smaller subnets. What do you think?
I think I'd go for the second choice, because people will assume /64s - that's the most common routed range for IPv6 after all. (Pretty much the same as using a /32.)
So lazy allocation seems like it would make most sense.