From 01e28160b86ec640b414ef7e35cfa24991911172 Mon Sep 17 00:00:00 2001 From: Michael Wagner Date: Tue, 13 Aug 2024 15:04:34 +0200 Subject: [PATCH] frp build --- debian/frpc.conf | 17 +++++++++++++++++ debian/frpc.control | 10 ++++++++++ debian/frpc.cp | 12 ++++++++++++ debian/frpc.prepare | 13 +++++++++++++ debian/frps.conf | 17 +++++++++++++++++ debian/frps.control | 10 ++++++++++ debian/frps.cp | 12 ++++++++++++ debian/frps.prepare | 13 +++++++++++++ frp/.dummy | 0 frp/frpc.service | 14 ++++++++++++++ frp/frps.service | 14 ++++++++++++++ 11 files changed, 132 insertions(+) create mode 100644 debian/frpc.conf create mode 100644 debian/frpc.control create mode 100755 debian/frpc.cp create mode 100755 debian/frpc.prepare create mode 100644 debian/frps.conf create mode 100644 debian/frps.control create mode 100755 debian/frps.cp create mode 100755 debian/frps.prepare create mode 100644 frp/.dummy create mode 100644 frp/frpc.service create mode 100644 frp/frps.service diff --git a/debian/frpc.conf b/debian/frpc.conf new file mode 100644 index 0000000..53a0a5c --- /dev/null +++ b/debian/frpc.conf @@ -0,0 +1,17 @@ +# Aufruf: +# mconfigure -v 0.51.0 frpc + +compile_type=NONE +target_type=DEB +multibuild=2 + +echo "run= $run" +if [ $run -eq 1 ]; then + export ARCH=amd64 +elif [ $run -eq 2 ]; then + export ARCH=arm +else + echo "unknown run number" + exit 2 +fi + diff --git a/debian/frpc.control b/debian/frpc.control new file mode 100644 index 0000000..a0dc972 --- /dev/null +++ b/debian/frpc.control @@ -0,0 +1,10 @@ +Source: frpc +Section: main +Priority: optional +Maintainer: Michael Wagner +Build-Depends: git + +Package: frpc +Architecture: _DEB_HOST_ARCH +Description: frp server. see http://github.com/fatedier/frp + diff --git a/debian/frpc.cp b/debian/frpc.cp new file mode 100755 index 0000000..ed34367 --- /dev/null +++ b/debian/frpc.cp @@ -0,0 +1,12 @@ +#!/bin/bash +set -e + +mkdir -p $1/usr/bin +cp Downloads/frp_${version}_linux_$DEB_HOST_ARCH/frpc $1/usr/bin/ + +mkdir -p $1/etc +cp Downloads/frp_${version}_linux_$DEB_HOST_ARCH/frpc.toml $1/etc/ + +mkdir -p $1/lib/systemd/system +cp frp/frpc.service $1/lib/systemd/system/ + diff --git a/debian/frpc.prepare b/debian/frpc.prepare new file mode 100755 index 0000000..35088d2 --- /dev/null +++ b/debian/frpc.prepare @@ -0,0 +1,13 @@ +#!/bin/bash +set -e + +mkdir -p Downloads +cd Downloads + +if ! [ -d frp_${version}_linux_$DEB_HOST_ARCH ] +then + rm *tar.gz* + wget https://github.com/fatedier/frp/releases/download/v$version/frp_${version}_linux_$DEB_HOST_ARCH.tar.gz + tar xf frp_${version}_linux_$DEB_HOST_ARCH.tar.gz +fi + diff --git a/debian/frps.conf b/debian/frps.conf new file mode 100644 index 0000000..caf1640 --- /dev/null +++ b/debian/frps.conf @@ -0,0 +1,17 @@ +# Aufruf: +# mconfigure -v 0.51.0 frps + +compile_type=NONE +target_type=DEB +multibuild=2 + +echo "run= $run" +if [ $run -eq 1 ]; then + export ARCH=amd64 +elif [ $run -eq 2 ]; then + export ARCH=arm +else + echo "unknown run number" + exit 2 +fi + diff --git a/debian/frps.control b/debian/frps.control new file mode 100644 index 0000000..8a493b9 --- /dev/null +++ b/debian/frps.control @@ -0,0 +1,10 @@ +Source: frps +Section: main +Priority: optional +Maintainer: Michael Wagner +Build-Depends: git + +Package: frps +Architecture: _DEB_HOST_ARCH +Description: frp server. see http://github.com/fatedier/frp + diff --git a/debian/frps.cp b/debian/frps.cp new file mode 100755 index 0000000..285e32d --- /dev/null +++ b/debian/frps.cp @@ -0,0 +1,12 @@ +#!/bin/bash +set -e + +mkdir -p $1/usr/bin +cp Downloads/frp_${version}_linux_$DEB_HOST_ARCH/frps $1/usr/bin/ + +mkdir -p $1/etc +cp Downloads/frp_${version}_linux_$DEB_HOST_ARCH/frps.toml $1/etc + +mkdir -p $1/lib/systemd/system +cp frp/frps.service $1/lib/systemd/system/ + diff --git a/debian/frps.prepare b/debian/frps.prepare new file mode 100755 index 0000000..35088d2 --- /dev/null +++ b/debian/frps.prepare @@ -0,0 +1,13 @@ +#!/bin/bash +set -e + +mkdir -p Downloads +cd Downloads + +if ! [ -d frp_${version}_linux_$DEB_HOST_ARCH ] +then + rm *tar.gz* + wget https://github.com/fatedier/frp/releases/download/v$version/frp_${version}_linux_$DEB_HOST_ARCH.tar.gz + tar xf frp_${version}_linux_$DEB_HOST_ARCH.tar.gz +fi + diff --git a/frp/.dummy b/frp/.dummy new file mode 100644 index 0000000..e69de29 diff --git a/frp/frpc.service b/frp/frpc.service new file mode 100644 index 0000000..aefa603 --- /dev/null +++ b/frp/frpc.service @@ -0,0 +1,14 @@ +[Unit] +Description=FRPS fast reverse proxy server +After=network.target + +[Service] +ExecStart=/usr/bin/frpc -c /etc/frpc.toml +KillMode=process +Restart=on-failure +Type=simple + +[Install] +WantedBy=multi-user.target +Alias=frps.service + diff --git a/frp/frps.service b/frp/frps.service new file mode 100644 index 0000000..36be06c --- /dev/null +++ b/frp/frps.service @@ -0,0 +1,14 @@ +[Unit] +Description=FRPS fast reverse proxy server +After=network.target + +[Service] +ExecStart=/usr/bin/frps -c /etc/frps.toml +KillMode=process +Restart=on-failure +Type=simple + +[Install] +WantedBy=multi-user.target +Alias=frps.service + -- 2.20.1