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.24k stars 1.35k forks source link

Support Outline Client on Linux Elementary OS #1607

Open PlatonB opened 1 year ago

PlatonB commented 1 year ago

Describe the bug Approximate English translation of the messages that the program shows when trying to connect: Connect

You may need administrator rights to run Outline. Continue?

OK

Failed to start Outline. Send feedback through the app.

To Reproduce

  1. Insert the link given by the provider.
    ss://many_characters@hel2.fromblancwithlove.com:11130#BlancVPN_Хельсинки_Финляндия
  2. Try to connect.

Expected behavior In the Android version of the Outline Client, the connection is almost seamless.

Client System

Provider BlancVPN

Flatpak log (G_MESSAGES_DEBUG=all)

(flatpak run:4351): flatpak-DEBUG: 12:16:47.372: Running 'bwrap --args 40 outline-client'
LaunchProcess: failed to execvp:
xdg-settings
LaunchProcess: failed to execvp:
xdg-settings
(outline-client:2): GLib-GIO-DEBUG: 12:16:47.829: _g_io_module_get_default: Found default implementation local (GLocalVfs) for ‘gio-vfs’
Gtk-Message: 12:16:47.849: Failed to load module "canberra-gtk-module"
Gtk-Message: 12:16:47.850: Failed to load module "canberra-gtk-module"
[2:0329/121647.871683:ERROR:bus.cc(398)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: Нет такого файла или каталога
[2:0329/121647.871744:ERROR:bus.cc(398)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: Нет такого файла или каталога
(outline-client:2): GLib-GIO-DEBUG: 12:16:47.873: _g_io_module_get_default: Found default implementation keyfile (GKeyfileSettingsBackend) for ‘gsettings-backend’
Outline is starting
loading web app from file:///app/outline-client/resources/app.asar/www/index_electron.html?appName=Outline
Could not load active tunnel:  [Error: ENOENT: no such file or directory, open '/home/platon/.var/app/org.getoutline.OutlineClient/config/Outline/connection_store'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/home/platon/.var/app/org.getoutline.OutlineClient/config/Outline/connection_store'
}
APPIMAGE env is not defined, current application is not an AppImage
connecting to 8c34e765-fa0d-421c-8979-bb49f9ea7b14...
using tun2socks to check connectivity
[EXIT - tun2socks]: Exited with code 0
UDP support: true
starting routing daemon
Routing daemon socket setup failed Error: connect ENOENT /var/run/outline_controller
    at PipeConnectWrap.afterConnect [as oncomplete] (node:net:1157:16) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'connect',
  address: '/var/run/outline_controller'
}
could not connect: w (routing daemon is not running)
[EXIT - tun2socks]: Exited with code 12
could not stop tun2socks: Process terminated by non-zero exit code: 12
tun2socks terminated due to Error: Process terminated by non-zero exit code: 12
disconnected from 8c34e765-fa0d-421c-8979-bb49f9ea7b14
installing outline routing service...
copying service installation files to /tmp/hoFKzd
all service installation files copied to /tmp/hoFKzd successfully
trying to run command as root:  trap "/usr/bin/chattr -R -i /tmp/hoFKzd" EXIT; /usr/bin/chattr -R +i /tmp/hoFKzd && /usr/bin/echo "e0644a3750b6c770e4f2f2e2e7de0de1e46386eed733d7841f35d9e4aa53c1cd  /tmp/hoFKzd/install_linux_service.sh" | /usr/bin/shasum -a 256 -c && /usr/bin/echo "00886c3a6d4289109e014078c4b99d569708939269d9070eae798f0cddbea2e7  /tmp/hoFKzd/OutlineProxyController" | /usr/bin/shasum -a 256 -c && /usr/bin/echo "8bfab08036441bcbb558927bdecd97eebf8c2d365a2a7fdb6c0032c2afc965a2  /tmp/hoFKzd/outline_proxy_controller.service" | /usr/bin/shasum -a 256 -c && "/tmp/hoFKzd/install_linux_service.sh" "platon"
undefined
undefined
command is running as root but failed:  Error: Unable to find pkexec or kdesudo.
    at e (/app/outline-client/resources/app.asar/build/electron/electron/index.js:2:410275)
    at /app/outline-client/resources/app.asar/build/electron/electron/index.js:2:410428
    at FSReqCallback.oncomplete (node:fs:198:21)
rohanmehra20 commented 1 year ago

Thank you for reaching out! Please contact us at support.getoutline.org and include the GitHub issue number so that we can better support your needs.

If you haven’t already, check out the Outline Support Site at support.getoutline.org for access to help articles and more.

PlatonB commented 1 year ago

@maddyhof @rohanmehra20 Why do you say it's not a bug?

maddyhof commented 1 year ago

Sometimes when we're not sure whether something is a bug for everyone or a specific issue for a single user, we suggest contacting support for some troubleshooting help. If support determines that it's a bug, they'll alert the engineering team.

PlatonB commented 1 year ago

Unfortunately, tech support hasn't responded in a week.

maddyhof commented 1 year ago

Very sorry for the inconvenience. Our support team is working tirelessly through a high volume of requests. I escalated your ticket to them and believe they've been in touch, but let me know if you need further assistance.

PlatonB commented 1 year ago

@maddyhof Unfortunately, the bug is also present in v1.11.0.

jyyi1 commented 1 year ago

Hi @PlatonB , thanks for raising this issue. I've taken a look at the logs and the root cause seems to be:

could not connect: w (routing daemon is not running)

This means the outline_proxy_controller daemon we injected into the system during initialization is not working.

Can you try to get the daemon logs by using the following command?

journalctl -u outline_proxy_controller

You can also try to run the install_linux_service.sh in outline_proxy_controller manually using sudo in a terminal to see more daemon installation errors.

xfisbest commented 1 year ago

Hi @PlatonB , thanks for raising this issue. I've taken a look at the logs and the root cause seems to be:

could not connect: w (routing daemon is not running)

This means the outline_proxy_controller daemon we injected into the system during initialization is not working.

Can you try to get the daemon logs by using the following command?

journalctl -u outline_proxy_controller

You can also try to run the install_linux_service.sh in outline_proxy_controller manually using sudo in a terminal to see more daemon installation errors.

i have same issue i am on debian 12 kde fresh install, same issue of kdesudo not found.. i tried running install_linux_service.sh manually it gives " line 27 1 unbound variable"

jyyi1 commented 1 year ago

Hi @PlatonB , thanks for raising this issue. I've taken a look at the logs and the root cause seems to be:

could not connect: w (routing daemon is not running)

This means the outline_proxy_controller daemon we injected into the system during initialization is not working. Can you try to get the daemon logs by using the following command?

journalctl -u outline_proxy_controller

You can also try to run the install_linux_service.sh in outline_proxy_controller manually using sudo in a terminal to see more daemon installation errors.

i have same issue i am on debian 12 kde fresh install, same issue of kdesudo not found.. i tried running install_linux_service.sh manually it gives " line 27 1 unbound variable"

Sorry about the confusion, to make it more clear, you need to copy the entire outline_proxy_controller folder and then run the following command:

sudo ./install_linux_service.sh <linux-login-username-to-run-outline>
xfisbest commented 1 year ago

Hi @PlatonB , thanks for raising this issue. I've taken a look at the logs and the root cause seems to be:

could not connect: w (routing daemon is not running)

This means the outline_proxy_controller daemon we injected into the system during initialization is not working. Can you try to get the daemon logs by using the following command?

journalctl -u outline_proxy_controller

You can also try to run the install_linux_service.sh in outline_proxy_controller manually using sudo in a terminal to see more daemon installation errors.

i have same issue i am on debian 12 kde fresh install, same issue of kdesudo not found.. i tried running install_linux_service.sh manually it gives " line 27 1 unbound variable"

Sorry about the confusion, to make it more clear, you need to copy the entire outline_proxy_controller folder and then run the following command:

sudo ./install_linux_service.sh <linux-login-username-to-run-outline>

i forgot the part, yup i did copy entire folder, and run the command again, it did execute fine but still having error of no kdesudo

jyyi1 commented 1 year ago

@xfisbest , what is triggering the kdesudo failure?

Outline Client?

If the service is successfully running (not successfully installed, because a successful installation may result in a failure state as well), Outline shall not prompt the "root permission" dialog (which uses kdesudo). To check whether the service is running (might requires root permission to run the following command):

journalctl -u outline_proxy_controller
// The output should be a bunch of messages, but definitely no error messages

Also you need to make sure the current user (or the user that will launch Outline) has the rw permission to the following file:

ls -l /var/run/outline_controller
// check rw permission

or CLI/sudo?

We cannot help with this, please make sure you can run apps under root permission.

PlatonB commented 1 year ago

Hi, @jyyi1

journalctl -u outline_proxy_controller
-- No entries --
jyyi1 commented 1 year ago

Thanks @PlatonB , this means the Outline service is not even started, you should see at least the following two messages:

Started Outline Proxy Routing Controller.
OutlineProxyController [for OutlineVPN Client] v0.1.0

So you need to make sure the binary can run on your system by downloading and running OutlineProxyController:

sudo ./OutlineProxyController --socket-filename=/var/run/outline_controller --owning-user-id=<your-uid>

If that is working, please make sure outline_proxy_controller is registered to systemd and the status is good:

systemctl status outline_proxy_controller
PlatonB commented 1 year ago
# ./OutlineProxyController --socket-filename=/var/run/outline_controller --owning-user-id=1000
-bash: ./OutlineProxyController: Access denied
PlatonB commented 1 year ago

@jyyi1

$ systemctl status outline_proxy_controller
Unit outline_proxy_controller.service could not be found.
jyyi1 commented 1 year ago
# ./OutlineProxyController --socket-filename=/var/run/outline_controller --owning-user-id=1000
-bash: ./OutlineProxyController: Access denied

Hi @PlatonB , please make sure you have the root access to your system and run the command under root permission (sudo ./OutlineProxyController). You need to resolve your "access denied" issue on your system (it's from the bash command, not ./OutlineProxyController, so we cannot help with that).

This is what we expect:

image
PlatonB commented 1 year ago

@jyyi1, yes, I have root access: Access denies

sudo ./OutlineProxyController

Presumably, sudo ./any_file is invalid syntax:

sudo: ./OutlineProxyController: command not found
jyyi1 commented 1 year ago

sudo is valid syntax on Ubuntu (we only officially support Ubuntu for now), and I tried it on elementary OS 6.1, it also works (the screenshot I pasted before is from elementary OS 6.1 by executing sudo ./OutlineProxyController ...). Please look up the user manual of your system.

BTW, command not found might also happen if you did not set "executable" permission on OutlineProxyController.

PlatonB commented 1 year ago

@jyyi1 Thanks for the recommendation. I added the executable permission. Now the file can be launched.

# ./OutlineProxyController --socket-filename=/var/run/outline_controller --owning-user-id=27
OutlineProxyController [for OutlineVPN Client] v0.1.0
1687860745.147369: [INFO] successfully set the tun device ip address
1687860745.149124: [INFO] successfully added outline gateway routing entry
1687860745.150982: [ERROR] Error: any valid prefix is expected rather than "".

1687860745.151063: [WARN] unable to query the default route to the outline proxy
1687860745.151076: [WARN] we could not detect the best interface, will try again at connect
1687860745.152404: [WARN] failed to get the id of outlinevpn group
^Z
[1]+  Остановлен    ./OutlineProxyController --socket-filename=/var/run/outline_controller --owning-user-id=27
# ./OutlineProxyController --socket-filename=/var/run/outline_controller --owning-user-id=1000
OutlineProxyController [for OutlineVPN Client] v0.1.0
1687860778.097691: [WARN] tune device outline-tun0 already exists. is another instance of outline controller is running?
1687860778.107509: [INFO] successfully set the tun device ip address
1687860778.109434: [ERROR] RTNETLINK answers: File exists

Exception: failed to add outline gateway routing entry
xfisbest commented 1 year ago

For me it is like dns stops working.. outline gets connected, i am able to ping ips or visit ips in browser but not hostname it says not found

jyyi1 commented 12 months ago

Hi @PlatonB , you cannot run multiple OutlineProxyController instances. In your example, you are using ^Z to put the first instance (which runs normally) to background and run the OutlineProxyController again (which results to an error). When you have one normal instance running, you should be able to using Outline Client now. (make sure --owning-user-id is the user you are launching Outline Client UI).

jyyi1 commented 12 months ago

@xfisbest , can you double confirm your system is using the correct DNS server (i.e. 9.9.9.9)? For example, using dig www.google.com and checking the result. Or you may take a look at the system DNS configuration file (for example, /etc/resolv.conf).

intexcor commented 11 months ago

в чем в итоге проблема. проблема разрабов в том что они не могут грамотно распространять приложение. пример хорошего распространения к примеру пай чарм, адройд студио и т.д. так же хорошо распространять пакетами(не репозиториями). но разрабы зашили все в непонятный файл который глючит как дышит. а вообще можете сделать fllatplak пакет и будет у вас поддержка всех дистрибутивов. только нормальный пакет, который не глючит. уж поработайте над приложением, будьте добры, сами знаете ограничения

sabinich commented 10 months ago

looks like a problem with dependences: when I ran application from command-line with extended info, I've saw these:

Routing daemon socket setup failed Error: connect ENOENT /var/run/outline_controller
    at PipeConnectWrap.afterConnect [as oncomplete] (node:net:1157:16) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'connect',
  address: '/var/run/outline_controller'
}
could not connect: w (routing daemon is not running)

and

command is running as root but failed:  Error: Unable to find pkexec or kdesudo.
PlatonB commented 8 months ago

@maddyhof @jyyi1 The new issue name isn't quite correct. The problem is observed not only in elementary OS, but also in Fedora Silverblue. In both cases Outline Client is available as a Flatpak package. The developers should test the Flatpak build more thoroughly, and it doesn't matter on which distro.

jyyi1 commented 8 months ago

Hi @PlatonB , we only support Ubuntu for now: https://support.getoutline.org/s/article/What-are-the-system-requirements-to-run-the-Outline-client?language=en_US .

This issue is triggered in Elementary OS, so we track the support of Elementary OS. Other distros will have their own issue tracking. Outline might work on other distros, but we don't guarantee that.

KIrill-Al commented 1 week ago

The same problem. Outline 1.13.1 (476278), Ubuntu 20.04.6

I start the app and press "Connect." "We will initialize Outline, which may require admin permissions. Would you like to proceed?" I click "OK." The app responds:"Outline has been successfully initialized, please try again to connect to the server." I try again, but it keeps looping and nothing else happens.

Console log:

./Outline-Client.AppImage
Outline is starting
loading web app from file:///tmp/.mount_Outlinj3K4XH/resources/app.asar/client/www/index_electron.html?appName=Outline
Could not load active tunnel:  [Error: ENOENT: no such file or directory, open '/home/user321/.config/Outline/connection_store'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/home/user321/.config/Outline/connection_store'
}
Checking for update
Update for version 1.13.1 is not available (latest version: 1.13.1, downgrade is disallowed).
connecting to 8b962eb2-079a-4156-a13b-25be7ac175fc...
using tun2socks to check connectivity
[EXIT - tun2socks]: Exited with code 0
UDP support: true
starting routing daemon
Routing daemon socket setup failed Error: connect ENOENT /var/run/outline_controller
    at PipeConnectWrap.afterConnect [as oncomplete] (node:net:1157:16) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'connect',
  address: '/var/run/outline_controller'
}
could not connect: G (routing daemon is not running)
[EXIT - tun2socks]: Exited with code 12
could not stop tun2socks: Process terminated by non-zero exit code: 12
tun2socks terminated due to Error: Process terminated by non-zero exit code: 12
disconnected from 8b962eb2-079a-4156-a13b-25be7ac175fc
installing outline routing service...
copying service installation files to /tmp/78zTMI
all service installation files copied to /tmp/78zTMI successfully
trying to run command as root:  trap "/usr/bin/chattr -R -i /tmp/78zTMI" EXIT; /usr/bin/chattr -R +i /tmp/78zTMI && /usr/bin/echo "e0644a3750b6c770e4f2f2e2e7de0de1e46386eed733d7841f35d9e4aa53c1cd  /tmp/78zTMI/install_linux_service.sh" | /usr/bin/shasum -a 256 -c && /usr/bin/echo "0a2d2b874d4d200145b1e3a7cc5818fb27e5c0ed69ebb4f4057e066e0b7fdc4a  /tmp/78zTMI/OutlineProxyController" | /usr/bin/shasum -a 256 -c && /usr/bin/echo "8bfab08036441bcbb558927bdecd97eebf8c2d365a2a7fdb6c0032c2afc965a2  /tmp/78zTMI/outline_proxy_controller.service" | /usr/bin/shasum -a 256 -c && "/tmp/78zTMI/install_linux_service.sh" "user321"
/tmp/78zTMI/install_linux_service.sh: OK
/tmp/78zTMI/OutlineProxyController: OK
/tmp/78zTMI/outline_proxy_controller.service: OK
user user321 has been added to outlinevpn group

+ readonly PREFIX=/usr/local
+ PREFIX=/usr/local
+ readonly SERVICE_DIR=/etc/systemd/system
+ SERVICE_DIR=/etc/systemd/system
+ readonly SERVICE_NAME=outline_proxy_controller.service
+ SERVICE_NAME=outline_proxy_controller.service
+ readonly GROUP_NAME=outlinevpn
+ GROUP_NAME=outlinevpn
++ dirname /tmp/78zTMI/install_linux_service.sh
+ readonly SCRIPT_DIR=/tmp/78zTMI
+ SCRIPT_DIR=/tmp/78zTMI
+ /usr/sbin/groupadd -f outlinevpn
+ /usr/bin/id user321
+ /usr/sbin/usermod -aG outlinevpn user321
+ /usr/bin/echo 'user user321 has been added to outlinevpn group'
+ /usr/bin/cp -f /tmp/78zTMI/OutlineProxyController /usr/local/sbin
+ /usr/bin/cp -f /tmp/78zTMI/outline_proxy_controller.service /etc/systemd/system/
+ /usr/bin/id user321
++ id -u user321
+ owneruid=1000
+ /usr/bin/sed -i s/--owning-user-id=-1/--owning-user-id=1000/g /etc/systemd/system/outline_proxy_controller.service
+ /usr/bin/systemctl daemon-reload
+ /usr/bin/systemctl enable outline_proxy_controller.service
+ /usr/bin/systemctl restart outline_proxy_controller.service
+ /usr/bin/sleep 2

outline routing service installed successfully
jyyi1 commented 6 days ago

For people experiencing issues with the Outline Client, please try using our Outline CLI instead: https://github.com/Jigsaw-Code/outline-sdk/tree/main/x/examples/outline-cli

PlatonB commented 6 days ago

@jyyi1

go run github.com/Jigsaw-Code/outline-sdk/x/examples/outline-cli@latest -transport "ss://...@lt2.fromblancwithlove.com:10817?outline=1&prefix=%16%03%01%00%C2%A8%01%01#BlancVPN_Вильнюс_Литва"
# github.com/Jigsaw-Code/outline-sdk/transport
go/pkg/mod/github.com/!jigsaw-!code/outline-sdk@v0.0.16/transport/happyeyeballs.go:90:22: undefined: atomic.Int32
go/pkg/mod/github.com/!jigsaw-!code/outline-sdk@v0.0.16/transport/happyeyeballs.go:194:24: undefined: errors.Join
go/pkg/mod/github.com/!jigsaw-!code/outline-sdk@v0.0.16/transport/happyeyeballs.go:242:22: undefined: errors.Join
note: module requires Go 1.20
jyyi1 commented 5 days ago

Hi @PlatonB , please upgrade to go 1.21 or above, you can confirm that through go version.