summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorVimsucks2017-12-05 19:55:07 +0800
committerVimsucks2017-12-05 19:55:07 +0800
commita8393c3e17babd00db16f3f696fbb36dd03e6deb (patch)
tree65e7366f641101e7d5a374c7b075e878d4123012
downloadaur-a8393c3e17babd00db16f3f696fbb36dd03e6deb.tar.gz
first commit
-rw-r--r--.SRCINFO24
-rw-r--r--PKGBUILD47
-rw-r--r--frp.install13
-rw-r--r--frpc.service11
-rw-r--r--frpc@.service11
-rw-r--r--frps.service11
-rw-r--r--frps@.service11
7 files changed, 128 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..dfd35dd7f01
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,24 @@
+pkgbase = frp
+ pkgdesc = A fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet.
+ pkgver = 0.14.0
+ pkgrel = 1
+ url = https://github.com/fatedier/frp
+ install = frp.install
+ arch = i686
+ arch = x86_64
+ license = Apache
+ source = frps.service
+ source = frpc.service
+ source = frps@.service
+ source = frpc@.service
+ sha256sums = a83bf9e3bec4cc134391c49fccb32f517a2e90307c7217236513c7408f9b1b8f
+ sha256sums = 422d9e7c79257bfdcf19133e9f37d74bf0478d81f039bce18f63935505a18963
+ sha256sums = 34432236e6ef21108700c017604ebb0f6c20f463c02054060912ea061ca31d8d
+ sha256sums = d7267378516cc782e08794bc3ec73fc719620b0c2c451224b366e4985335bccd
+ source_i686 = https://github.com/fatedier/frp/releases/download/v0.14.0/frp_0.14.0_linux_386.tar.gz
+ sha256sums_i686 = 8bf5236409081d862b6a0da265e8655bd02635411f6fc918ad29022e5d7926b4
+ source_x86_64 = https://github.com/fatedier/frp/releases/download/v0.14.0/frp_0.14.0_linux_amd64.tar.gz
+ sha256sums_x86_64 = 58613aa1474610ec53812bf7efa5f69dfcd3dc8d973bd666c5c828240805436a
+
+pkgname = frp
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..47ccd1f026c
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,47 @@
+# Maintainer: Vimsucks <dev@vimsucks.com>
+
+pkgname=frp
+pkgver=0.14.0
+pkgrel=1
+pkgdesc="A fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet."
+license=('Apache')
+url="https://github.com/fatedier/frp"
+source=(frps.service frpc.service frps@.service frpc@.service)
+source_i686=("https://github.com/fatedier/frp/releases/download/v${pkgver}/frp_${pkgver}_linux_386.tar.gz")
+source_x86_64=("https://github.com/fatedier/frp/releases/download/v${pkgver}/frp_${pkgver}_linux_amd64.tar.gz")
+sha256sums=('a83bf9e3bec4cc134391c49fccb32f517a2e90307c7217236513c7408f9b1b8f'
+ '422d9e7c79257bfdcf19133e9f37d74bf0478d81f039bce18f63935505a18963'
+ '34432236e6ef21108700c017604ebb0f6c20f463c02054060912ea061ca31d8d'
+ 'd7267378516cc782e08794bc3ec73fc719620b0c2c451224b366e4985335bccd')
+sha256sums_i686=('8bf5236409081d862b6a0da265e8655bd02635411f6fc918ad29022e5d7926b4')
+sha256sums_x86_64=('58613aa1474610ec53812bf7efa5f69dfcd3dc8d973bd666c5c828240805436a')
+arch=('i686' 'x86_64')
+
+install=$pkgname.install
+
+package() {
+ case $CARCH in
+ x86_64)ARCH=amd64
+ ;;
+ i686)ARCH=386
+ ;;
+ esac
+
+ frpdir=$srcdir/frp_${pkgver}_linux_${ARCH}
+ mkdir -p $pkgdir/usr/bin
+ install -m755 $frpdir/frpc $pkgdir/usr/bin/frpc
+ install -m755 $frpdir/frps $pkgdir/usr/bin/frps
+
+ mkdir -p $pkgdir/etc/frp
+ install -Dm644 $frpdir/frpc.ini $pkgdir/etc/frp/frpc.ini
+ install -Dm644 $frpdir/frpc_full.ini $pkgdir/etc/frp/frpc_full.ini
+ install -Dm644 $frpdir/frps.ini $pkgdir/etc/frp/frps.ini
+ install -Dm644 $frpdir/frps_full.ini $pkgdir/etc/frp/frps_full.ini
+
+ install -Dm644 $frpdir/LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE
+
+ install -Dm644 frps.service $pkgdir/usr/lib/systemd/system/frps.service
+ install -Dm644 frpc.service $pkgdir/usr/lib/systemd/system/frpc.service
+ install -Dm644 frps@.service $pkgdir/usr/lib/systemd/system/frps@.service
+ install -Dm644 frpc@.service $pkgdir/usr/lib/systemd/system/frpc@.service
+}
diff --git a/frp.install b/frp.install
new file mode 100644
index 00000000000..2b90635d975
--- /dev/null
+++ b/frp.install
@@ -0,0 +1,13 @@
+post_install() {
+ echo ""
+ echo "To start the client, simply modify /etc/frp/frpc.ini, and start the service by:"
+ echo ""
+ echo " systemctl start frpc"
+ echo ""
+ echo "or create your own config file, for example myconf.ini, and start the service by:"
+ echo ""
+ echo " systemctl start frpc@myconf"
+ echo ""
+ echo "You can also start frps the same way"
+ echo ""
+}
diff --git a/frpc.service b/frpc.service
new file mode 100644
index 00000000000..bde88319889
--- /dev/null
+++ b/frpc.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Frp Client Service
+After=network.target
+
+[Service]
+Type=simple
+User=nobody
+ExecStart=/usr/bin/frpc -c /etc/frp/frpc.ini
+
+[Install]
+WantedBy=multi-user.target
diff --git a/frpc@.service b/frpc@.service
new file mode 100644
index 00000000000..1dbba21dc8a
--- /dev/null
+++ b/frpc@.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Frp Client Service
+After=network.target
+
+[Service]
+Type=simple
+User=nobody
+ExecStart=/usr/bin/frpc -c /etc/frp/%i.ini
+
+[Install]
+WantedBy=multi-user.target
diff --git a/frps.service b/frps.service
new file mode 100644
index 00000000000..880029d7a50
--- /dev/null
+++ b/frps.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Frp Server Service
+After=network.target
+
+[Service]
+Type=simple
+User=nobody
+ExecStart=/usr/bin/frps -c /etc/frp/frps.ini
+
+[Install]
+WantedBy=multi-user.target
diff --git a/frps@.service b/frps@.service
new file mode 100644
index 00000000000..b8cc8423bb1
--- /dev/null
+++ b/frps@.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Frp Server Service
+After=network.target
+
+[Service]
+Type=simple
+User=nobody
+ExecStart=/usr/bin/frps -c /etc/frp/%i.ini
+
+[Install]
+WantedBy=multi-user.target