Skip to content

ruby: add TsnetAccept export, complete Ruby API bindings, and expand test coverage#52

Merged
raggi merged 1 commit intomainfrom
raggi/ruby
Feb 28, 2026
Merged

ruby: add TsnetAccept export, complete Ruby API bindings, and expand test coverage#52
raggi merged 1 commit intomainfrom
raggi/ruby

Conversation

@raggi
Copy link
Member

@raggi raggi commented Feb 27, 2026

Move tailscale_accept from a C recvmsg implementation to a Go export (TsnetAccept) that uses syscall.Recvmsg and ParseUnixRights, giving proper error reporting through recErr.

Add missing Ruby FFI bindings and wrapper methods for TsnetGetIps, TsnetGetRemoteAddr, and TsnetAccept. Fix Listener#accept to use TsnetAccept with IO.select, and Listener#close to use IO.for_fd.

Guard TsnetClose against never-started servers to avoid a panic in tsnet.Server.Close when internal state is nil.

Add substantially more test coverage.

…test coverage

Move tailscale_accept from a C recvmsg implementation to a Go export
(TsnetAccept) that uses syscall.Recvmsg and ParseUnixRights, giving
proper error reporting through recErr.

Add missing Ruby FFI bindings and wrapper methods for TsnetGetIps,
TsnetGetRemoteAddr, and TsnetAccept. Fix Listener#accept to use
TsnetAccept with IO.select, and Listener#close to use IO.for_fd.

Guard TsnetClose against never-started servers to avoid a panic in
tsnet.Server.Close when internal state is nil.

Add substantially more test coverage.
Copy link

@dylan-tailscale dylan-tailscale left a comment

Choose a reason for hiding this comment

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

lgtm

@raggi raggi merged commit 5e89501 into main Feb 28, 2026
4 of 5 checks passed
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