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: add vpn-daemon run subcommand for windows#15526

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
deansheather merged 2 commits intomainfromdean/vpn-daemon-windows
Nov 18, 2024

Conversation

deansheather
Copy link
Member

coder vpn-daemon run will instantiate a RPC connection with the specified pipe handles and communicate with the (yet to be implemented) parent process.

The tests don't ensure that the tunnel is actually usable yet as the tunnel functionality isn't implemented, but it does make sure that the tunnel tries to read from the RPC pipe.

Closes#14735

`coder vpn-daemon run` will instantiate a RPC connection with thespecified pipe handles and communicate with the (yet to be implemented)parent process.The tests don't ensure that the tunnel is actually usable yet as thetunnel functionality isn't implemented, but it does make sure that thetunnel tries to read from the RPC pipe.
}
defer tunnel.Close()

<-ctx.Done()
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

I don't think this will actually work in practice, should we add atunnel.Wait() or something instead to wait for the *vpn.Tunnel to encounter a permanent error?

ethanndickson reacted with eyes emoji
Copy link
Contributor

Choose a reason for hiding this comment

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

The way a clean shutdown should work is that the manager sends StopRequest, the tunnel replies StopResponse and closes the tunnel → manager pipe. We could also add atunnel.Wait() that returns a channel that closes when the tunnel is fully shut down like this, so that we can also have the daemon process exit.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

I will add atunnel.Wait() in a follow-up PR tomorrow since tunnel is mostly unimplemented anyways

spikecurtis reacted with thumbs up emoji
Also removes --log-file functionality for now.
@deansheatherdeansheather merged commitd63bd21 intomainNov 18, 2024
26 checks passed
@deansheatherdeansheather deleted the dean/vpn-daemon-windows branchNovember 18, 2024 11:10
{
Flag: "rpc-read-handle",
Env: "CODER_VPN_DAEMON_RPC_READ_HANDLE",
Description: "The handle for the pipe to read from the RPC connection.",
Copy link
Contributor

Choose a reason for hiding this comment

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

Slightly ambiguous about which process's perspective. Is the daemon reading (and therefore the caller of this command is writing) or vice versa?

{
Flag: "rpc-write-handle",
Env: "CODER_VPN_DAEMON_RPC_WRITE_HANDLE",
Description: "The handle for the pipe to write to the RPC connection.",
Copy link
Contributor

Choose a reason for hiding this comment

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

Ditto on ambiguity on which process is reading and which is writing

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

@spikecurtisspikecurtisspikecurtis approved these changes

@ethanndicksonethanndicksonethanndickson approved these changes

Assignees

@deansheatherdeansheather

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Add a coder daemon subcommand for Windows
3 participants
@deansheather@spikecurtis@ethanndickson

[8]ページ先頭

©2009-2025 Movatter.jp