MCPcopy Index your code
hub / github.com/SamNet-dev/snix / ipv6ToStr

Function ipv6ToStr

cfworker/worker.js:195–201  ·  view source on GitHub ↗
(b)

Source from the content-addressed store, hash-verified

193}
194function isUUID(s) { return /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(s); }
195function ipv6ToStr(b) {
196 const parts = [];
197 for (let i = 0; i < 16; i += 2) {
198 parts.push(((b[i] << 8) | b[i+1]).toString(16));
199 }
200 return parts.join(":");
201}
202function toUint8(x) { return x instanceof ArrayBuffer ? new Uint8Array(x) : new Uint8Array(x.buffer || x); }
203function b64UrlToUint8(s) {
204 if (!s) return new Uint8Array(0);

Callers 1

parseVLESSHeaderFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected