simlock tunnel refuses plain http to a Tailscale gateway

オープン
#1,372 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
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分
マージ済み PR(30日)
454

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

callstackincubator/simlock のほかの issue

callstackincubator/simlock の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。