diff options
-rw-r--r-- | .SRCINFO | 20 | ||||
-rw-r--r-- | PKGBUILD | 33 | ||||
-rw-r--r-- | geph4-client.default | 46 | ||||
-rw-r--r-- | geph4-client.service | 16 |
4 files changed, 115 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..100864d460a9 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,20 @@ +pkgbase = geph4-client + pkgdesc = A command-line Geph4 toolset + pkgver = 4.4.10 + pkgrel = 1 + url = https://github.com/geph-official/geph4 + arch = x86_64 + groups = geph4 + license = GPL3 + makedepends = rust + depends = gcc-libs + conflicts = geph4-client-git + backup = etc/default/geph4-client + source = geph4-client-4.4.10.tar.gz::https://github.com/geph-official/geph4/archive/geph4-client-v4.4.10.tar.gz + source = geph4-client.default + source = geph4-client.service + sha256sums = 4e23e8c121e7f72cebfc8953883a1b2c7c2313329c32070e91220d3aa0e0c38d + sha256sums = fe10aa9e8ecc58e3b01487cb60c6fe970dd80343d1b715744e734077b1e14f66 + sha256sums = 2aef927e466ce22796bbaec6d618f6178d0251e6d0ba1df3c526d3374dd903da + +pkgname = geph4-client diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..869476abfd37 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,33 @@ +# Maintainer: Dct Mei <dctxmei@yandex.com> + +pkgname=geph4-client +pkgver=4.4.10 +pkgrel=1 +pkgdesc="A command-line Geph4 toolset" +arch=('x86_64') +url="https://github.com/geph-official/geph4" +license=('GPL3') +groups=('geph4') +depends=('gcc-libs') +makedepends=('rust') +conflicts=('geph4-client-git') +backup=('etc/default/geph4-client') +source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/geph4-client-v${pkgver}.tar.gz" + "geph4-client.default" + "geph4-client.service") +sha256sums=('4e23e8c121e7f72cebfc8953883a1b2c7c2313329c32070e91220d3aa0e0c38d' + 'fe10aa9e8ecc58e3b01487cb60c6fe970dd80343d1b715744e734077b1e14f66' + '2aef927e466ce22796bbaec6d618f6178d0251e6d0ba1df3c526d3374dd903da') + +build() { + cd "${srcdir}"/"${groups}-${pkgname}-v${pkgver}"/ + cargo build --release --manifest-path=geph4-client/Cargo.toml +} + +package() { + cd "${srcdir}"/"${groups}-${pkgname}-v${pkgver}"/ + install -Dm 644 LICENSE.md "${pkgdir}"/usr/share/licenses/geph4-client/LICENSE + install -Dm 755 target/release/geph4-client -t "${pkgdir}"/usr/bin/ + install -Dm 644 "${srcdir}"/geph4-client.default "${pkgdir}"/etc/default/geph4-client + install -Dm 644 "${srcdir}"/geph4-client.service -t "${pkgdir}"/usr/lib/systemd/system/ +} diff --git a/geph4-client.default b/geph4-client.default new file mode 100644 index 000000000000..d9f7d0979c87 --- /dev/null +++ b/geph4-client.default @@ -0,0 +1,46 @@ +# The default settings for Geph4 client Service + +# Fill in the subcommand here, you can run +# `geph4-client -h` to view: +# binder-proxy | connect | sync +SUBCOMMAND=connect +# Fill in some flags here, you can run +# `geph4-client connect -h` to view: +# --stdio-vpn: whether or not to wait for VPN commands on stdio +# --use-bridges: whether or not to use bridges +FLAGS="--use-bridges" +# Fill in some options here, you can run +# `geph4-client connect -h` to view: +# --credential-cache: +# /var/cache/geph4-client/ +# --dns-listen: +# where to listen for proxied DNS requests +# --exit-server: +# ca-mtl-01.exits.geph.io +# fi-hel-01.exits.geph.io +# sg-sgp-02.exits.geph.io +# sosistab-jp-test.labooyah.be +# tw-rmq-01.exits.geph.io +# us-hio-01.exits.geph.io (default) +# --http-listen: +# where to listen for HTTP proxy connections (default: 127.0.0.1:9910) +# --nettest-name: +# a name for this test instance +# --nettest-server: +# an endpoint to send test results +# --socks5-listen: +# where to listen for SOCKS5 connections (default: 127.0.0.1:9909) +# --stats-listen: +# where to listen for REST-based local connections (default: 127.0.0.1:9809) +OPTIONS="--exit-server us-hio-01.exits.geph.io" +# Please enter the password you want to use: +PASSWORD=password +# Please enter the username you want to use: +USERNAME=username + +# geph4-vpn-helper +VPN_SUBCOMMAND=connect +VPN_FLAGS="--stdio-vpn --use-bridges" +VPN_OPTIONS="--dns-listen 127.0.0.1:15353 --exit-server us-hio-01.exits.geph.io" +VPN_PASSWORD=password +VPN_USERNAME=username diff --git a/geph4-client.service b/geph4-client.service new file mode 100644 index 000000000000..2145097434c2 --- /dev/null +++ b/geph4-client.service @@ -0,0 +1,16 @@ +[Unit] +Description=Geph4 client Service +After=network.target nss-lookup.target + +[Service] +DynamicUser=true +CacheDirectory=geph4-client +CapabilityBoundingSet=CAP_NET_BIND_SERVICE +AmbientCapabilities=CAP_NET_BIND_SERVICE +NoNewPrivileges=true +EnvironmentFile=/etc/default/geph4-client +ExecStart=/usr/bin/geph4-client $SUBCOMMAND $FLAGS $OPTIONS --credential-cache /var/cache/geph4-client/ --password $PASSWORD --username $USERNAME +Restart=on-abort + +[Install] +WantedBy=multi-user.target |