Skip to content

[client] Add missing client meta flags #3898

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

[client] Add missing client meta flags #3898

wants to merge 4 commits into from

Conversation

lixmal
Copy link
Contributor

@lixmal lixmal commented May 29, 2025

Describe your changes

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)
  • Extended the README / documentation, if necessary

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

@Copilot Copilot AI review requested due to automatic review settings May 29, 2025 17:34
@lixmal lixmal changed the base branch from main to add-blocked-inbound May 29, 2025 17:34
@netbirdio netbirdio deleted a comment from Copilot AI May 29, 2025
@lixmal lixmal requested a review from Copilot May 29, 2025 17:50
Copy link
Contributor

@Copilot 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 adds missing client meta flags to ensure that new connection settings—namely LAN blocking, inbound blocking, and lazy connection—are properly propagated throughout the client and server communication.

  • Added three new boolean flags (blockLANAccess, blockInbound, lazyConnectionEnabled) to the proto message and updated client code to use them.
  • Updated all relevant client components (grpc, system info, login, engine, connect) to support and pass the new flags.

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
management/proto/management.proto Added new boolean flags with incremental tag numbers in the Flags message.
management/client/grpc.go Mapped new flags from the Info struct to the proto PeerSystemMeta.
client/system/info.go Updated the Info struct and SetFlags to include the new flags.
client/internal/login.go Updated login and peer registration calls to pass the new flags.
client/internal/engine.go Updated engine functions to include the new flags in meta synchronization.
client/internal/connect.go Updated connect function to pass new flags during login.
Comments suppressed due to low confidence (2)

client/system/info.go:76

  • [nitpick] The SetFlags function now takes many parameters; consider refactoring to accept a configuration struct to improve readability and maintainability.
func (i *Info) SetFlags(

client/internal/engine.go:786

  • [nitpick] With the repeated passing of configuration booleans across multiple functions, consider encapsulating these flags into a dedicated meta struct to reduce redundancy and simplify method signatures.
e.config.DisableServerRoutes,

@netbirdio netbirdio deleted a comment from Copilot AI May 29, 2025
Copy link
Contributor

@Copilot 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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@lixmal lixmal requested a review from Copilot May 29, 2025 17:51
Copy link
Contributor

@Copilot 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 adds three new client meta flags to support finer-grained controls over network behavior. The changes include adding new proto fields in Flags, propagating these flags in client metadata, and updating the corresponding functions across various client components.

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
management/proto/management.proto Added new protobuf fields: BlockLANAccess, BlockInbound, LazyConnectionEnabled to Flags
management/client/grpc.go Updated meta conversion to include the new flags
client/system/info.go Extended Info struct and its SetFlags method with new flags
client/internal/login.go Updated mgm login and registration calls with new flag support
client/internal/engine.go Propagated new flags in engine updates and management synchronization calls
client/internal/connect.go Extended login function to pass along new flags

mlsmaycon
mlsmaycon previously approved these changes May 30, 2025
Base automatically changed from add-blocked-inbound to main June 3, 2025 08:53
@lixmal lixmal dismissed mlsmaycon’s stale review June 3, 2025 08:53

The base branch was changed.

Copy link

sonarqubecloud bot commented Jun 3, 2025

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.

2 participants