summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authordetiam2023-03-08 17:15:23 +0800
committerdetiam2023-03-08 17:15:23 +0800
commit596d26d0b452d79be6efb53d8f61e058bd65a467 (patch)
tree286fc63dd575bc4754d4754d8ba9633e16e0925f
downloadaur-596d26d0b452d79be6efb53d8f61e058bd65a467.tar.gz
first commit
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD67
-rw-r--r--phantomsocks.service16
-rw-r--r--phantomsocks.sysusers1
-rw-r--r--phantomsocks@.service16
5 files changed, 117 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..625d00544dec
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = phantomsocks
+ pkgdesc = A cross-platform proxy client/server for Linux/Windows/macOS
+ pkgver = 1.0.4
+ pkgrel = 4
+ url = https://github.com/macronut/phantomsocks
+ arch = i686
+ arch = x86_64
+ license = LGPL-3.0
+ makedepends = go
+ source = git+https://github.com/macronut/phantomsocks#commit=a521259ffc1cfd8753845997c09644b976af2d6c
+ source = phantomsocks.service
+ source = phantomsocks@.service
+ md5sums = SKIP
+ md5sums = SKIP
+ md5sums = SKIP
+
+pkgname = phantomsocks
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..069e2028f61e
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,67 @@
+# Maintainer: detiam <dehe_tian@outlook.com>
+# Contributor: detian <dehe_detian@outlook.com>
+pkgname=phantomsocks-git
+_pkgname=phantomsocks
+pkgver=r282.3c556b0
+pkgrel=1
+epoch=
+pkgdesc="A cross-platform proxy client/server for Linux/Windows/macOS"
+arch=(i686 x86_64)
+url="https://github.com/macronut/$_pkgname"
+#_commit=a521259ffc1cfd8753845997c09644b976af2d6c
+license=('LGPL-3.0')
+groups=()
+depends=('libpcap' 'systemd')
+makedepends=('go' 'git')
+checkdepends=()
+optdepends=(
+ 'v2raya: for use with v2raya'
+# 'libpcap: for build tag pcap'
+)
+provides=("$_pkgname")
+conflicts=("$_pkgname")
+replaces=("$_pkgname")
+backup=()
+options=()
+install=
+changelog=
+source=(
+ "git+$url"
+ "$_pkgname.sysusers"
+ "$_pkgname.service"
+ "$_pkgname@.service"
+)
+noextract=()
+md5sums=('SKIP' 'SKIP' 'SKIP' 'SKIP')
+validpgpkeys=()
+
+pkgver() {
+ cd "$_pkgname"
+ ( set -o pipefail
+ git describe --long --abbrev=7 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
+ )
+}
+
+build() {
+ cd "$_pkgname"
+ #go build -tags rawsocket
+ go build -tags pcap
+}
+
+package() {
+ cd "$_pkgname"
+
+ install -Dm644 "../$_pkgname.service" "$pkgdir/usr/lib/systemd/system/$_pkgname.service"
+ install -Dm644 "../$_pkgname@.service" "$pkgdir/usr/lib/systemd/system/$_pkgname@.service"
+
+ install -dm755 "$pkgdir/etc/phantomsocks"
+ install -dm755 "$pkgdir/usr/lib/systemd/system"
+ install -Dm600 "config.json" "$pkgdir/etc/phantomsocks/config.json"
+ install -Dm600 "default.conf" "$pkgdir/etc/phantomsocks/default.conf"
+
+ install -Dm644 "$srcdir/$_pkgname.sysusers" "$pkgdir/usr/lib/sysusers.d/phantomsocks.conf"
+
+ install -dm755 "$pkgdir/usr/bin"
+ install "$_pkgname" "$pkgdir/usr/bin/$_pkgname"
+}
diff --git a/phantomsocks.service b/phantomsocks.service
new file mode 100644
index 000000000000..e8df89b79eee
--- /dev/null
+++ b/phantomsocks.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=Phantomsocks process
+Wants=network-online.target
+After=network-online.target
+
+[Service]
+Type=simple
+Group=phantomsocks
+WorkingDirectory=/etc/phantomsocks
+ExecStart=/usr/bin/phantomsocks
+Restart=on-abnormal
+RestartSec=5
+
+[Install]
+WantedBy=multi-user.target
+Alias=
diff --git a/phantomsocks.sysusers b/phantomsocks.sysusers
new file mode 100644
index 000000000000..641b7580738d
--- /dev/null
+++ b/phantomsocks.sysusers
@@ -0,0 +1 @@
+u phantomsocks - "Phantomsocks daemon"
diff --git a/phantomsocks@.service b/phantomsocks@.service
new file mode 100644
index 000000000000..ad26f0cfee6a
--- /dev/null
+++ b/phantomsocks@.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=Phantomsocks process, on %I
+Wants=network-online.target
+After=network-online.target
+
+[Service]
+Type=simple
+Group=phantomsocks
+WorkingDirectory=/etc/phantomsocks/%I
+ExecStart=/usr/bin/phantomsocks
+Restart=on-abnormal
+RestartSec=5
+
+[Install]
+WantedBy=multi-user.target
+Alias=