Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/modules/remote-access/useNetBirdClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ export const useNetBirdClient = () => {
}, []);

const connect = useCallback(
async (privateKey: string): Promise<boolean> => {
async (privateKey: string, deviceName?: string): Promise<boolean> => {
await initialize();

if (typeof (window as any).NetBirdClient !== "function") {
Expand All @@ -178,6 +178,10 @@ export const useNetBirdClient = () => {
privateKey,
logLevel: "info",
managementURL: config.apiOrigin,
// Report the name the peer was registered with, so its meta does not
// change on the first sync (a meta change pushes a network map to
// every peer in the account).
...(deviceName ? { deviceName } : {}),
});

await netBirdClient.current.start();
Expand Down Expand Up @@ -293,7 +297,7 @@ export const useNetBirdClient = () => {
},
`/${peerId}/temporary-access`,
);
return await connect(keyPairs.privateKey);
return await connect(keyPairs.privateKey, name);
} catch (error) {
netBirdStore.setState({ status: NetBirdStatus.DISCONNECTED });
throw error;
Expand Down
2 changes: 1 addition & 1 deletion src/utils/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ const loadConfig = (): Config => {
googleTagManagerID: configJson?.googleTagManagerID || undefined,
authServiceUrl: configJson?.authServiceUrl ?? undefined,
wasmPath:
configJson?.wasmPath || "https://pkgs.netbird.io/wasm/client/v0.76.3",
configJson?.wasmPath || "https://pkgs.netbird.io/wasm/client/v0.78.0",
Comment thread
lixmal marked this conversation as resolved.
licensed: configJson?.licensed === "true",
cloud: configJson?.cloud === "true",
agentNetworkOnly: configJson?.agentNetworkOnly === "true",
Expand Down
Loading