feat: optional Tailscale Funnel public access via codeg-tsnet sidecar#337
Open
ijry wants to merge 10 commits into
Open
feat: optional Tailscale Funnel public access via codeg-tsnet sidecar#337ijry wants to merge 10 commits into
ijry wants to merge 10 commits into
Conversation
added 10 commits
July 14, 2026 13:36
Capture the approved design for optional public Web Service access via a Go tsnet sidecar (codeg-tsnet), with independent state dir, desktop OAuth, server auth-key, and Windows-friendly packaging.
Break the approved Funnel sidecar design into task-sized implementation steps covering codeg-tsnet, Rust controller, UI, packaging, and PR.
Introduce a pure Go tsnet sidecar with loopback control API, independent state directory, browser/auth-key login hooks, and Funnel reverse-proxy lifecycle for public HTTPS access without touching system Tailscale.
Introduce codeg-tsnet bootstrap/status protocol types, binary resolution, and Funnel status mapping under an independent state directory.
Hook Funnel enable/disable into desktop and codeg-server web start/stop paths, and expose status/enable/login via Tauri commands and HTTP routes.
Add Funnel status UI, API client wrappers, and i18n keys so desktop users can enable Funnel, open login, and copy the public URL.
Ship codeg-tsnet via prepare-sidecars, Tauri externalBin, release matrix, installers, and Docker images next to codeg-mcp.
Document CODEG_TS_FUNNEL, auth key, state dir, hostname, and private userspace node behavior in EN/ZH README.
Create 0-byte placeholders for both Tauri externalBin sidecars in build.rs, and fix prettier formatting in the Funnel settings component/test.
Static export typecheck failed because Funnel copy toast referenced a missing copyFailed message key.
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.
中文
背景
为 Codeg Web 服务提供可选的公网 HTTPS 访问能力,同时保持本地 Web 服务独立可用,且不接管系统 Tailscale。
方案
codeg-tsnet(tsnetuserspace),以 sidecar 模式支持 Windows/macOS/Linuxhttp://127.0.0.1:<webPort><CODEG_DATA_DIR>/tailscale(可用CODEG_TS_STATE_DIR覆盖)codeg-<data_dir hash 前 8 hex>(可用CODEG_TS_HOSTNAME覆盖)127.0.0.1,请求头X-Codeg-Tsnet-TokenCODEG_TS_AUTHKEYfunnelEnabled+ 环境变量CODEG_TS_FUNNELcodeg-mcp:prepare-sidecars、TauriexternalBin、release.yml、Docker、installers验证
cd codeg-tsnet && go test ./...✅cargo test --no-default-features --lib --jobs 1 web::tailscale✅(7 passed)pnpm exec vitest run src/components/settings/web-service-funnel-section.test.tsx✅(2 passed)cargo check --no-default-features --jobs 1 --bin codeg-server✅English
Background
Add optional public HTTPS access for the Codeg Web Service without taking over system Tailscale, and without breaking local web availability.
Approach
codeg-tsnet(tsnetuserspace) for Windows/macOS/Linuxhttp://127.0.0.1:<webPort><CODEG_DATA_DIR>/tailscale(CODEG_TS_STATE_DIRoverride)codeg-<first 8 hex of data_dir hash>(CODEG_TS_HOSTNAMEoverride)X-Codeg-Tsnet-TokenCODEG_TS_AUTHKEYrequired when Funnel is enabledfunnelEnabledand/orCODEG_TS_FUNNELcodeg-mcpacross prepare-sidecars, Tauri externalBin, release matrix, Docker, and installersValidation
cd codeg-tsnet && go test ./...✅cargo test --no-default-features --lib --jobs 1 web::tailscale✅ (7 passed)pnpm exec vitest run src/components/settings/web-service-funnel-section.test.tsx✅ (2 passed)cargo check --no-default-features --jobs 1 --bin codeg-server✅