cpp-httplib sets IPV6_V6ONLY to false on it's sockets.
On FreeBSD, this makes all ipv4 addresses get get prefixed with ::ffff:
it makes them IPv6 addresses mapped to v4.
This is a partial fix for #2151. The cli will work again.
Something should probably also be adjusted with the httplib.
If you want to, for example, use the `allowManagementFrom` option in
local.conf
you will need to prefix it with "::ffff:", "::ffff:1.2.3.4"
which is a little surprising and inconsistent between BSD and other OSs.
Want to show it in UIs. So need to get it via API.
It's also a pain to look up. You have to go to external docs.
zerotier-cli info -j
```json
"config": {
"settings": {
"allowTcpFallbackRelay": true,
"forceTcpRelay": true,
"homeDir": "/Library/Application Support/ZeroTier/One",
```
```sh
curl -s -X POST "http://localhost:9993/controller/network/abcdabcdabcdabcd/member/1122334455"
```
Would return 200 and ZT_HOME/controller.d/abcdabcdabcdabcd/members/1122334455
would be created. Without a ZT_HOME/controller.d/abcdabcdabcdabcd.json
Then other parts of the system mistakenly think a abcdabcdabcdabcd
network sorta kinda exists and then fail in weird ways.
There was as Windows directory traversal bug in the static
file server feature. We don't use that feature, so we are ok.
We are going to use that feature soon, so we are
taking the opportunity to update.
Add /unstable/controller/network endpoint
Similar to /unstable/controller/network/{id}/member, it returns actual network objects,
instead of just network ids.
Also includes the total network count,
and each network has it's member counts in meta{}.
The current api at /controller/network/1111111111767f2f/member
Lists only the members' ID and revision number.
If you want details, you have to query each specific member.
So if you want to make a members list, and you have
10000 members on a network, you need to make
10000 http requests.
It's also in a hard to specify and use shape
{ [member-id-1]: 13, [member-id-2]: 14, ... }
GET http://localhost:9993/unstable/controller/network/1111111111767f2f/member ->
```
{
data: [ {...member1}, {...member2}, ...],
meta: { totalCount: 4, authorizedCount: 3 }
}
```