Skip to content

Panic: Net: Unknown address type (Xray 26.6.22) #6364

Closed

Description

@fanymagnet

Hi. I have panic on last version.

panic: Net: Unknown address type.
goroutine 14021 [running]:
github.com/xtls/xray-core/common/net.DestinationFromAddr({0x0?, 0x0?})
        github.com/xtls/xray-core/common/net/destination.go:25 +0xf9
github.com/xtls/xray-core/proxy/tun.(*Handler).HandleConnection(0x1af531938c60, {0x169a610, 0x1af5346dea80}, {{0x168de50, 0x1af53179e1f0}, 0x1bb, 0x2})
        github.com/xtls/xray-core/proxy/tun/handler.go:146 +0x11c
github.com/xtls/xray-core/proxy/tun.(*stackGVisor).Start.func1.1(0x1af531e7d400)
        github.com/xtls/xray-core/proxy/tun/stack_gvisor.go:87 +0x330
created by github.com/xtls/xray-core/proxy/tun.(*stackGVisor).Start.func1 in goroutine 14020
        github.com/xtls/xray-core/proxy/tun/stack_gvisor.go:70 +0xaa
$ xray --version
Xray 26.6.22 (Xray, Penetrates Everything.) Custom (go1.26.4 linux/amd64)
A unified platform for anti-censorship.

Activity

  1. RPRX commented on Jun 23, 2026

    @RPRX
    Member

    暂无 Linux 以外的 issue,可能是和 #6338 相关的?虽然没提到 tun_linux.go @KiGamji @LjhAUMEM @Fangliding

  2. Fangliding commented on Jun 23, 2026

    @Fangliding
    Member

    gvisor的问题 如果调这个函数的时候对端关的很快tcp已经关闭了(比如经典的tcpping) 这个call会返回nil 和一般的 net.Conn 契约不同 然后nil会被识别成未知的地址类型 加个检查或者额外构建传入就是

  3. added a commit that references this issue on Jul 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions