Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] New package: xray-1.8.11
@ 2024-05-04  2:04 ziggylee0
  2024-05-04 12:53 ` [PR PATCH] [Updated] " ziggylee0
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: ziggylee0 @ 2024-05-04  2:04 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 770 bytes --]

There is a new pull request by ziggylee0 against master on the void-packages repository

https://github.com/ziggylee0/void-packages master
https://github.com/void-linux/void-packages/pull/50185

New package: xray-1.8.11


#### Testing the changes
- I tested the changes in this PR: **YES**


#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**



#### Local build testing
- I built this PR locally for my native architecture, (x86_64-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - i686




A patch file from https://github.com/void-linux/void-packages/pull/50185.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-50185.patch --]
[-- Type: text/x-diff, Size: 4813 bytes --]

From f3f76bfee7019f17e94ba51941c7cb36892f70a1 Mon Sep 17 00:00:00 2001
From: ziggylee0 <zgglee@proton.me>
Date: Sat, 4 May 2024 09:53:36 +0800
Subject: [PATCH] New package: xray-1.8.11

---
 srcpkgs/xray/files/config.json          | 18 +++++++++++
 srcpkgs/xray/files/xray/run             |  4 +++
 srcpkgs/xray/patches/update-gvisor.diff | 43 +++++++++++++++++++++++++
 srcpkgs/xray/template                   | 38 ++++++++++++++++++++++
 4 files changed, 103 insertions(+)
 create mode 100644 srcpkgs/xray/files/config.json
 create mode 100644 srcpkgs/xray/files/xray/run
 create mode 100644 srcpkgs/xray/patches/update-gvisor.diff
 create mode 100644 srcpkgs/xray/template

diff --git a/srcpkgs/xray/files/config.json b/srcpkgs/xray/files/config.json
new file mode 100644
index 00000000000000..30209ffaad8ed9
--- /dev/null
+++ b/srcpkgs/xray/files/config.json
@@ -0,0 +1,18 @@
+{
+  "inbounds": [{
+    "port": 9000,
+    "protocol": "vmess",
+    "settings": {
+      "clients": [
+        {
+          "id": "1eb6e917-774b-4a84-aff6-b058577c60a5",
+          "level": 1
+        }
+      ]
+    }
+  }],
+  "outbounds": [{
+    "protocol": "freedom",
+    "settings": {}
+  }]
+}
diff --git a/srcpkgs/xray/files/xray/run b/srcpkgs/xray/files/xray/run
new file mode 100644
index 00000000000000..1598e03bd2610f
--- /dev/null
+++ b/srcpkgs/xray/files/xray/run
@@ -0,0 +1,4 @@
+#!/bin/sh
+exec 2>&1
+
+exec chpst -u _xray xray -c /etc/xray.json 2>&1
diff --git a/srcpkgs/xray/patches/update-gvisor.diff b/srcpkgs/xray/patches/update-gvisor.diff
new file mode 100644
index 00000000000000..07277629aa712a
--- /dev/null
+++ b/srcpkgs/xray/patches/update-gvisor.diff
@@ -0,0 +1,43 @@
+"gvisor.dev/gvisor v0.0.0-20231202080848-1f7806d17489" can only get from proxy.golang.org by archive now, it's not in git anymore.
+so update it to fit any other proxy servers. 
+
+
+diff --git a/go.mod b/go.mod
+index 91c1ef0..e55675d 100644
+--- a/go.mod
++++ b/go.mod
+@@ -29,7 +29,7 @@ require (
+ 	golang.zx2c4.com/wireguard v0.0.0-20231211153847-12269c276173
+ 	google.golang.org/grpc v1.63.2
+ 	google.golang.org/protobuf v1.33.0
+-	gvisor.dev/gvisor v0.0.0-20231202080848-1f7806d17489
++	gvisor.dev/gvisor v0.0.0-20240430175013-479de5f2c545
+ 	h12.io/socks v1.0.3
+ 	lukechampine.com/blake3 v1.2.2
+ )
+diff --git a/proxy/wireguard/gvisortun/tun.go b/proxy/wireguard/gvisortun/tun.go
+index 9e9a0b2..65677c4 100644
+--- a/proxy/wireguard/gvisortun/tun.go
++++ b/proxy/wireguard/gvisortun/tun.go
+@@ -157,7 +157,7 @@ func (tun *netTun) Write(buf [][]byte, offset int) (int, error) {
+ // WriteNotify implements channel.Notification
+ func (tun *netTun) WriteNotify() {
+ 	pkt := tun.ep.Read()
+-	if pkt.IsNil() {
++	if pkt == nil {
+ 		return
+ 	}
+ 
+diff --git a/proxy/wireguard/tun.go b/proxy/wireguard/tun.go
+index c2d3032..dc9d212 100644
+--- a/proxy/wireguard/tun.go
++++ b/proxy/wireguard/tun.go
+@@ -194,7 +194,7 @@ func createGVisorTun(localAddresses []netip.Addr, mtu int, handler promiscuousMo
+ 					Timeout: 15 * time.Second,
+ 				})
+ 
+-				handler(xnet.UDPDestination(xnet.IPAddress(id.LocalAddress.AsSlice()), xnet.Port(id.LocalPort)), gonet.NewUDPConn(stack, &wq, ep))
++				handler(xnet.UDPDestination(xnet.IPAddress(id.LocalAddress.AsSlice()), xnet.Port(id.LocalPort)), gonet.NewUDPConn(&wq, ep))
+ 			}(r)
+ 		})
+ 		stack.SetTransportProtocolHandler(udp.ProtocolNumber, udpForwarder.HandlePacket)
diff --git a/srcpkgs/xray/template b/srcpkgs/xray/template
new file mode 100644
index 00000000000000..955533d9d0912a
--- /dev/null
+++ b/srcpkgs/xray/template
@@ -0,0 +1,38 @@
+# Template file for 'xray'
+pkgname=xray
+version=1.8.11
+revision=1
+build_style=go
+go_import_path=github.com/xtls/xray-core
+go_package="${go_import_path}/main"
+hostmakedepends="git"
+short_desc="Network proxy tool"
+maintainer="ziggylee0 <zgglee@proton.me>"
+license="MPL-2.0"
+homepage="https://github.com/XTLS/Xray-core"
+distfiles="https://github.com/XTLS/Xray-core/archive/refs/tags/v${version}.tar.gz
+ https://github.com/Loyalsoldier/v2ray-rules-dat/releases/202404302210/download/geosite.dat
+ https://github.com/Loyalsoldier/v2ray-rules-dat/releases/202404302210/download/geoip.dat"
+checksum="d99ee6008c508abbad6bbb242d058b22efb50fb35867d15447a2b4602ab4b283
+ bd819d0e223c431dc405a4141ebbc0828e12a81ff2a0c9289a76f6c4eafed2eb
+ 0352d736c7678bdaa2f8199fdea9f49d60f82fc9b28c58abd593a34f4df87f9e"
+skip_extraction="geosite.dat geoip.dat"
+
+go_ldflags="-X github.com/xtls/xray-core/core.build=${version} -buildid="
+system_accounts="_xray"
+
+pre_build() {
+	go mod tidy
+}
+
+post_install() {
+	vlicense LICENSE
+	vmkdir usr/share/xray
+	vcopy ${XBPS_SRCDISTDIR}/${pkgname}-${version}/*.dat usr/share/xray/
+	vconf ${FILESDIR}/config.json xray.json
+	vsv xray
+}
+
+do_install() {
+	vbin ${GOPATH}/bin/main xray
+}

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PR PATCH] [Updated] New package: xray-1.8.11
  2024-05-04  2:04 [PR PATCH] New package: xray-1.8.11 ziggylee0
@ 2024-05-04 12:53 ` ziggylee0
  2024-05-05  1:51 ` ziggylee0
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: ziggylee0 @ 2024-05-04 12:53 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 775 bytes --]

There is an updated pull request by ziggylee0 against master on the void-packages repository

https://github.com/ziggylee0/void-packages master
https://github.com/void-linux/void-packages/pull/50185

New package: xray-1.8.11


#### Testing the changes
- I tested the changes in this PR: **YES**


#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**



#### Local build testing
- I built this PR locally for my native architecture, (x86_64-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - i686




A patch file from https://github.com/void-linux/void-packages/pull/50185.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-50185.patch --]
[-- Type: text/x-diff, Size: 4813 bytes --]

From f3f76bfee7019f17e94ba51941c7cb36892f70a1 Mon Sep 17 00:00:00 2001
From: ziggylee0 <zgglee@proton.me>
Date: Sat, 4 May 2024 09:53:36 +0800
Subject: [PATCH] New package: xray-1.8.11

---
 srcpkgs/xray/files/config.json          | 18 +++++++++++
 srcpkgs/xray/files/xray/run             |  4 +++
 srcpkgs/xray/patches/update-gvisor.diff | 43 +++++++++++++++++++++++++
 srcpkgs/xray/template                   | 38 ++++++++++++++++++++++
 4 files changed, 103 insertions(+)
 create mode 100644 srcpkgs/xray/files/config.json
 create mode 100644 srcpkgs/xray/files/xray/run
 create mode 100644 srcpkgs/xray/patches/update-gvisor.diff
 create mode 100644 srcpkgs/xray/template

diff --git a/srcpkgs/xray/files/config.json b/srcpkgs/xray/files/config.json
new file mode 100644
index 00000000000000..30209ffaad8ed9
--- /dev/null
+++ b/srcpkgs/xray/files/config.json
@@ -0,0 +1,18 @@
+{
+  "inbounds": [{
+    "port": 9000,
+    "protocol": "vmess",
+    "settings": {
+      "clients": [
+        {
+          "id": "1eb6e917-774b-4a84-aff6-b058577c60a5",
+          "level": 1
+        }
+      ]
+    }
+  }],
+  "outbounds": [{
+    "protocol": "freedom",
+    "settings": {}
+  }]
+}
diff --git a/srcpkgs/xray/files/xray/run b/srcpkgs/xray/files/xray/run
new file mode 100644
index 00000000000000..1598e03bd2610f
--- /dev/null
+++ b/srcpkgs/xray/files/xray/run
@@ -0,0 +1,4 @@
+#!/bin/sh
+exec 2>&1
+
+exec chpst -u _xray xray -c /etc/xray.json 2>&1
diff --git a/srcpkgs/xray/patches/update-gvisor.diff b/srcpkgs/xray/patches/update-gvisor.diff
new file mode 100644
index 00000000000000..07277629aa712a
--- /dev/null
+++ b/srcpkgs/xray/patches/update-gvisor.diff
@@ -0,0 +1,43 @@
+"gvisor.dev/gvisor v0.0.0-20231202080848-1f7806d17489" can only get from proxy.golang.org by archive now, it's not in git anymore.
+so update it to fit any other proxy servers. 
+
+
+diff --git a/go.mod b/go.mod
+index 91c1ef0..e55675d 100644
+--- a/go.mod
++++ b/go.mod
+@@ -29,7 +29,7 @@ require (
+ 	golang.zx2c4.com/wireguard v0.0.0-20231211153847-12269c276173
+ 	google.golang.org/grpc v1.63.2
+ 	google.golang.org/protobuf v1.33.0
+-	gvisor.dev/gvisor v0.0.0-20231202080848-1f7806d17489
++	gvisor.dev/gvisor v0.0.0-20240430175013-479de5f2c545
+ 	h12.io/socks v1.0.3
+ 	lukechampine.com/blake3 v1.2.2
+ )
+diff --git a/proxy/wireguard/gvisortun/tun.go b/proxy/wireguard/gvisortun/tun.go
+index 9e9a0b2..65677c4 100644
+--- a/proxy/wireguard/gvisortun/tun.go
++++ b/proxy/wireguard/gvisortun/tun.go
+@@ -157,7 +157,7 @@ func (tun *netTun) Write(buf [][]byte, offset int) (int, error) {
+ // WriteNotify implements channel.Notification
+ func (tun *netTun) WriteNotify() {
+ 	pkt := tun.ep.Read()
+-	if pkt.IsNil() {
++	if pkt == nil {
+ 		return
+ 	}
+ 
+diff --git a/proxy/wireguard/tun.go b/proxy/wireguard/tun.go
+index c2d3032..dc9d212 100644
+--- a/proxy/wireguard/tun.go
++++ b/proxy/wireguard/tun.go
+@@ -194,7 +194,7 @@ func createGVisorTun(localAddresses []netip.Addr, mtu int, handler promiscuousMo
+ 					Timeout: 15 * time.Second,
+ 				})
+ 
+-				handler(xnet.UDPDestination(xnet.IPAddress(id.LocalAddress.AsSlice()), xnet.Port(id.LocalPort)), gonet.NewUDPConn(stack, &wq, ep))
++				handler(xnet.UDPDestination(xnet.IPAddress(id.LocalAddress.AsSlice()), xnet.Port(id.LocalPort)), gonet.NewUDPConn(&wq, ep))
+ 			}(r)
+ 		})
+ 		stack.SetTransportProtocolHandler(udp.ProtocolNumber, udpForwarder.HandlePacket)
diff --git a/srcpkgs/xray/template b/srcpkgs/xray/template
new file mode 100644
index 00000000000000..955533d9d0912a
--- /dev/null
+++ b/srcpkgs/xray/template
@@ -0,0 +1,38 @@
+# Template file for 'xray'
+pkgname=xray
+version=1.8.11
+revision=1
+build_style=go
+go_import_path=github.com/xtls/xray-core
+go_package="${go_import_path}/main"
+hostmakedepends="git"
+short_desc="Network proxy tool"
+maintainer="ziggylee0 <zgglee@proton.me>"
+license="MPL-2.0"
+homepage="https://github.com/XTLS/Xray-core"
+distfiles="https://github.com/XTLS/Xray-core/archive/refs/tags/v${version}.tar.gz
+ https://github.com/Loyalsoldier/v2ray-rules-dat/releases/202404302210/download/geosite.dat
+ https://github.com/Loyalsoldier/v2ray-rules-dat/releases/202404302210/download/geoip.dat"
+checksum="d99ee6008c508abbad6bbb242d058b22efb50fb35867d15447a2b4602ab4b283
+ bd819d0e223c431dc405a4141ebbc0828e12a81ff2a0c9289a76f6c4eafed2eb
+ 0352d736c7678bdaa2f8199fdea9f49d60f82fc9b28c58abd593a34f4df87f9e"
+skip_extraction="geosite.dat geoip.dat"
+
+go_ldflags="-X github.com/xtls/xray-core/core.build=${version} -buildid="
+system_accounts="_xray"
+
+pre_build() {
+	go mod tidy
+}
+
+post_install() {
+	vlicense LICENSE
+	vmkdir usr/share/xray
+	vcopy ${XBPS_SRCDISTDIR}/${pkgname}-${version}/*.dat usr/share/xray/
+	vconf ${FILESDIR}/config.json xray.json
+	vsv xray
+}
+
+do_install() {
+	vbin ${GOPATH}/bin/main xray
+}

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PR PATCH] [Updated] New package: xray-1.8.11
  2024-05-04  2:04 [PR PATCH] New package: xray-1.8.11 ziggylee0
  2024-05-04 12:53 ` [PR PATCH] [Updated] " ziggylee0
@ 2024-05-05  1:51 ` ziggylee0
  2024-05-05  6:41 ` ziggylee0
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: ziggylee0 @ 2024-05-05  1:51 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 775 bytes --]

There is an updated pull request by ziggylee0 against master on the void-packages repository

https://github.com/ziggylee0/void-packages master
https://github.com/void-linux/void-packages/pull/50185

New package: xray-1.8.11


#### Testing the changes
- I tested the changes in this PR: **YES**


#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**



#### Local build testing
- I built this PR locally for my native architecture, (x86_64-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - i686




A patch file from https://github.com/void-linux/void-packages/pull/50185.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-50185.patch --]
[-- Type: text/x-diff, Size: 6454 bytes --]

From f3f76bfee7019f17e94ba51941c7cb36892f70a1 Mon Sep 17 00:00:00 2001
From: ziggylee0 <zgglee@proton.me>
Date: Sat, 4 May 2024 09:53:36 +0800
Subject: [PATCH 1/2] New package: xray-1.8.11

---
 srcpkgs/xray/files/config.json          | 18 +++++++++++
 srcpkgs/xray/files/xray/run             |  4 +++
 srcpkgs/xray/patches/update-gvisor.diff | 43 +++++++++++++++++++++++++
 srcpkgs/xray/template                   | 38 ++++++++++++++++++++++
 4 files changed, 103 insertions(+)
 create mode 100644 srcpkgs/xray/files/config.json
 create mode 100644 srcpkgs/xray/files/xray/run
 create mode 100644 srcpkgs/xray/patches/update-gvisor.diff
 create mode 100644 srcpkgs/xray/template

diff --git a/srcpkgs/xray/files/config.json b/srcpkgs/xray/files/config.json
new file mode 100644
index 00000000000000..30209ffaad8ed9
--- /dev/null
+++ b/srcpkgs/xray/files/config.json
@@ -0,0 +1,18 @@
+{
+  "inbounds": [{
+    "port": 9000,
+    "protocol": "vmess",
+    "settings": {
+      "clients": [
+        {
+          "id": "1eb6e917-774b-4a84-aff6-b058577c60a5",
+          "level": 1
+        }
+      ]
+    }
+  }],
+  "outbounds": [{
+    "protocol": "freedom",
+    "settings": {}
+  }]
+}
diff --git a/srcpkgs/xray/files/xray/run b/srcpkgs/xray/files/xray/run
new file mode 100644
index 00000000000000..1598e03bd2610f
--- /dev/null
+++ b/srcpkgs/xray/files/xray/run
@@ -0,0 +1,4 @@
+#!/bin/sh
+exec 2>&1
+
+exec chpst -u _xray xray -c /etc/xray.json 2>&1
diff --git a/srcpkgs/xray/patches/update-gvisor.diff b/srcpkgs/xray/patches/update-gvisor.diff
new file mode 100644
index 00000000000000..07277629aa712a
--- /dev/null
+++ b/srcpkgs/xray/patches/update-gvisor.diff
@@ -0,0 +1,43 @@
+"gvisor.dev/gvisor v0.0.0-20231202080848-1f7806d17489" can only get from proxy.golang.org by archive now, it's not in git anymore.
+so update it to fit any other proxy servers. 
+
+
+diff --git a/go.mod b/go.mod
+index 91c1ef0..e55675d 100644
+--- a/go.mod
++++ b/go.mod
+@@ -29,7 +29,7 @@ require (
+ 	golang.zx2c4.com/wireguard v0.0.0-20231211153847-12269c276173
+ 	google.golang.org/grpc v1.63.2
+ 	google.golang.org/protobuf v1.33.0
+-	gvisor.dev/gvisor v0.0.0-20231202080848-1f7806d17489
++	gvisor.dev/gvisor v0.0.0-20240430175013-479de5f2c545
+ 	h12.io/socks v1.0.3
+ 	lukechampine.com/blake3 v1.2.2
+ )
+diff --git a/proxy/wireguard/gvisortun/tun.go b/proxy/wireguard/gvisortun/tun.go
+index 9e9a0b2..65677c4 100644
+--- a/proxy/wireguard/gvisortun/tun.go
++++ b/proxy/wireguard/gvisortun/tun.go
+@@ -157,7 +157,7 @@ func (tun *netTun) Write(buf [][]byte, offset int) (int, error) {
+ // WriteNotify implements channel.Notification
+ func (tun *netTun) WriteNotify() {
+ 	pkt := tun.ep.Read()
+-	if pkt.IsNil() {
++	if pkt == nil {
+ 		return
+ 	}
+ 
+diff --git a/proxy/wireguard/tun.go b/proxy/wireguard/tun.go
+index c2d3032..dc9d212 100644
+--- a/proxy/wireguard/tun.go
++++ b/proxy/wireguard/tun.go
+@@ -194,7 +194,7 @@ func createGVisorTun(localAddresses []netip.Addr, mtu int, handler promiscuousMo
+ 					Timeout: 15 * time.Second,
+ 				})
+ 
+-				handler(xnet.UDPDestination(xnet.IPAddress(id.LocalAddress.AsSlice()), xnet.Port(id.LocalPort)), gonet.NewUDPConn(stack, &wq, ep))
++				handler(xnet.UDPDestination(xnet.IPAddress(id.LocalAddress.AsSlice()), xnet.Port(id.LocalPort)), gonet.NewUDPConn(&wq, ep))
+ 			}(r)
+ 		})
+ 		stack.SetTransportProtocolHandler(udp.ProtocolNumber, udpForwarder.HandlePacket)
diff --git a/srcpkgs/xray/template b/srcpkgs/xray/template
new file mode 100644
index 00000000000000..955533d9d0912a
--- /dev/null
+++ b/srcpkgs/xray/template
@@ -0,0 +1,38 @@
+# Template file for 'xray'
+pkgname=xray
+version=1.8.11
+revision=1
+build_style=go
+go_import_path=github.com/xtls/xray-core
+go_package="${go_import_path}/main"
+hostmakedepends="git"
+short_desc="Network proxy tool"
+maintainer="ziggylee0 <zgglee@proton.me>"
+license="MPL-2.0"
+homepage="https://github.com/XTLS/Xray-core"
+distfiles="https://github.com/XTLS/Xray-core/archive/refs/tags/v${version}.tar.gz
+ https://github.com/Loyalsoldier/v2ray-rules-dat/releases/202404302210/download/geosite.dat
+ https://github.com/Loyalsoldier/v2ray-rules-dat/releases/202404302210/download/geoip.dat"
+checksum="d99ee6008c508abbad6bbb242d058b22efb50fb35867d15447a2b4602ab4b283
+ bd819d0e223c431dc405a4141ebbc0828e12a81ff2a0c9289a76f6c4eafed2eb
+ 0352d736c7678bdaa2f8199fdea9f49d60f82fc9b28c58abd593a34f4df87f9e"
+skip_extraction="geosite.dat geoip.dat"
+
+go_ldflags="-X github.com/xtls/xray-core/core.build=${version} -buildid="
+system_accounts="_xray"
+
+pre_build() {
+	go mod tidy
+}
+
+post_install() {
+	vlicense LICENSE
+	vmkdir usr/share/xray
+	vcopy ${XBPS_SRCDISTDIR}/${pkgname}-${version}/*.dat usr/share/xray/
+	vconf ${FILESDIR}/config.json xray.json
+	vsv xray
+}
+
+do_install() {
+	vbin ${GOPATH}/bin/main xray
+}

From 51b99132dfe0854bde00216321c6749f4c90d12f Mon Sep 17 00:00:00 2001
From: ziggylee0 <zgglee@proton.me>
Date: Sun, 5 May 2024 09:45:50 +0800
Subject: [PATCH 2/2] fix: correct geosite and geoip links

---
 srcpkgs/xray/template | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/xray/template b/srcpkgs/xray/template
index 955533d9d0912a..c2ff983c7b0044 100644
--- a/srcpkgs/xray/template
+++ b/srcpkgs/xray/template
@@ -11,8 +11,8 @@ maintainer="ziggylee0 <zgglee@proton.me>"
 license="MPL-2.0"
 homepage="https://github.com/XTLS/Xray-core"
 distfiles="https://github.com/XTLS/Xray-core/archive/refs/tags/v${version}.tar.gz
- https://github.com/Loyalsoldier/v2ray-rules-dat/releases/202404302210/download/geosite.dat
- https://github.com/Loyalsoldier/v2ray-rules-dat/releases/202404302210/download/geoip.dat"
+ https://github.com/Loyalsoldier/v2ray-rules-dat/releases/download/202404302210/geosite.dat
+ https://github.com/Loyalsoldier/v2ray-rules-dat/releases/download/202404302210/geoip.dat"
 checksum="d99ee6008c508abbad6bbb242d058b22efb50fb35867d15447a2b4602ab4b283
  bd819d0e223c431dc405a4141ebbc0828e12a81ff2a0c9289a76f6c4eafed2eb
  0352d736c7678bdaa2f8199fdea9f49d60f82fc9b28c58abd593a34f4df87f9e"
@@ -25,6 +25,10 @@ pre_build() {
 	go mod tidy
 }
 
+do_build() {
+	go build -o "${GOPATH}/bin/${pkgname}" -p "$XBPS_MAKEJOBS" -ldflags "${go_ldflags}" ${go_package}
+}
+
 post_install() {
 	vlicense LICENSE
 	vmkdir usr/share/xray
@@ -33,6 +37,6 @@ post_install() {
 	vsv xray
 }
 
-do_install() {
-	vbin ${GOPATH}/bin/main xray
-}
+# do_install() {
+# 	vbin ${GOPATH}/bin/main xray
+# }

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PR PATCH] [Updated] New package: xray-1.8.11
  2024-05-04  2:04 [PR PATCH] New package: xray-1.8.11 ziggylee0
  2024-05-04 12:53 ` [PR PATCH] [Updated] " ziggylee0
  2024-05-05  1:51 ` ziggylee0
@ 2024-05-05  6:41 ` ziggylee0
  2024-05-05 13:35 ` ziggylee0
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: ziggylee0 @ 2024-05-05  6:41 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 775 bytes --]

There is an updated pull request by ziggylee0 against master on the void-packages repository

https://github.com/ziggylee0/void-packages master
https://github.com/void-linux/void-packages/pull/50185

New package: xray-1.8.11


#### Testing the changes
- I tested the changes in this PR: **YES**


#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**



#### Local build testing
- I built this PR locally for my native architecture, (x86_64-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - i686




A patch file from https://github.com/void-linux/void-packages/pull/50185.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-50185.patch --]
[-- Type: text/x-diff, Size: 7939 bytes --]

From f3f76bfee7019f17e94ba51941c7cb36892f70a1 Mon Sep 17 00:00:00 2001
From: ziggylee0 <zgglee@proton.me>
Date: Sat, 4 May 2024 09:53:36 +0800
Subject: [PATCH 1/3] New package: xray-1.8.11

---
 srcpkgs/xray/files/config.json          | 18 +++++++++++
 srcpkgs/xray/files/xray/run             |  4 +++
 srcpkgs/xray/patches/update-gvisor.diff | 43 +++++++++++++++++++++++++
 srcpkgs/xray/template                   | 38 ++++++++++++++++++++++
 4 files changed, 103 insertions(+)
 create mode 100644 srcpkgs/xray/files/config.json
 create mode 100644 srcpkgs/xray/files/xray/run
 create mode 100644 srcpkgs/xray/patches/update-gvisor.diff
 create mode 100644 srcpkgs/xray/template

diff --git a/srcpkgs/xray/files/config.json b/srcpkgs/xray/files/config.json
new file mode 100644
index 00000000000000..30209ffaad8ed9
--- /dev/null
+++ b/srcpkgs/xray/files/config.json
@@ -0,0 +1,18 @@
+{
+  "inbounds": [{
+    "port": 9000,
+    "protocol": "vmess",
+    "settings": {
+      "clients": [
+        {
+          "id": "1eb6e917-774b-4a84-aff6-b058577c60a5",
+          "level": 1
+        }
+      ]
+    }
+  }],
+  "outbounds": [{
+    "protocol": "freedom",
+    "settings": {}
+  }]
+}
diff --git a/srcpkgs/xray/files/xray/run b/srcpkgs/xray/files/xray/run
new file mode 100644
index 00000000000000..1598e03bd2610f
--- /dev/null
+++ b/srcpkgs/xray/files/xray/run
@@ -0,0 +1,4 @@
+#!/bin/sh
+exec 2>&1
+
+exec chpst -u _xray xray -c /etc/xray.json 2>&1
diff --git a/srcpkgs/xray/patches/update-gvisor.diff b/srcpkgs/xray/patches/update-gvisor.diff
new file mode 100644
index 00000000000000..07277629aa712a
--- /dev/null
+++ b/srcpkgs/xray/patches/update-gvisor.diff
@@ -0,0 +1,43 @@
+"gvisor.dev/gvisor v0.0.0-20231202080848-1f7806d17489" can only get from proxy.golang.org by archive now, it's not in git anymore.
+so update it to fit any other proxy servers. 
+
+
+diff --git a/go.mod b/go.mod
+index 91c1ef0..e55675d 100644
+--- a/go.mod
++++ b/go.mod
+@@ -29,7 +29,7 @@ require (
+ 	golang.zx2c4.com/wireguard v0.0.0-20231211153847-12269c276173
+ 	google.golang.org/grpc v1.63.2
+ 	google.golang.org/protobuf v1.33.0
+-	gvisor.dev/gvisor v0.0.0-20231202080848-1f7806d17489
++	gvisor.dev/gvisor v0.0.0-20240430175013-479de5f2c545
+ 	h12.io/socks v1.0.3
+ 	lukechampine.com/blake3 v1.2.2
+ )
+diff --git a/proxy/wireguard/gvisortun/tun.go b/proxy/wireguard/gvisortun/tun.go
+index 9e9a0b2..65677c4 100644
+--- a/proxy/wireguard/gvisortun/tun.go
++++ b/proxy/wireguard/gvisortun/tun.go
+@@ -157,7 +157,7 @@ func (tun *netTun) Write(buf [][]byte, offset int) (int, error) {
+ // WriteNotify implements channel.Notification
+ func (tun *netTun) WriteNotify() {
+ 	pkt := tun.ep.Read()
+-	if pkt.IsNil() {
++	if pkt == nil {
+ 		return
+ 	}
+ 
+diff --git a/proxy/wireguard/tun.go b/proxy/wireguard/tun.go
+index c2d3032..dc9d212 100644
+--- a/proxy/wireguard/tun.go
++++ b/proxy/wireguard/tun.go
+@@ -194,7 +194,7 @@ func createGVisorTun(localAddresses []netip.Addr, mtu int, handler promiscuousMo
+ 					Timeout: 15 * time.Second,
+ 				})
+ 
+-				handler(xnet.UDPDestination(xnet.IPAddress(id.LocalAddress.AsSlice()), xnet.Port(id.LocalPort)), gonet.NewUDPConn(stack, &wq, ep))
++				handler(xnet.UDPDestination(xnet.IPAddress(id.LocalAddress.AsSlice()), xnet.Port(id.LocalPort)), gonet.NewUDPConn(&wq, ep))
+ 			}(r)
+ 		})
+ 		stack.SetTransportProtocolHandler(udp.ProtocolNumber, udpForwarder.HandlePacket)
diff --git a/srcpkgs/xray/template b/srcpkgs/xray/template
new file mode 100644
index 00000000000000..955533d9d0912a
--- /dev/null
+++ b/srcpkgs/xray/template
@@ -0,0 +1,38 @@
+# Template file for 'xray'
+pkgname=xray
+version=1.8.11
+revision=1
+build_style=go
+go_import_path=github.com/xtls/xray-core
+go_package="${go_import_path}/main"
+hostmakedepends="git"
+short_desc="Network proxy tool"
+maintainer="ziggylee0 <zgglee@proton.me>"
+license="MPL-2.0"
+homepage="https://github.com/XTLS/Xray-core"
+distfiles="https://github.com/XTLS/Xray-core/archive/refs/tags/v${version}.tar.gz
+ https://github.com/Loyalsoldier/v2ray-rules-dat/releases/202404302210/download/geosite.dat
+ https://github.com/Loyalsoldier/v2ray-rules-dat/releases/202404302210/download/geoip.dat"
+checksum="d99ee6008c508abbad6bbb242d058b22efb50fb35867d15447a2b4602ab4b283
+ bd819d0e223c431dc405a4141ebbc0828e12a81ff2a0c9289a76f6c4eafed2eb
+ 0352d736c7678bdaa2f8199fdea9f49d60f82fc9b28c58abd593a34f4df87f9e"
+skip_extraction="geosite.dat geoip.dat"
+
+go_ldflags="-X github.com/xtls/xray-core/core.build=${version} -buildid="
+system_accounts="_xray"
+
+pre_build() {
+	go mod tidy
+}
+
+post_install() {
+	vlicense LICENSE
+	vmkdir usr/share/xray
+	vcopy ${XBPS_SRCDISTDIR}/${pkgname}-${version}/*.dat usr/share/xray/
+	vconf ${FILESDIR}/config.json xray.json
+	vsv xray
+}
+
+do_install() {
+	vbin ${GOPATH}/bin/main xray
+}

From 51b99132dfe0854bde00216321c6749f4c90d12f Mon Sep 17 00:00:00 2001
From: ziggylee0 <zgglee@proton.me>
Date: Sun, 5 May 2024 09:45:50 +0800
Subject: [PATCH 2/3] fix: correct geosite and geoip links

---
 srcpkgs/xray/template | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/xray/template b/srcpkgs/xray/template
index 955533d9d0912a..c2ff983c7b0044 100644
--- a/srcpkgs/xray/template
+++ b/srcpkgs/xray/template
@@ -11,8 +11,8 @@ maintainer="ziggylee0 <zgglee@proton.me>"
 license="MPL-2.0"
 homepage="https://github.com/XTLS/Xray-core"
 distfiles="https://github.com/XTLS/Xray-core/archive/refs/tags/v${version}.tar.gz
- https://github.com/Loyalsoldier/v2ray-rules-dat/releases/202404302210/download/geosite.dat
- https://github.com/Loyalsoldier/v2ray-rules-dat/releases/202404302210/download/geoip.dat"
+ https://github.com/Loyalsoldier/v2ray-rules-dat/releases/download/202404302210/geosite.dat
+ https://github.com/Loyalsoldier/v2ray-rules-dat/releases/download/202404302210/geoip.dat"
 checksum="d99ee6008c508abbad6bbb242d058b22efb50fb35867d15447a2b4602ab4b283
  bd819d0e223c431dc405a4141ebbc0828e12a81ff2a0c9289a76f6c4eafed2eb
  0352d736c7678bdaa2f8199fdea9f49d60f82fc9b28c58abd593a34f4df87f9e"
@@ -25,6 +25,10 @@ pre_build() {
 	go mod tidy
 }
 
+do_build() {
+	go build -o "${GOPATH}/bin/${pkgname}" -p "$XBPS_MAKEJOBS" -ldflags "${go_ldflags}" ${go_package}
+}
+
 post_install() {
 	vlicense LICENSE
 	vmkdir usr/share/xray
@@ -33,6 +37,6 @@ post_install() {
 	vsv xray
 }
 
-do_install() {
-	vbin ${GOPATH}/bin/main xray
-}
+# do_install() {
+# 	vbin ${GOPATH}/bin/main xray
+# }

From 4e4fb0633e9f577e0acbc9c6705c2e1e0c1e8dd6 Mon Sep 17 00:00:00 2001
From: ziggylee0 <zgglee@proton.me>
Date: Sun, 5 May 2024 14:40:12 +0800
Subject: [PATCH 3/3] fix: rm useless code && add "conf_files"

---
 srcpkgs/xray/files/xray/run |  4 +---
 srcpkgs/xray/template       | 10 ++++------
 2 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/srcpkgs/xray/files/xray/run b/srcpkgs/xray/files/xray/run
index 1598e03bd2610f..832bc13ba6189e 100644
--- a/srcpkgs/xray/files/xray/run
+++ b/srcpkgs/xray/files/xray/run
@@ -1,4 +1,2 @@
 #!/bin/sh
-exec 2>&1
-
-exec chpst -u _xray xray -c /etc/xray.json 2>&1
+exec chpst -u _xray xray -c /etc/xray/config.json 2>$1
diff --git a/srcpkgs/xray/template b/srcpkgs/xray/template
index c2ff983c7b0044..ddd85bcd15d35c 100644
--- a/srcpkgs/xray/template
+++ b/srcpkgs/xray/template
@@ -19,6 +19,7 @@ checksum="d99ee6008c508abbad6bbb242d058b22efb50fb35867d15447a2b4602ab4b283
 skip_extraction="geosite.dat geoip.dat"
 
 go_ldflags="-X github.com/xtls/xray-core/core.build=${version} -buildid="
+conf_files="/etc/xray/config.json"
 system_accounts="_xray"
 
 pre_build() {
@@ -30,13 +31,10 @@ do_build() {
 }
 
 post_install() {
-	vlicense LICENSE
 	vmkdir usr/share/xray
+	vmkdir etc/xray
+	vlicense LICENSE
 	vcopy ${XBPS_SRCDISTDIR}/${pkgname}-${version}/*.dat usr/share/xray/
-	vconf ${FILESDIR}/config.json xray.json
+	vcopy ${FILESDIR}/config.json etc/xray/
 	vsv xray
 }
-
-# do_install() {
-# 	vbin ${GOPATH}/bin/main xray
-# }

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PR PATCH] [Updated] New package: xray-1.8.11
  2024-05-04  2:04 [PR PATCH] New package: xray-1.8.11 ziggylee0
                   ` (2 preceding siblings ...)
  2024-05-05  6:41 ` ziggylee0
@ 2024-05-05 13:35 ` ziggylee0
  2024-05-05 13:40 ` ziggylee0
  2024-05-17 12:46 ` ziggylee0
  5 siblings, 0 replies; 7+ messages in thread
From: ziggylee0 @ 2024-05-05 13:35 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 775 bytes --]

There is an updated pull request by ziggylee0 against master on the void-packages repository

https://github.com/ziggylee0/void-packages master
https://github.com/void-linux/void-packages/pull/50185

New package: xray-1.8.11


#### Testing the changes
- I tested the changes in this PR: **YES**


#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**



#### Local build testing
- I built this PR locally for my native architecture, (x86_64-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - i686




A patch file from https://github.com/void-linux/void-packages/pull/50185.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-50185.patch --]
[-- Type: text/x-diff, Size: 9578 bytes --]

From f3f76bfee7019f17e94ba51941c7cb36892f70a1 Mon Sep 17 00:00:00 2001
From: ziggylee0 <zgglee@proton.me>
Date: Sat, 4 May 2024 09:53:36 +0800
Subject: [PATCH 1/4] New package: xray-1.8.11

---
 srcpkgs/xray/files/config.json          | 18 +++++++++++
 srcpkgs/xray/files/xray/run             |  4 +++
 srcpkgs/xray/patches/update-gvisor.diff | 43 +++++++++++++++++++++++++
 srcpkgs/xray/template                   | 38 ++++++++++++++++++++++
 4 files changed, 103 insertions(+)
 create mode 100644 srcpkgs/xray/files/config.json
 create mode 100644 srcpkgs/xray/files/xray/run
 create mode 100644 srcpkgs/xray/patches/update-gvisor.diff
 create mode 100644 srcpkgs/xray/template

diff --git a/srcpkgs/xray/files/config.json b/srcpkgs/xray/files/config.json
new file mode 100644
index 00000000000000..30209ffaad8ed9
--- /dev/null
+++ b/srcpkgs/xray/files/config.json
@@ -0,0 +1,18 @@
+{
+  "inbounds": [{
+    "port": 9000,
+    "protocol": "vmess",
+    "settings": {
+      "clients": [
+        {
+          "id": "1eb6e917-774b-4a84-aff6-b058577c60a5",
+          "level": 1
+        }
+      ]
+    }
+  }],
+  "outbounds": [{
+    "protocol": "freedom",
+    "settings": {}
+  }]
+}
diff --git a/srcpkgs/xray/files/xray/run b/srcpkgs/xray/files/xray/run
new file mode 100644
index 00000000000000..1598e03bd2610f
--- /dev/null
+++ b/srcpkgs/xray/files/xray/run
@@ -0,0 +1,4 @@
+#!/bin/sh
+exec 2>&1
+
+exec chpst -u _xray xray -c /etc/xray.json 2>&1
diff --git a/srcpkgs/xray/patches/update-gvisor.diff b/srcpkgs/xray/patches/update-gvisor.diff
new file mode 100644
index 00000000000000..07277629aa712a
--- /dev/null
+++ b/srcpkgs/xray/patches/update-gvisor.diff
@@ -0,0 +1,43 @@
+"gvisor.dev/gvisor v0.0.0-20231202080848-1f7806d17489" can only get from proxy.golang.org by archive now, it's not in git anymore.
+so update it to fit any other proxy servers. 
+
+
+diff --git a/go.mod b/go.mod
+index 91c1ef0..e55675d 100644
+--- a/go.mod
++++ b/go.mod
+@@ -29,7 +29,7 @@ require (
+ 	golang.zx2c4.com/wireguard v0.0.0-20231211153847-12269c276173
+ 	google.golang.org/grpc v1.63.2
+ 	google.golang.org/protobuf v1.33.0
+-	gvisor.dev/gvisor v0.0.0-20231202080848-1f7806d17489
++	gvisor.dev/gvisor v0.0.0-20240430175013-479de5f2c545
+ 	h12.io/socks v1.0.3
+ 	lukechampine.com/blake3 v1.2.2
+ )
+diff --git a/proxy/wireguard/gvisortun/tun.go b/proxy/wireguard/gvisortun/tun.go
+index 9e9a0b2..65677c4 100644
+--- a/proxy/wireguard/gvisortun/tun.go
++++ b/proxy/wireguard/gvisortun/tun.go
+@@ -157,7 +157,7 @@ func (tun *netTun) Write(buf [][]byte, offset int) (int, error) {
+ // WriteNotify implements channel.Notification
+ func (tun *netTun) WriteNotify() {
+ 	pkt := tun.ep.Read()
+-	if pkt.IsNil() {
++	if pkt == nil {
+ 		return
+ 	}
+ 
+diff --git a/proxy/wireguard/tun.go b/proxy/wireguard/tun.go
+index c2d3032..dc9d212 100644
+--- a/proxy/wireguard/tun.go
++++ b/proxy/wireguard/tun.go
+@@ -194,7 +194,7 @@ func createGVisorTun(localAddresses []netip.Addr, mtu int, handler promiscuousMo
+ 					Timeout: 15 * time.Second,
+ 				})
+ 
+-				handler(xnet.UDPDestination(xnet.IPAddress(id.LocalAddress.AsSlice()), xnet.Port(id.LocalPort)), gonet.NewUDPConn(stack, &wq, ep))
++				handler(xnet.UDPDestination(xnet.IPAddress(id.LocalAddress.AsSlice()), xnet.Port(id.LocalPort)), gonet.NewUDPConn(&wq, ep))
+ 			}(r)
+ 		})
+ 		stack.SetTransportProtocolHandler(udp.ProtocolNumber, udpForwarder.HandlePacket)
diff --git a/srcpkgs/xray/template b/srcpkgs/xray/template
new file mode 100644
index 00000000000000..955533d9d0912a
--- /dev/null
+++ b/srcpkgs/xray/template
@@ -0,0 +1,38 @@
+# Template file for 'xray'
+pkgname=xray
+version=1.8.11
+revision=1
+build_style=go
+go_import_path=github.com/xtls/xray-core
+go_package="${go_import_path}/main"
+hostmakedepends="git"
+short_desc="Network proxy tool"
+maintainer="ziggylee0 <zgglee@proton.me>"
+license="MPL-2.0"
+homepage="https://github.com/XTLS/Xray-core"
+distfiles="https://github.com/XTLS/Xray-core/archive/refs/tags/v${version}.tar.gz
+ https://github.com/Loyalsoldier/v2ray-rules-dat/releases/202404302210/download/geosite.dat
+ https://github.com/Loyalsoldier/v2ray-rules-dat/releases/202404302210/download/geoip.dat"
+checksum="d99ee6008c508abbad6bbb242d058b22efb50fb35867d15447a2b4602ab4b283
+ bd819d0e223c431dc405a4141ebbc0828e12a81ff2a0c9289a76f6c4eafed2eb
+ 0352d736c7678bdaa2f8199fdea9f49d60f82fc9b28c58abd593a34f4df87f9e"
+skip_extraction="geosite.dat geoip.dat"
+
+go_ldflags="-X github.com/xtls/xray-core/core.build=${version} -buildid="
+system_accounts="_xray"
+
+pre_build() {
+	go mod tidy
+}
+
+post_install() {
+	vlicense LICENSE
+	vmkdir usr/share/xray
+	vcopy ${XBPS_SRCDISTDIR}/${pkgname}-${version}/*.dat usr/share/xray/
+	vconf ${FILESDIR}/config.json xray.json
+	vsv xray
+}
+
+do_install() {
+	vbin ${GOPATH}/bin/main xray
+}

From 3a253d4c760d164ea189b7fbdd6aeaa64ae9b30d Mon Sep 17 00:00:00 2001
From: Eloi Torrents <eloitor@disroot.org>
Date: Mon, 18 Mar 2024 16:23:50 +0100
Subject: [PATCH 2/4] hydrus: update to 573, adopt.

---
 srcpkgs/hydrus/template | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/hydrus/template b/srcpkgs/hydrus/template
index 74f2ebc9dddcdd..761afb0983de76 100644
--- a/srcpkgs/hydrus/template
+++ b/srcpkgs/hydrus/template
@@ -1,6 +1,6 @@
 # Template file for 'hydrus'
 pkgname=hydrus
-version=544
+version=573
 revision=1
 pycompile_dirs="usr/lib/hydrus"
 hostmakedepends="python3"
@@ -11,11 +11,12 @@ depends="python3 libopencv-python3 python3-BeautifulSoup4 python3-yaml
  miniupnpc desktop-file-utils python3-cloudscraper python3-openssl
  python3-packaging"
 short_desc="Danbooru-like image tagging and searching system for the desktop"
-maintainer="fanyx <fanyx+github@posteo.net>"
+maintainer="Eloi Torrents <eloitor@duck.com>"
 license="WTFPL"
 homepage="https://hydrusnetwork.github.io/hydrus/"
+changelog="https://raw.githubusercontent.com/hydrusnetwork/hydrus/master/docs/changelog.md"
 distfiles="https://github.com/hydrusnetwork/hydrus/archive/refs/tags/v${version}.tar.gz"
-checksum=7fa642c6139aaac97abaaad96a64c5e481b701c90c503129368b211c87af091c
+checksum=80738fcbb67941aaeeddf7e1fe7f0d8f4f28d2286341862a45f970dec8dde1c7
 python_version="3"
 
 do_install() {
@@ -24,6 +25,8 @@ do_install() {
 	chmod +x hydrus_server.py hydrus_client.py
 
 	vmkdir usr/lib/hydrus
+	rm -r static/build_files
+	rm -r static/requirements
 	vcopy hydrus usr/lib/hydrus/
 	vcopy static usr/lib/hydrus/
 

From 633e3b10305c380b868dd4050502c4dc2917016b Mon Sep 17 00:00:00 2001
From: ziggylee0 <zgglee@proton.me>
Date: Sun, 5 May 2024 09:45:50 +0800
Subject: [PATCH 3/4] fix: correct geosite and geoip links

---
 srcpkgs/xray/template | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/xray/template b/srcpkgs/xray/template
index 955533d9d0912a..c2ff983c7b0044 100644
--- a/srcpkgs/xray/template
+++ b/srcpkgs/xray/template
@@ -11,8 +11,8 @@ maintainer="ziggylee0 <zgglee@proton.me>"
 license="MPL-2.0"
 homepage="https://github.com/XTLS/Xray-core"
 distfiles="https://github.com/XTLS/Xray-core/archive/refs/tags/v${version}.tar.gz
- https://github.com/Loyalsoldier/v2ray-rules-dat/releases/202404302210/download/geosite.dat
- https://github.com/Loyalsoldier/v2ray-rules-dat/releases/202404302210/download/geoip.dat"
+ https://github.com/Loyalsoldier/v2ray-rules-dat/releases/download/202404302210/geosite.dat
+ https://github.com/Loyalsoldier/v2ray-rules-dat/releases/download/202404302210/geoip.dat"
 checksum="d99ee6008c508abbad6bbb242d058b22efb50fb35867d15447a2b4602ab4b283
  bd819d0e223c431dc405a4141ebbc0828e12a81ff2a0c9289a76f6c4eafed2eb
  0352d736c7678bdaa2f8199fdea9f49d60f82fc9b28c58abd593a34f4df87f9e"
@@ -25,6 +25,10 @@ pre_build() {
 	go mod tidy
 }
 
+do_build() {
+	go build -o "${GOPATH}/bin/${pkgname}" -p "$XBPS_MAKEJOBS" -ldflags "${go_ldflags}" ${go_package}
+}
+
 post_install() {
 	vlicense LICENSE
 	vmkdir usr/share/xray
@@ -33,6 +37,6 @@ post_install() {
 	vsv xray
 }
 
-do_install() {
-	vbin ${GOPATH}/bin/main xray
-}
+# do_install() {
+# 	vbin ${GOPATH}/bin/main xray
+# }

From 433d32bddb627ba3572f2afccdcd8c1436fa9fd4 Mon Sep 17 00:00:00 2001
From: ziggylee0 <zgglee@proton.me>
Date: Sun, 5 May 2024 14:40:12 +0800
Subject: [PATCH 4/4] fix: rm useless code && add "conf_files"

---
 srcpkgs/xray/files/xray/run |  4 +---
 srcpkgs/xray/template       | 10 ++++------
 2 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/srcpkgs/xray/files/xray/run b/srcpkgs/xray/files/xray/run
index 1598e03bd2610f..832bc13ba6189e 100644
--- a/srcpkgs/xray/files/xray/run
+++ b/srcpkgs/xray/files/xray/run
@@ -1,4 +1,2 @@
 #!/bin/sh
-exec 2>&1
-
-exec chpst -u _xray xray -c /etc/xray.json 2>&1
+exec chpst -u _xray xray -c /etc/xray/config.json 2>$1
diff --git a/srcpkgs/xray/template b/srcpkgs/xray/template
index c2ff983c7b0044..ddd85bcd15d35c 100644
--- a/srcpkgs/xray/template
+++ b/srcpkgs/xray/template
@@ -19,6 +19,7 @@ checksum="d99ee6008c508abbad6bbb242d058b22efb50fb35867d15447a2b4602ab4b283
 skip_extraction="geosite.dat geoip.dat"
 
 go_ldflags="-X github.com/xtls/xray-core/core.build=${version} -buildid="
+conf_files="/etc/xray/config.json"
 system_accounts="_xray"
 
 pre_build() {
@@ -30,13 +31,10 @@ do_build() {
 }
 
 post_install() {
-	vlicense LICENSE
 	vmkdir usr/share/xray
+	vmkdir etc/xray
+	vlicense LICENSE
 	vcopy ${XBPS_SRCDISTDIR}/${pkgname}-${version}/*.dat usr/share/xray/
-	vconf ${FILESDIR}/config.json xray.json
+	vcopy ${FILESDIR}/config.json etc/xray/
 	vsv xray
 }
-
-# do_install() {
-# 	vbin ${GOPATH}/bin/main xray
-# }

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PR PATCH] [Updated] New package: xray-1.8.11
  2024-05-04  2:04 [PR PATCH] New package: xray-1.8.11 ziggylee0
                   ` (3 preceding siblings ...)
  2024-05-05 13:35 ` ziggylee0
@ 2024-05-05 13:40 ` ziggylee0
  2024-05-17 12:46 ` ziggylee0
  5 siblings, 0 replies; 7+ messages in thread
From: ziggylee0 @ 2024-05-05 13:40 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 775 bytes --]

There is an updated pull request by ziggylee0 against master on the void-packages repository

https://github.com/ziggylee0/void-packages master
https://github.com/void-linux/void-packages/pull/50185

New package: xray-1.8.11


#### Testing the changes
- I tested the changes in this PR: **YES**


#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**



#### Local build testing
- I built this PR locally for my native architecture, (x86_64-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - i686




A patch file from https://github.com/void-linux/void-packages/pull/50185.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-50185.patch --]
[-- Type: text/x-diff, Size: 4928 bytes --]

From 7fe2c12773b99a3b0a55e688c989b07ffc622a3c Mon Sep 17 00:00:00 2001
From: ziggylee0 <zgglee@proton.me>
Date: Sun, 5 May 2024 21:39:35 +0800
Subject: [PATCH] New package: xray-1.8.11

---
 srcpkgs/xray/files/config.json          | 18 +++++++++++
 srcpkgs/xray/files/xray/run             |  2 ++
 srcpkgs/xray/patches/update-gvisor.diff | 43 +++++++++++++++++++++++++
 srcpkgs/xray/template                   | 40 +++++++++++++++++++++++
 4 files changed, 103 insertions(+)
 create mode 100644 srcpkgs/xray/files/config.json
 create mode 100644 srcpkgs/xray/files/xray/run
 create mode 100644 srcpkgs/xray/patches/update-gvisor.diff
 create mode 100644 srcpkgs/xray/template

diff --git a/srcpkgs/xray/files/config.json b/srcpkgs/xray/files/config.json
new file mode 100644
index 00000000000000..30209ffaad8ed9
--- /dev/null
+++ b/srcpkgs/xray/files/config.json
@@ -0,0 +1,18 @@
+{
+  "inbounds": [{
+    "port": 9000,
+    "protocol": "vmess",
+    "settings": {
+      "clients": [
+        {
+          "id": "1eb6e917-774b-4a84-aff6-b058577c60a5",
+          "level": 1
+        }
+      ]
+    }
+  }],
+  "outbounds": [{
+    "protocol": "freedom",
+    "settings": {}
+  }]
+}
diff --git a/srcpkgs/xray/files/xray/run b/srcpkgs/xray/files/xray/run
new file mode 100644
index 00000000000000..832bc13ba6189e
--- /dev/null
+++ b/srcpkgs/xray/files/xray/run
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec chpst -u _xray xray -c /etc/xray/config.json 2>$1
diff --git a/srcpkgs/xray/patches/update-gvisor.diff b/srcpkgs/xray/patches/update-gvisor.diff
new file mode 100644
index 00000000000000..07277629aa712a
--- /dev/null
+++ b/srcpkgs/xray/patches/update-gvisor.diff
@@ -0,0 +1,43 @@
+"gvisor.dev/gvisor v0.0.0-20231202080848-1f7806d17489" can only get from proxy.golang.org by archive now, it's not in git anymore.
+so update it to fit any other proxy servers. 
+
+
+diff --git a/go.mod b/go.mod
+index 91c1ef0..e55675d 100644
+--- a/go.mod
++++ b/go.mod
+@@ -29,7 +29,7 @@ require (
+ 	golang.zx2c4.com/wireguard v0.0.0-20231211153847-12269c276173
+ 	google.golang.org/grpc v1.63.2
+ 	google.golang.org/protobuf v1.33.0
+-	gvisor.dev/gvisor v0.0.0-20231202080848-1f7806d17489
++	gvisor.dev/gvisor v0.0.0-20240430175013-479de5f2c545
+ 	h12.io/socks v1.0.3
+ 	lukechampine.com/blake3 v1.2.2
+ )
+diff --git a/proxy/wireguard/gvisortun/tun.go b/proxy/wireguard/gvisortun/tun.go
+index 9e9a0b2..65677c4 100644
+--- a/proxy/wireguard/gvisortun/tun.go
++++ b/proxy/wireguard/gvisortun/tun.go
+@@ -157,7 +157,7 @@ func (tun *netTun) Write(buf [][]byte, offset int) (int, error) {
+ // WriteNotify implements channel.Notification
+ func (tun *netTun) WriteNotify() {
+ 	pkt := tun.ep.Read()
+-	if pkt.IsNil() {
++	if pkt == nil {
+ 		return
+ 	}
+ 
+diff --git a/proxy/wireguard/tun.go b/proxy/wireguard/tun.go
+index c2d3032..dc9d212 100644
+--- a/proxy/wireguard/tun.go
++++ b/proxy/wireguard/tun.go
+@@ -194,7 +194,7 @@ func createGVisorTun(localAddresses []netip.Addr, mtu int, handler promiscuousMo
+ 					Timeout: 15 * time.Second,
+ 				})
+ 
+-				handler(xnet.UDPDestination(xnet.IPAddress(id.LocalAddress.AsSlice()), xnet.Port(id.LocalPort)), gonet.NewUDPConn(stack, &wq, ep))
++				handler(xnet.UDPDestination(xnet.IPAddress(id.LocalAddress.AsSlice()), xnet.Port(id.LocalPort)), gonet.NewUDPConn(&wq, ep))
+ 			}(r)
+ 		})
+ 		stack.SetTransportProtocolHandler(udp.ProtocolNumber, udpForwarder.HandlePacket)
diff --git a/srcpkgs/xray/template b/srcpkgs/xray/template
new file mode 100644
index 00000000000000..ddd85bcd15d35c
--- /dev/null
+++ b/srcpkgs/xray/template
@@ -0,0 +1,40 @@
+# Template file for 'xray'
+pkgname=xray
+version=1.8.11
+revision=1
+build_style=go
+go_import_path=github.com/xtls/xray-core
+go_package="${go_import_path}/main"
+hostmakedepends="git"
+short_desc="Network proxy tool"
+maintainer="ziggylee0 <zgglee@proton.me>"
+license="MPL-2.0"
+homepage="https://github.com/XTLS/Xray-core"
+distfiles="https://github.com/XTLS/Xray-core/archive/refs/tags/v${version}.tar.gz
+ https://github.com/Loyalsoldier/v2ray-rules-dat/releases/download/202404302210/geosite.dat
+ https://github.com/Loyalsoldier/v2ray-rules-dat/releases/download/202404302210/geoip.dat"
+checksum="d99ee6008c508abbad6bbb242d058b22efb50fb35867d15447a2b4602ab4b283
+ bd819d0e223c431dc405a4141ebbc0828e12a81ff2a0c9289a76f6c4eafed2eb
+ 0352d736c7678bdaa2f8199fdea9f49d60f82fc9b28c58abd593a34f4df87f9e"
+skip_extraction="geosite.dat geoip.dat"
+
+go_ldflags="-X github.com/xtls/xray-core/core.build=${version} -buildid="
+conf_files="/etc/xray/config.json"
+system_accounts="_xray"
+
+pre_build() {
+	go mod tidy
+}
+
+do_build() {
+	go build -o "${GOPATH}/bin/${pkgname}" -p "$XBPS_MAKEJOBS" -ldflags "${go_ldflags}" ${go_package}
+}
+
+post_install() {
+	vmkdir usr/share/xray
+	vmkdir etc/xray
+	vlicense LICENSE
+	vcopy ${XBPS_SRCDISTDIR}/${pkgname}-${version}/*.dat usr/share/xray/
+	vcopy ${FILESDIR}/config.json etc/xray/
+	vsv xray
+}

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: New package: xray-1.8.11
  2024-05-04  2:04 [PR PATCH] New package: xray-1.8.11 ziggylee0
                   ` (4 preceding siblings ...)
  2024-05-05 13:40 ` ziggylee0
@ 2024-05-17 12:46 ` ziggylee0
  5 siblings, 0 replies; 7+ messages in thread
From: ziggylee0 @ 2024-05-17 12:46 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 157 bytes --]

New comment by ziggylee0 on void-packages repository

https://github.com/void-linux/void-packages/pull/50185#issuecomment-2117524765

Comment:
Any feedback.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-05-17 12:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-04  2:04 [PR PATCH] New package: xray-1.8.11 ziggylee0
2024-05-04 12:53 ` [PR PATCH] [Updated] " ziggylee0
2024-05-05  1:51 ` ziggylee0
2024-05-05  6:41 ` ziggylee0
2024-05-05 13:35 ` ziggylee0
2024-05-05 13:40 ` ziggylee0
2024-05-17 12:46 ` ziggylee0

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).