Jigsaw-Code / outline-apps

Outline Client and Manager, developed by Jigsaw. Outline Manager makes it easy to create your own VPN server. Outline Client lets you share access to your VPN with anyone in your network, giving them access to the free and open internet.
https://getoutline.org/
Apache License 2.0
8.22k stars 1.35k forks source link

I made it work on arch linux. Leaving this here for others. #1825

Open cocoonkid opened 5 months ago

cocoonkid commented 5 months ago
  1. git clone https://github.com/Jigsaw-Code/outline-client
  2. cd outline-client
  3. npm install --local
  4. npm run action tools/outline_proxy_controller/build
  5. cd tools/outline_proxy_controller/dist
  6. cp OutlineProxyController /usr/local/sbin/OutlineProxyController

Then copy this arch linux script to tools/outline_proxy_controller/build/install_arch_service.sh

And run it like $ sudo install_arch_service.sh

#!/bin/bash

set -eux

readonly PREFIX=/usr
readonly SERVICE_DIR=/etc/systemd/system
readonly SERVICE_NAME=outline_proxy_controller.service
readonly GROUP_NAME=outlinevpn
readonly SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" &> /dev/null && pwd)"

# Create outlinevpn group
groupadd -f "${GROUP_NAME}"
if id "${1}" &>/dev/null; then
  usermod -aG "${GROUP_NAME}" "${1}"
  echo "user ${1} has been added to ${GROUP_NAME} group"
else
  echo "warn: no user will be added to ${GROUP_NAME} group" >&2
fi

# Copy/update the service's files.
cp -f "${SCRIPT_DIR}/OutlineProxyController" "${PREFIX}/bin"
cp -f "${SCRIPT_DIR}/${SERVICE_NAME}" "${SERVICE_DIR}/"

# Replace "--owning-user-id" argument in ".service" file with the actual user
if id "${1}" &>/dev/null; then
  owneruid="$(id -u "${1}")"
  sed -i "s/--owning-user-id=-1/--owning-user-id=${owneruid}/g" "${SERVICE_DIR}/${SERVICE_NAME}"
fi

# (Re-)start the service.
systemctl daemon-reload
systemctl enable "${SERVICE_NAME}"
systemctl restart "${SERVICE_NAME}"

# Sleep for a couple of seconds before exiting.
sleep 2

I am able to run the outline client and it connects.

The only weirdness seems that I get reconnected all the time. Will investigate this further when I have time.

the outline-manager and client work as app images without any issues so far.

daniellacosse commented 5 months ago

Thanks for the contribution! I would be more than happy to review your pull request, if you wanted to link this as a workaround in the linux documentation.

Also, I went ahead and linked your solution to our Arch Linux Support ticket here: https://github.com/Jigsaw-Code/outline-client/issues/1685.

qo commented 4 months ago

No way! Now it actually works on my Debian.

Thanks a lot!

I'd also like to say that the Outline Client didn't work on these Linux setups:

The only setup where Outline Client worked on was Fedora on my PC. And also Debian on my PC after using this fix.