diff --git a/frontend/src/components/NetworkSettings/components/IPv6AutoAssign/IPv6AutoAssign.jsx b/frontend/src/components/NetworkSettings/components/IPv6AutoAssign/IPv6AutoAssign.jsx index 885644b..24cba46 100644 --- a/frontend/src/components/NetworkSettings/components/IPv6AutoAssign/IPv6AutoAssign.jsx +++ b/frontend/src/components/NetworkSettings/components/IPv6AutoAssign/IPv6AutoAssign.jsx @@ -24,25 +24,25 @@ function IPv6AutoAssign({ id, v6AssignMode, handleChange }) { /> ZeroTier RFC4193 (/128 for each device) {v6AssignMode["rfc4193"] && ( -
- fd
- {id.slice(0, 2)}
- :
- {id.slice(2, 6)}
- :
- {id.slice(6, 10)}
- :
- {id.slice(10, 12)}
- 99:93
- __
- :
- ____
- :
- ____
-
-
+
+ fd
+ {id.slice(0, 2)}
+ :
+ {id.slice(2, 6)}
+ :
+ {id.slice(6, 10)}
+ :
+ {id.slice(10, 14)}
+ :
+ {id.slice(14, 16)}
+ 99:93
+ __
+ :
+ ____
+ :
+ ____
+
+ fc
+ {
+ (() => {
+ const sixPlaneID = id.match(/.{1,2}/g)
+ .map((substr, idx, arr) => parseInt(substr, 16) ^ parseInt(arr[idx + 4], 16))
+ .map((byte) => byte.toString(16).toLowerCase())
+ .map((byte) => (byte.length === 2) ? byte : '0' + byte)
+ .slice(0, 4)
+ .join('')
+ return (
+ <>
+ {sixPlaneID.slice(0, 2)}
+ :
+ {sixPlaneID.slice(2, 6)}
+ :
+ {sixPlaneID.slice(6, 8)}
+ >
+ )
+ })()
+ }
+ __
+ :
+ ____
+ :
+ ____
+ :0000:0000:0001
+
+