Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore(vpn): upsert agents with their network status#15659

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ethanndickson merged 1 commit intomainfromethan/vpn-agents-netstatus
Dec 5, 2024

Conversation

ethanndickson
Copy link
Member

@ethanndicksonethanndickson commentedNov 26, 2024
edited
Loading

Closes#14734.

  • Each outgoing agent upsertion also includes the timestamp of the last wireguard handshake.
  • Agent upsertions will be created, for existing agents, with an updated last handshake time on a regular, fixed, interval of 10 seconds.

@ethanndicksonGraphite App
Copy link
MemberAuthor

ethanndickson commentedNov 26, 2024
edited
Loading

vpn/tunnel.go Outdated
resp.Msg = &TunnelMessage_PeerUpdate{
PeerUpdate:convertWorkspaceUpdate(state),
PeerUpdate:update,
Copy link
Member

Choose a reason for hiding this comment

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

Is it OK to send a nilPeerUpdate in the response?

Copy link
MemberAuthor

@ethanndicksonethanndicksonDec 2, 2024
edited
Loading

Choose a reason for hiding this comment

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

Good catch, I don't think we should.

For pushed updates, if there's no active connection (for whatever reason, should be impossible once the tunnel has started), we'll just send a nil last handshake time.

For requested updates, I think we have to send a nilPeerUpdate if we can't callCurentWorkspaceState.

@@ -175,8 +175,6 @@ linters-settings:
- name: modifies-value-receiver
- name: package-comments
- name: range
- name: range-val-address
- name: range-val-in-closure
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

spikecurtis reacted with thumbs up emoji
@@ -238,7 +241,6 @@ linters:
- errname
- errorlint
- exhaustruct
- exportloopref
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

default:
t.logger.Warn(t.ctx, "unhandled manager request", slog.F("request", msg))
return resp
}
if err := req.sendReply(resp); err != nil {
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

The original code also sentresp := &TunnelMessage{} as a reply for thedefault: branch, so I assume it's still fine.

Copy link
Contributor

@spikecurtisspikecurtis left a comment

Choose a reason for hiding this comment

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

LGTM

@ethanndicksonethanndickson changed the base branch fromethan/vpn-client tographite-base/15659December 5, 2024 02:30
@ethanndicksonethanndickson changed the base branch fromgraphite-base/15659 tomainDecember 5, 2024 02:31
@ethanndicksonethanndickson merged commita0a5683 intomainDec 5, 2024
31 checks passed
@ethanndicksonethanndickson deleted the ethan/vpn-agents-netstatus branchDecember 5, 2024 03:22
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@spikecurtisspikecurtisspikecurtis approved these changes

@deansheatherdeansheatherAwaiting requested review from deansheather

@johnstcnjohnstcnAwaiting requested review from johnstcn

Assignees

@ethanndicksonethanndickson

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Build a CoderVPN dynamic library and include it in the full coder binary
4 participants
@ethanndickson@johnstcn@spikecurtis@deansheather

[8]ページ先頭

©2009-2025 Movatter.jp