MCPcopy
hub / github.com/Dokploy/dokploy / getPublicIpWithFallback

Function getPublicIpWithFallback

packages/server/src/wss/utils.ts:17–37  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15};
16
17export const getPublicIpWithFallback = async () => {
18 // @ts-ignore
19 let ip = null;
20 try {
21 ip = await publicIpv4();
22 } catch (error) {
23 console.log(
24 "Error obtaining public IPv4 address, falling back to IPv6",
25 // @ts-ignore
26 error.message,
27 );
28 try {
29 ip = await publicIpv6();
30 } catch (error) {
31 // @ts-ignore
32 console.error("Error obtaining public IPv6 address", error.message);
33 ip = null;
34 }
35 }
36 return ip;
37};
38
39export const readValidDirectory = (
40 directory: string,

Callers 2

validateLicenseKeyFunction · 0.90
auth.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected