simlock tunnel refuses plain http to a Tailscale gateway

未关闭
#1,372 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
55/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
typescript
领域
cli, networking

调研方向

Start in src/cli/commands/tunnel.ts at the LOOPBACK_HOSTS check around line 111 and trace how the tunnel command validates and uses --url and SIMLOCK_URL. Decide which safe opt-in or host-range behavior fits the project, then update the validation and its tests; done means the chosen HTTP case works and rejected URLs still produce a useful error.

由索引模型根据 Issue 内容生成。

描述

request:new
The problem

simlock tunnel takes only https://, or http:// to loopback:

--url must be https://, or http:// only for 127.0.0.1, [::1] or localhost

A gateway reached over Tailscale at http://100.x.y.z:4700 is refused, even though Tailscale already encrypts the link and the rest of the CLI and the console use that URL. To make it work I had to run a small TCP relay from 127.0.0.1:4700 to the Tailscale address, and point SIMLOCK_URL at the relay.

Who runs into this

Anyone with a gateway or worker on another Mac in a tailnet or private network who has no TLS in front of it. This was the first step of a tunnel demo.

What you would like to happen

One of these:

  • allow http:// to Tailscale addresses (100.64.0.0/10, *.ts.net) or private ranges;
  • add an explicit flag or config key (for example --allow-insecure-http) that permits plain http to a named host;
  • at least, make the error say how to proceed (a TLS proxy, or an SSH or loopback relay).
Anything else

The check is LOOPBACK_HOSTS in src/cli/commands/tunnel.ts:111. Relay used:

net.createServer(c => { const u = net.connect(4700, "100.75.181.35"); c.pipe(u).pipe(c); }).listen(4700, "127.0.0.1");

Written by an agent.

主要语言
TypeScript
星标
535
派生
21
平均合并
9 小时 10 分钟
30 天内合并 PR
454

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

callstackincubator/simlock 的其他 Issue

查看 callstackincubator/simlock 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。