From nobody Wed May 24 08:39:44 2023 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QR4PD2tmKz4CQvg; Wed, 24 May 2023 08:39:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QR4PD2Pjhz43nY; Wed, 24 May 2023 08:39:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1684917584; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=si2E5ZNwBsWqkddWfvwstfyRYEZYTjviEOdEQZ74dx0=; b=O8ErP36V7Ke6wehEmhnsOMsfer+XvPXbqI88q/DtZZIa51yqKMo2NHO/iaL9B2Wj0Ko5Zr o1RUszQOSvbZcMNZubhKOInCKouMNNDARPh9TzvyWTzMAZtAIEoHX6PVqqIS0T7F7bk+jC Q3zLvyfd6dLTykp+b865rXg5ITS0yLAmqfVXPOedyjGVHtWIfQMZQO1PC3VYg+KCLGn71+ zZFXqyH1doMkaiCGkHr/E2scb06jQu35LvY8ko1xBxnwpG03S2HzYn9vz6UIgIn2s+7sDK IteR5JQDFHFGYMagjEWGEJwK5+mDgJKbvUInGyKtwSldvLaETPLTRVrGyg3xmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1684917584; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=si2E5ZNwBsWqkddWfvwstfyRYEZYTjviEOdEQZ74dx0=; b=tgA/rUadMcbu19SsK2NeIds9XL1oth9h5bKRbO6PwaURKLgudcpinUxfwEADZMPMXYN7WJ laIqmrPTUOpao70DAgzilMZwkVB8kQhbaIrHRots9IiQ7oQvqgWF+BFO1zgnoUDi6dmCqH 3Lw13QmQUZSH9Ixh6YaGbV2xWHHvO7BDUfYMvuJyNvi0pm0Y2FkvldC7e+cVUup5Chz3KA TjDWbeAHEOnNZykI8ucCytJB5zv6rAkuOkdR/bFXJVtoiJKaIGDoegiF2fA6BlGFdSjhHi 88OgUny003Rt7E4KkI7L7wf8v6ctWB0nn+BvcV7ZV9dXtDHrOsf9uyG+TyWPoQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1684917584; a=rsa-sha256; cv=none; b=LdXA0tAxyw9I5+Wc2lFjZjdQVUreUqtaCZtbGCgC3K8Ld3T9RCF5h8WNo0gQvrZlFYdF39 x0rALyuuxMYW6gpLlb2CKBMiSqLSAXrJxqDN3yHNdkfwLunv3qqdWmhMBJALV8/NXMx3Ji 8eYNAFu+Qmm8s0z9i71dcciURnhL0aUR6Ec/z6/LUoHkaZ8H3B9+OXPZfXHniE4D9jftG+ gB1oqQQQ9IxF7umy+8fv8zmlL6dwjtbJDEjLcEEXuGPDtWJn8uZbNvx/ar1xclXfQ9C3it qkMl8SD+wz0DDhwLoGs9TpVSNNLozjLTYoNvZsdjJGuM4kYh0JT6tYTlg3kjKg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QR4PD1TG8zbmQ; Wed, 24 May 2023 08:39:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 34O8diq2012189; Wed, 24 May 2023 08:39:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 34O8diw0012188; Wed, 24 May 2023 08:39:44 GMT (envelope-from git) Date: Wed, 24 May 2023 08:39:44 GMT Message-Id: <202305240839.34O8diw0012188@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Yuri Victorovich Subject: git: a8179bb67ad1 - main - =?utf-8?Q?net/clash:=20Update=201.12.0=20=E2=86=92=201.16.0?= List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: yuri X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a8179bb67ad193b93e508a19094191f980ad70e8 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=a8179bb67ad193b93e508a19094191f980ad70e8 commit a8179bb67ad193b93e508a19094191f980ad70e8 Author: Yuri Victorovich AuthorDate: 2023-05-24 08:08:05 +0000 Commit: Yuri Victorovich CommitDate: 2023-05-24 08:39:40 +0000 net/clash: Update 1.12.0 → 1.16.0 PR: 271597 Reported by: Yonas Yanfa --- net/clash/Makefile | 3 +-- net/clash/distinfo | 10 ++++---- .../files/patch-listener_redir_tcp__freebsd.go | 28 +++++++++++++++------- 3 files changed, 25 insertions(+), 16 deletions(-) diff --git a/net/clash/Makefile b/net/clash/Makefile index e308d11de325..2deb01200835 100644 --- a/net/clash/Makefile +++ b/net/clash/Makefile @@ -1,7 +1,6 @@ PORTNAME= clash DISTVERSIONPREFIX= v -DISTVERSION= 1.12.0 -PORTREVISION= 4 +DISTVERSION= 1.16.0 CATEGORIES= net MAINTAINER= yuri@FreeBSD.org diff --git a/net/clash/distinfo b/net/clash/distinfo index b114acab1d26..826e3b0eab80 100644 --- a/net/clash/distinfo +++ b/net/clash/distinfo @@ -1,5 +1,5 @@ -TIMESTAMP = 1674933715 -SHA256 (go/net_clash/clash-v1.12.0/v1.12.0.mod) = 5fb76465113613d05ad5c4a630847ebe66f11b24daf4c0a3b8c4a110dbed8382 -SIZE (go/net_clash/clash-v1.12.0/v1.12.0.mod) = 1444 -SHA256 (go/net_clash/clash-v1.12.0/v1.12.0.zip) = 6ee01ed27a5dd7877f9ce303b93b5d8e47d7c02706f063b6d8b18f78246dbda1 -SIZE (go/net_clash/clash-v1.12.0/v1.12.0.zip) = 271817 +TIMESTAMP = 1684915246 +SHA256 (go/net_clash/clash-v1.16.0/v1.16.0.mod) = 28ce820304dbf04d92b768d784195ccd9526cf49bc2363111688cf6ea528d5b3 +SIZE (go/net_clash/clash-v1.16.0/v1.16.0.mod) = 1617 +SHA256 (go/net_clash/clash-v1.16.0/v1.16.0.zip) = 5cc5f78cc5192d82581464c62a0b30402df25595d2534101f288180f7c43b4c8 +SIZE (go/net_clash/clash-v1.16.0/v1.16.0.zip) = 391354 diff --git a/net/clash/files/patch-listener_redir_tcp__freebsd.go b/net/clash/files/patch-listener_redir_tcp__freebsd.go index b1a770082637..7544e08723ab 100644 --- a/net/clash/files/patch-listener_redir_tcp__freebsd.go +++ b/net/clash/files/patch-listener_redir_tcp__freebsd.go @@ -1,12 +1,22 @@ ---- listener/redir/tcp_freebsd.go.orig 2022-05-22 03:30:14 UTC +--- listener/redir/tcp_freebsd.go.orig 2023-05-24 08:01:04 UTC +++ listener/redir/tcp_freebsd.go -@@ -38,7 +38,8 @@ func parserPacket(conn net.Conn) (socks5.Addr, error) - func getorigdst(fd uintptr) (socks5.Addr, error) { - raw := syscall.RawSockaddrInet4{} - siz := uint32(unsafe.Sizeof(raw)) -- if err := socketcall(GETSOCKOPT, fd, syscall.IPPROTO_IP, SO_ORIGINAL_DST, uintptr(unsafe.Pointer(&raw)), uintptr(unsafe.Pointer(&siz)), 0); err != nil { -+ _, _, err := syscall.Syscall6(syscall.SYS_GETSOCKOPT, fd, syscall.IPPROTO_IP, SO_ORIGINAL_DST, uintptr(unsafe.Pointer(&raw)), uintptr(unsafe.Pointer(&siz)), 0); +@@ -46,7 +46,8 @@ func parserPacket(conn net.Conn) (socks5.Addr, error) + func getorigdst(fd uintptr) (netip.AddrPort, error) { + addr := unix.RawSockaddrInet4{} + size := uint32(unsafe.Sizeof(addr)) +- if err := socketcall(GETSOCKOPT, fd, syscall.IPPROTO_IP, SO_ORIGINAL_DST, uintptr(unsafe.Pointer(&addr)), uintptr(unsafe.Pointer(&size)), 0); err != nil { ++ _, _, err := syscall.Syscall6(syscall.SYS_GETSOCKOPT, fd, syscall.IPPROTO_IP, SO_ORIGINAL_DST, uintptr(unsafe.Pointer(&addr)), uintptr(unsafe.Pointer(&size)), 0); + if err != 0 { - return nil, err + return netip.AddrPort{}, err } - + port := binary.BigEndian.Uint16((*(*[2]byte)(unsafe.Pointer(&addr.Port)))[:]) +@@ -56,7 +57,8 @@ func getorigdst(fd uintptr) (netip.AddrPort, error) { + func getorigdst6(fd uintptr) (netip.AddrPort, error) { + addr := unix.RawSockaddrInet6{} + size := uint32(unsafe.Sizeof(addr)) +- if err := socketcall(GETSOCKOPT, fd, syscall.IPPROTO_IPV6, IP6T_SO_ORIGINAL_DST, uintptr(unsafe.Pointer(&addr)), uintptr(unsafe.Pointer(&size)), 0); err != nil { ++ _, _, err := syscall.Syscall6(syscall.SYS_GETSOCKOPT, fd, syscall.IPPROTO_IPV6, IP6T_SO_ORIGINAL_DST, uintptr(unsafe.Pointer(&addr)), uintptr(unsafe.Pointer(&size)), 0); ++ if err != 0 { + return netip.AddrPort{}, err + } + port := binary.BigEndian.Uint16((*(*[2]byte)(unsafe.Pointer(&addr.Port)))[:])