Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
cocoonkid opened this issue Jan 28, 2024 · 2 comments
Open

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

cocoonkid opened this issue Jan 28, 2024 · 2 comments
Labels

Comments

@cocoonkid
Copy link

  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.

@cocoonkid cocoonkid added the bug Something is broken, we are tracking it label Jan 28, 2024
@daniellacosse
Copy link
Contributor

daniellacosse commented Jan 29, 2024

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: #1685.

@daniellacosse daniellacosse added question and removed bug Something is broken, we are tracking it labels Jan 29, 2024
@qo
Copy link

qo commented Mar 9, 2024

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:

  • Arch on my friend's laptop;
  • Void on my laptop (it won't work even with this fix because it uses runit instead of systemd);
  • Debian on my PC.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants