feat: add native Tailscale support via libts3ds#7
Open
cadl wants to merge 13 commits into
Open
Conversation
800068f to
c18db6f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Important
This is a stacked PR based on #6 (
cadl:codex/macos-keychain-fish-terminal). It contains the seven commits from #6 plus one Tailscale feature commit (800068f). Please review/merge #6 first; this PR can then be reviewed as the Tailscale layer on top. It should not be treated as an independent replacement for #6.Summary
Add optional native Tailscale support to DSSH so a Nintendo 3DS can join a tailnet and open the existing SSH session through a Tailscale IPv4 address or MagicDNS name.
The transport is provided by
cadl/libts3ds, an experimental native C client derived from MicroLink. It does not embed Go, runtailscaled, or claim ABI compatibility with the officialtailscale/libtailscale. DSSH pins the audited source to the hardware-validatedlibts3ds-v0.1.0commit through a git submodule.What changed
ts3ds_connthrough its send/receive callbacks while retaining native BSD sockets when Tailscale is disabled;tailscale_auth_keyis configured, or when a persisted state file already exists;dssh-3dsand state path tosdmc:/3ds/3dssh/tailscale.state;direct,peer-relay, andderpdiagnostic builds;Build behavior
The actual build command is unchanged: after dependencies and generated assets are prepared, run
makeas before. The Makefile buildslibts3ds/build/3ds/libts3ds.afirst and then links DSSH.The clone/setup step changes because libts3ds and its private lwIP are submodules:
git clone --recurse-submodules https://github.com/Fishason/DSSH.git cd DSSHFor an existing non-recursive clone:
If the submodule is missing,
makenow prints that exact recovery command instead of failing later with a missing directory or header.Configuration
Setting an auth key enables Tailscale. After initial registration, the persisted state also enables it without requiring the key. The state file contains machine, WireGuard, and DISCO private identity keys and must be protected like an SSH private key.
Validation
bash tools/test_config.sh;bash tools/test_terminal.sh;bash tools/test_ime.sh;make clean testin the pinned libts3ds submodule;-Werrorlibts3ds build and DSSH.3dsxlink;--recurse-submodulesclone verified to fetchlibts3ds-v0.1.0and its pinned lwIP, then build successfully after the project's existing font/dictionary generation steps;Fishason/DSSH:mainis clean.中文说明
本 PR 在 #6 的代码基础上增加原生 Tailscale 支持,请先审阅/合并 #6。Tailscale 部分由
cadl/libts3ds提供,并通过 submodule 固定到真机验证过的libts3ds-v0.1.0。构建命令仍然是原来的
make;变化仅是 clone 时需要--recurse-submodules,已有 clone 执行git submodule update --init --recursive。该实现可自动选择直连、Peer Relay 和 DERP,并已在 3DS 真机验证 SSH、待机恢复和长连接。它是非官方社区实现,与 Tailscale Inc. 无隶属或背书关系。