Skip to content

Conversation

@lixmal
Copy link
Collaborator

@lixmal lixmal commented Oct 16, 2025

Describe your changes

  • Make upstream dns handler use netstack (js only)
  • Make dns interceptor use netstack to reach the dns forwarder of routing peers
  • Refactor status methods: ParseToJSON()JSON(), ParseToYAML()YAML(), ParseGeneralSummary()GeneralSummary(), ParseToFullDetailSummary()FullDetailSummary()
  • Move toProtoFullStatus()FullStatus.ToProto() method
  • Include events in FullStatus (remove GetEvents RPC)
  • Add embed client methods: Status(), GetLatestSyncResponse(), SetLogLevel()
  • Add netbird js client debug methods:
    • ping(hostname)
    • pingTCP(hostname, port)
    • status()
    • statusDetail()
    • statusSummary()
    • setLogLevel(level)
    • getSyncResponse()
  • Fix embed client Start() to track connect instead of cancel for state checking
  • Fix embed client Stop() to cancel context and clean up properly
  • Skip STUN/TURN probes on JS/WASM platform

Issue ticket number and link

Stack

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)

By submitting this pull request, you confirm that you have read and agree to the terms of the Contributor License Agreement.

Documentation

Select exactly one:

  • I added/updated documentation for this change
  • Documentation is not needed for this change (explain why)

Docs PR URL (required if "docs added" is checked)

Paste the PR link from https://github.com/netbirdio/docs here:

https://github.com/netbirdio/docs/pull/__

@Copilot Copilot AI review requested due to automatic review settings October 16, 2025 00:00
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes netstack upstream DNS functionality and adds debug methods to the WASM client. The main focus is refactoring status-related functionality and improving DNS handling in netstack environments.

Key Changes:

  • Refactors status methods to use method receivers instead of standalone functions
  • Enhances netstack DNS support with upstream resolution through tunnel
  • Adds comprehensive debug methods (ping, status reporting, log level control) to WASM client

Reviewed Changes

Copilot reviewed 27 out of 27 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
client/wasm/cmd/main.go Adds extensive debug methods including ping, status reporting, and log level management
client/status/status.go Refactors standalone functions to methods on OutputOverview struct
client/internal/dns/upstream*.go Updates DNS resolvers to use netstack when available for tunnel routing
client/internal/peer/status.go Moves protobuf conversion logic and adds event history to FullStatus
client/server/server.go Removes duplicate protobuf conversion code, delegates to peer status
client/embed/embed.go Adds status, sync response, and log level management methods

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@lixmal lixmal changed the title [client] Fix netstack upstream dns and add debug methods [client] Fix netstack upstream dns and add wasm debug methods Oct 16, 2025
@lixmal lixmal marked this pull request as ready for review October 16, 2025 00:43
@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant