diff options
-rw-r--r-- | .SRCINFO | 10 | ||||
-rw-r--r-- | PKGBUILD | 22 | ||||
-rw-r--r-- | client.config (renamed from client.conf) | 0 | ||||
-rw-r--r-- | psiphon-server.service | 12 | ||||
-rw-r--r-- | psiphon.install | 5 |
5 files changed, 35 insertions, 14 deletions
@@ -1,7 +1,7 @@ pkgbase = psiphon-tunnel-core-git pkgdesc = Psiphon Tunnelling Proxy pkgver = 2.0.27.r3656.3b2cfbca - pkgrel = 2 + pkgrel = 3 epoch = 3 url = https://github.com/Psiphon-Labs/psiphon-tunnel-core install = psiphon.install @@ -10,13 +10,17 @@ pkgbase = psiphon-tunnel-core-git license = GPL3 makedepends = go conflicts = psiphon-console-client - backup = etc/psiphon/client.conf + conflicts = psiphon-server + backup = etc/psiphon/client.config backup = usr/lib/systemd/user/psiphon-client.service + backup = usr/lib/systemd/user/psiphon-server.service source = git+https://github.com/Psiphon-Labs/psiphon-tunnel-core.git - source = client.conf + source = client.config source = psiphon-client.service + source = psiphon-server.service sha256sums = SKIP sha256sums = c2c414831ad29bdeecd00313c473fbaa448f4750e70df1c10e863870bde179aa sha256sums = 6711a12112a594ba70bbae51c66ee23302e08c54c4e059c92b67adba9451c037 + sha256sums = 373c1eb939118055f799237df3e665680b8dc4b4a281505cce32e957a9554c56 pkgname = psiphon-tunnel-core-git @@ -5,26 +5,25 @@ _pkgname=psiphon-tunnel-core pkgname="$_pkgname-git" pkgver=2.0.27.r3656.3b2cfbca -pkgrel=2 +pkgrel=3 epoch=3 pkgdesc='Psiphon Tunnelling Proxy' arch=('i686' 'x86_64') url="https://github.com/Psiphon-Labs/psiphon-tunnel-core" license=('GPL3') makedepends=('go') -conflicts=('psiphon-console-client') +conflicts=('psiphon-console-client' 'psiphon-server') source=("git+$url.git" - "client.conf" + "client.config" "psiphon-client.service" + "psiphon-server.service" ) install=psiphon.install -backup=('etc/psiphon/client.conf' 'usr/lib/systemd/user/psiphon-client.service') +backup=('etc/psiphon/client.config' 'usr/lib/systemd/user/psiphon-client.service' 'usr/lib/systemd/user/psiphon-server.service') sha256sums=('SKIP' 'c2c414831ad29bdeecd00313c473fbaa448f4750e70df1c10e863870bde179aa' '6711a12112a594ba70bbae51c66ee23302e08c54c4e059c92b67adba9451c037' - ) - - + '373c1eb939118055f799237df3e665680b8dc4b4a281505cce32e957a9554c56') pkgver() { @@ -42,6 +41,7 @@ export CGO_CXXFLAGS="$CXXFLAGS" export CGO_LDFLAGS="$LDFLAGS" export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw" console_binary=psiphon-console-client +server_binary=psiphon-server build() { export GOPATH=$srcdir/go @@ -49,12 +49,16 @@ build() { rm -rf "${GOPATH}/src/github.com/Psiphon-Labs/${_pkgname}" ln -srf "$srcdir/${_pkgname}/" "${GOPATH}/src/github.com/Psiphon-Labs/${_pkgname}" - # Modified to disable quic disabled (it is not compatible with current go version 1.19) + # Modified to disable quic-go (it is not compatible with current go version 1.19) go build -tags "PSIPHON_DISABLE_QUIC" -o bin/$console_binary "github.com/Psiphon-Labs/$_pkgname/ConsoleClient" + go build -tags "PSIPHON_DISABLE_QUIC" -o bin/$server_binary "github.com/Psiphon-Labs/$_pkgname/Server" } package() { install -Dm755 "$srcdir/bin/$console_binary" "$pkgdir/usr/bin/$console_binary" - install -Dm644 "$srcdir/client.conf" "$pkgdir/etc/psiphon/client.conf" + install -Dm755 "$srcdir/bin/$server_binary" "$pkgdir/usr/bin/$server_binary" + ln -srf "$pkgdir/usr/bin/psiphon-server" "$pkgdir/usr/bin/psiphond" + install -Dm644 "$srcdir/client.config" "$pkgdir/etc/psiphon/client.config" install -Dm644 "$srcdir/psiphon-client.service" "$pkgdir/usr/lib/systemd/user/psiphon-client.service" + install -Dm644 "$srcdir/psiphon-server.service" "$pkgdir/usr/lib/systemd/user/psiphon-server.service" } diff --git a/client.conf b/client.config index 7def21ab248d..7def21ab248d 100644 --- a/client.conf +++ b/client.config diff --git a/psiphon-server.service b/psiphon-server.service new file mode 100644 index 000000000000..34d6e0a49ca2 --- /dev/null +++ b/psiphon-server.service @@ -0,0 +1,12 @@ +[Unit] +Description=Psiphon Proxy Server Service +After=network-online.target +Wants=network-online.target + +[Service] +WorkingDirectory=%E/psiphon/ +ExecStart=/usr/bin/psiphond run +Restart=on-failure + +[Install] +WantedBy=multi-user.target
\ No newline at end of file diff --git a/psiphon.install b/psiphon.install index 79ceac9d8592..b3cd96a219c8 100644 --- a/psiphon.install +++ b/psiphon.install @@ -1,7 +1,8 @@ post_install() { echo - echo "You need to provide you own configuration file." + echo "You need to provide you own configuration files" echo "The configuration directory is /etc/psiphon/ (for system service) and \$XDG_CONFIG_HOME/psiphon/ (for user service)." + echo "Example config file for console client in /etc/psiphon/client.config" + echo "Example config file for the server can be generated in current directory by: psiphond -ipaddress 127.0.0.1 -protocol OSSH:9999 generate" echo "See the repository's README for how to use: https://github.com/Psiphon-Labs/psiphon-tunnel-core" - echo } |