socks: --listen with a bare IPv6 address fails with "too many colons in address"

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

@RaphaelFakhri がすでに取り組んでいます。

2026年10月24日 から。

  • #155 @RaphaelFakhri による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
30/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
go
領域
cli

調査の方向性

The faulty logic lives in normalizeListenAddrPort (likely in socks.go). Read that function and the --listen flag parsing to see how addresses are normalized. Done when unbracketed IPv6 like ::1 is bracketed before appending :0, and tailcat socks --listen=::1 true listens on [::1] with an OS-assigned port.

索引モデルが issue の本文から書いたものです。

説明

What is the issue?

The socks help says --listen takes [address]:port, where "a bare address means an OS-assigned port". That works for IPv4 (--listen=127.0.0.1) and bracketed IPv6 (--listen=[::1]), but an unbracketed IPv6 address fails before the proxy starts:

$ tailcat socks --listen=::1 true
2026/10/24 15:58:20 listen tcp: address ::1:0: too many colons in address

--listen=:: fails the same way (:::0).

normalizeListenAddrPort appends ":0" to any value that is neither host:port nor a bare port, so an IPv6 address turns into an ambiguous ::1:0 that net.Listen rejects.

Steps to reproduce
  1. Run tailcat socks --listen=::1 true.
  2. The command exits with too many colons in address.

Expected: the proxy listens on [::1] with an OS-assigned port, as it does for --listen=[::1].

Version

main at 52fbad3.

主要言語
Go
スター
8.8k
フォーク
404
平均マージ
3時間 48分
マージ済み PR(30日)
1

環境構築

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

はじめの一歩

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

tailscale/tailcat のほかの issue

tailscale/tailcat の issue をすべて見る

似ている issue

Go の issue をもっと見る

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

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