simlock tunnel refuses plain http to a Tailscale gateway

Aperta
#1,372 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
55/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
cli, networking

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
TypeScript
Stelle
535
Fork
21
Merge medio
9h 10m
PR unite (30g)
454

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di callstackincubator/simlock

Tutte le issue di callstackincubator/simlock

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.