outline-apps icon indicating copy to clipboard operation
outline-apps copied to clipboard

[Client] Raspberry-Pi support

Open EmmaVye opened this issue 5 years ago • 6 comments

A clear and concise description of what the problem is. I would like to be able to bridge my raspberry pi with my network to broadcast a relay from Ethernet to Wi-Fi, I currently have the bridge working but I was looking forward that the appimage would work on the Raspberry-Pi but it does not A clear and concise description of what you want to happen.

A clear and concise description of any alternative solutions or features you've considered. Ive considered other vpn options but I alredy have a outline server running in the cloud so that would mean I would need to restart all over

Add any other context or screenshots about the feature request here. not really it does output a garbled filename with nothing in it so I guess that is a bug?

EmmaVye avatar Jul 03 '20 07:07 EmmaVye

+1. Need this.

ghost avatar Jul 30 '21 01:07 ghost

It's been 4 years already, I wonder if there's any movement in this direction?

I really miss the Raspberry support.

nafanz avatar Dec 25 '24 04:12 nafanz

HUGE note: I'm mostly C++ dev and this instruction may contain mistakes.

There is no any problems with adding arm64 support. I don't have any Raspberry Pi, but have other arm64 SBC - Rock 5B. Here is my changes, that required to build arm64 AppImage:

diff --git a/client/electron/electron-builder.json b/client/electron/electron-builder.json
index b2227c1e..1631f6b9 100644
--- a/client/electron/electron-builder.json
+++ b/client/electron/electron-builder.json
@@ -37,12 +37,9 @@
     "maintainer": "Jigsaw LLC",
     "target": [{
       "arch": [
-        "x64"
+        "arm64"
       ],
       "target": "AppImage"
-    }, {
-      "arch": "x64",
-      "target": "deb"
     }]
   },
 
diff --git a/client/go/Taskfile.yml b/client/go/Taskfile.yml
index 5994e02e..67f30f16 100644
--- a/client/go/Taskfile.yml
+++ b/client/go/Taskfile.yml
@@ -63,7 +63,7 @@ tasks:
 
   linux:
     desc: "Build the tun2socks binary and library for Linux"
-    cmds: [{task: electron, vars: {TARGET_OS: "linux", TARGET_ARCH: "amd64"}}]
+    cmds: [{task: electron, vars: {TARGET_OS: "linux", TARGET_ARCH: "arm64"}}]
 
   android:
     desc: "Build the tun2socks.aar library for Android"

deb target was removed because of this bug: https://github.com/electron-userland/electron-builder/issues/3901 I hope that @sbruens or @jyyi1 can check my changes and make it better/add cross compilation. There is another option - use github arm64 CI, when it will be available: https://github.com/github/roadmap/issues/970 Until then I'll save arm64 debug build here: https://github.com/q4a/outline-apps/releases/download/arm64-debug-2025-01-02/Outline-Client-arm64.AppImage And write my build steps performed on the arm64 Ubuntu 24.10:

$ sudo apt install git curl golang-go gcc make libboost1.83-dev libboost-json1.83-dev libboost-regex1.83-dev libboost-program-options1.83-dev libboost-filesystem1.83-dev libboost-coroutine1.83-dev
$ git clone https://github.com/Jigsaw-Code/outline-apps
$ cd outline-apps
<apply arm64 changes>
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
$ source ~/.bashrc
$ nvm install --latest-npm
$ npm -v
10.9.2
$ node -v
v18.20.5
$ npm ci
$ mkdir client/electron/linux_proxy_controller/build
$ cd client/electron/linux_proxy_controller/build
$ cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-static -static-libgcc -static-libstdc++"
$ make -j$(nproc)
$ cp OutlineProxyController ../dist/
$ file ../dist/OutlineProxyController && ldd ../dist/OutlineProxyController
../dist/OutlineProxyController: ELF 64-bit LSB executable, ARM aarch64, version 1 (GNU/Linux), statically linked, BuildID[sha1]=4c4b3d4f52d7d73893bcda6546d0c51dda493565, for GNU/Linux 3.7.0, with debug_info, not stripped
        not a dynamic executable
$ cd ../../../../../outline-apps
$ npm run action client/electron/build linux
<check output/client/electron/build/Outline-Client.AppImage>

UPD: looks like OutlineProxyController in linux_proxy_controller/dist is x64_86 and you need to rebuild it too. So, I updated my build steps.

q4a avatar Jan 02 '25 22:01 q4a

@q4a Thanks for your help, it works. I hope to make the arm64 build official in the near future.

Information about the board and software:

Raspberry Pi 4 Model B Rev 1.4
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"

nafanz avatar Jan 04 '25 10:01 nafanz

Gitbub Фctions now support free arm64 Linux runners - that allow to build and test arm64 version: https://github.blog/changelog/2025-01-16-linux-arm64-hosted-runners-now-available-for-free-in-public-repositories-public-preview/ So I made PR to add arm64 Linux support: https://github.com/Jigsaw-Code/outline-apps/pull/2342

q4a avatar Jan 23 '25 06:01 q4a

Tried to build it in Ubuntu ARM64 and it failed :( And provided ARM build refuses to connect to my server, while regular x86 clients can @q4a can you upload recent version build?

Click to expand the log ``` node ./infrastructure/build/run_action.mjs client/electron/build linux
   / __ \| |  | |__   __| |    |_   _| \ | |  ____|    
  | |  | | |  | |  | |  | |      | | |  \| | |__       
  | |  | | |  | |  | |  | |      | | | . ` |  __|      
  | |__| | |__| |  | |  | |____ _| |_| |\  | |____     
   \____/ \____/   |_|  |______|_____|_| \_|______|    

========================================================= © The Outline Authors, 2025

▶ action(client/electron/build): Running [node '--trace-uncaught' '/root/outline-apps/client/electron/build.action.mjs' 'linux']... WARNING: building "linux" in [DEBUG] mode. Do not publish this build!! ▶ action(client/src/www/build): Running [node '--trace-uncaught' '/root/outline-apps/client/src/www/build.action.mjs' 'linux']... (node:32218) [DEP_WEBPACK_COMPILATION_ASSETS] DeprecationWarning: Compilation.assets will be frozen in future, all modifications are deprecated. BREAKING CHANGE: No more changes should happen to Compilation.assets after sealing the Compilation. Do changes to assets earlier, e. g. in Compilation.hooks.processAssets. Make sure to select an appropriate stage from Compilation.PROCESS_ASSETS_STAGE_*. (Use node --trace-deprecation ... to show where the warning was created)

node:internal/process/esm_loader:40
      internalBinding('errors').triggerUncaughtException(
                                ^

[tsl] ERROR in /root/outline-apps/client/electron/linux_proxy_controller/build/CMakeFiles/OutlineProxyController.dir/compiler_depend.ts(1,1)
      TS1127: Invalid character.
[tsl] ERROR in /root/outline-apps/client/electron/linux_proxy_controller/build/CMakeFiles/OutlineProxyController.dir/compiler_depend.ts(1,3)
      TS1005: ';' expected.
[tsl] ERROR in /root/outline-apps/client/electron/linux_proxy_controller/build/CMakeFiles/OutlineProxyController.dir/compiler_depend.ts(1,9)
      TS1434: Unexpected keyword or identifier.
[tsl] ERROR in /root/outline-apps/client/electron/linux_proxy_controller/build/CMakeFiles/OutlineProxyController.dir/compiler_depend.ts(1,25)
      TS1434: Unexpected keyword or identifier.
[tsl] ERROR in /root/outline-apps/client/electron/linux_proxy_controller/build/CMakeFiles/OutlineProxyController.dir/compiler_depend.ts(1,28)
      TS1434: Unexpected keyword or identifier.
[tsl] ERROR in /root/outline-apps/client/electron/linux_proxy_controller/build/CMakeFiles/OutlineProxyController.dir/compiler_depend.ts(2,1)
      TS1127: Invalid character.
[tsl] ERROR in /root/outline-apps/client/electron/linux_proxy_controller/build/CMakeFiles/OutlineProxyController.dir/compiler_depend.ts(2,3)
      TS1005: ';' expected.
[tsl] ERROR in /root/outline-apps/client/electron/linux_proxy_controller/build/CMakeFiles/OutlineProxyController.dir/compiler_depend.ts(2,13)
      TS1434: Unexpected keyword or identifier.
[tsl] ERROR in /root/outline-apps/client/electron/linux_proxy_controller/build/CMakeFiles/OutlineProxyController.dir/compiler_depend.ts(2,22)
      TS1005: '(' expected.
[tsl] ERROR in /root/outline-apps/client/electron/linux_proxy_controller/build/CMakeFiles/OutlineProxyController.dir/compiler_depend.ts(2,31)
      TS1005: ';' expected.
[tsl] ERROR in /root/outline-apps/client/electron/linux_proxy_controller/build/CMakeFiles/OutlineProxyController.dir/compiler_depend.ts(2,41)
      TS1005: ';' expected.
[tsl] ERROR in /root/outline-apps/client/electron/linux_proxy_controller/build/CMakeFiles/OutlineProxyController.dir/compiler_depend.ts(2,54)
      TS1005: ')' expected.
[tsl] ERROR in /root/outline-apps/client/electron/linux_proxy_controller/build/CMakeFiles/OutlineProxyController.dir/compiler_depend.ts(2,69)
      TS1005: '(' expected.
[tsl] ERROR in /root/outline-apps/client/electron/linux_proxy_controller/build/CMakeFiles/OutlineProxyController.dir/compiler_depend.ts(2,92)
      TS1003: Identifier expected.
[tsl] ERROR in /root/outline-apps/client/electron/linux_proxy_controller/build/CMakeFiles/OutlineProxyController.dir/compiler_depend.ts(2,92)
      TS1109: Expression expected.
[tsl] ERROR in /root/outline-apps/client/electron/linux_proxy_controller/build/CMakeFiles/OutlineProxyController.dir/compiler_depend.ts(3,1)
      TS1005: ')' expected.
[tsl] ERROR in /root/outline-apps/client/electron/linux_proxy_controller/build/CMakeFiles/OutlineProxyController.dir/compiler_depend.ts(3,1)
      TS1005: ';' expected.
[tsl] ERROR in /root/outline-apps/client/electron/linux_proxy_controller/build/CMakeFiles/OutlineProxyController.dir/compiler_depend.ts(1,3)
      TS2304: Cannot find name 'CMAKE'.
[tsl] ERROR in /root/outline-apps/client/electron/linux_proxy_controller/build/CMakeFiles/OutlineProxyController.dir/compiler_depend.ts(1,9)
      TS2304: Cannot find name 'generated'.
[tsl] ERROR in /root/outline-apps/client/electron/linux_proxy_controller/build/CMakeFiles/OutlineProxyController.dir/compiler_depend.ts(1,25)
      TS2304: Cannot find name 'DO'.
[tsl] ERROR in /root/outline-apps/client/electron/linux_proxy_controller/build/CMakeFiles/OutlineProxyController.dir/compiler_depend.ts(1,28)
      TS2304: Cannot find name 'NOT'.
[tsl] ERROR in /root/outline-apps/client/electron/linux_proxy_controller/build/CMakeFiles/OutlineProxyController.dir/compiler_depend.ts(1,32)
      TS2304: Cannot find name 'EDIT'.
[tsl] ERROR in /root/outline-apps/client/electron/linux_proxy_controller/build/CMakeFiles/OutlineProxyController.dir/compiler_depend.ts(2,3)
      TS2304: Cannot find name 'Timestamp'.
[tsl] ERROR in /root/outline-apps/client/electron/linux_proxy_controller/build/CMakeFiles/OutlineProxyController.dir/compiler_depend.ts(2,13)
      TS2552: Cannot find name 'file'. Did you mean 'File'?
[tsl] ERROR in /root/outline-apps/client/electron/linux_proxy_controller/build/CMakeFiles/OutlineProxyController.dir/compiler_depend.ts(2,22)
      TS2304: Cannot find name 'compiler'.
[tsl] ERROR in /root/outline-apps/client/electron/linux_proxy_controller/build/CMakeFiles/OutlineProxyController.dir/compiler_depend.ts(2,31)
      TS2304: Cannot find name 'generated'.
[tsl] ERROR in /root/outline-apps/client/electron/linux_proxy_controller/build/CMakeFiles/OutlineProxyController.dir/compiler_depend.ts(2,41)
      TS2304: Cannot find name 'dependencies'.
[tsl] ERROR in /root/outline-apps/client/electron/linux_proxy_controller/build/CMakeFiles/OutlineProxyController.dir/compiler_depend.ts(2,54)
      TS2304: Cannot find name 'management'.
[tsl] ERROR in /root/outline-apps/client/electron/linux_proxy_controller/build/CMakeFiles/OutlineProxyController.dir/compiler_depend.ts(2,69)
      TS2304: Cannot find name 'OutlineProxyController'.
Thrown at:
    at loadESM (node:internal/process/esm_loader:40:33)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)


Node.js v18.20.8
ERROR(spawn_stream): node --trace-uncaught /root/outline-apps/client/src/www/build.action.mjs linux failed with exit code 1.}
No error output was given... Please fix this so it gives an error output :(

▶ action(client/src/www/build): ❌ Failed. ERROR(spawn_stream): node --trace-uncaught /root/outline-apps/client/electron/build.action.mjs linux failed with exit code 1.} Printing stderr: WARNING: building "linux" in [DEBUG] mode. Do not publish this build!! (node:32218) [DEP_WEBPACK_COMPILATION_ASSETS] DeprecationWarning: Compilation.assets will be frozen in future, all modifications are deprecated. BREAKING CHANGE: No more changes should happen to Compilation.assets after sealing the Compilation. Do changes to assets earlier, e. g. in Compilation.hooks.processAssets. Make sure to select an appropriate stage from Compilation.PROCESS_ASSETS_STAGE_*. (Use node --trace-deprecation ... to show where the warning was created)

node:internal/process/esm_loader:40
      internalBinding('errors').triggerUncaughtException(
                                ^

[tsl] ERROR in /root/outline-apps/client/electron/linux_proxy_controller/build/CMakeFiles/OutlineProxyController.dir/compiler_depend.ts(1,1)
      TS1127: Invalid character.
[tsl] ERROR in /root/outline-apps/client/electron/linux_proxy_controller/build/CMakeFiles/OutlineProxyController.dir/compiler_depend.ts(1,3)
      TS1005: ';' expected.
[tsl] ERROR in /root/outline-apps/client/electron/linux_proxy_controller/build/CMakeFiles/OutlineProxyController.dir/compiler_depend.ts(1,9)
      TS1434: Unexpected keyword or identifier.
[tsl] ERROR in /root/outline-apps/client/electron/linux_proxy_controller/build/CMakeFiles/OutlineProxyController.dir/compiler_depend.ts(1,25)
      TS1434: Unexpected keyword or identifier.
[tsl] ERROR in /root/outline-apps/client/electron/linux_proxy_controller/build/CMakeFiles/OutlineProxyController.dir/compiler_depend.ts(1,28)
      TS1434: Unexpected keyword or identifier.
[tsl] ERROR in /root/outline-apps/client/electron/linux_proxy_controller/build/CMakeFiles/OutlineProxyController.dir/compiler_depend.ts(2,1)
      TS1127: Invalid character.
[tsl] ERROR in /root/outline-apps/client/electron/linux_proxy_controller/build/CMakeFiles/OutlineProxyController.dir/compiler_depend.ts(2,3)
      TS1005: ';' expected.
[tsl] ERROR in /root/outline-apps/client/electron/linux_proxy_controller/build/CMakeFiles/OutlineProxyController.dir/compiler_depend.ts(2,13)
      TS1434: Unexpected keyword or identifier.
[tsl] ERROR in /root/outline-apps/client/electron/linux_proxy_controller/build/CMakeFiles/OutlineProxyController.dir/compiler_depend.ts(2,22)
      TS1005: '(' expected.
[tsl] ERROR in /root/outline-apps/client/electron/linux_proxy_controller/build/CMakeFiles/OutlineProxyController.dir/compiler_depend.ts(2,31)
      TS1005: ';' expected.
[tsl] ERROR in /root/outline-apps/client/electron/linux_proxy_controller/build/CMakeFiles/OutlineProxyController.dir/compiler_depend.ts(2,41)
      TS1005: ';' expected.
[tsl] ERROR in /root/outline-apps/client/electron/linux_proxy_controller/build/CMakeFiles/OutlineProxyController.dir/compiler_depend.ts(2,54)
      TS1005: ')' expected.
[tsl] ERROR in /root/outline-apps/client/electron/linux_proxy_controller/build/CMakeFiles/OutlineProxyController.dir/compiler_depend.ts(2,69)
      TS1005: '(' expected.
[tsl] ERROR in /root/outline-apps/client/electron/linux_proxy_controller/build/CMakeFiles/OutlineProxyController.dir/compiler_depend.ts(2,92)
      TS1003: Identifier expected.
[tsl] ERROR in /root/outline-apps/client/electron/linux_proxy_controller/build/CMakeFiles/OutlineProxyController.dir/compiler_depend.ts(2,92)
      TS1109: Expression expected.
[tsl] ERROR in /root/outline-apps/client/electron/linux_proxy_controller/build/CMakeFiles/OutlineProxyController.dir/compiler_depend.ts(3,1)
      TS1005: ')' expected.
[tsl] ERROR in /root/outline-apps/client/electron/linux_proxy_controller/build/CMakeFiles/OutlineProxyController.dir/compiler_depend.ts(3,1)
      TS1005: ';' expected.
[tsl] ERROR in /root/outline-apps/client/electron/linux_proxy_controller/build/CMakeFiles/OutlineProxyController.dir/compiler_depend.ts(1,3)
      TS2304: Cannot find name 'CMAKE'.
[tsl] ERROR in /root/outline-apps/client/electron/linux_proxy_controller/build/CMakeFiles/OutlineProxyController.dir/compiler_depend.ts(1,9)
      TS2304: Cannot find name 'generated'.
[tsl] ERROR in /root/outline-apps/client/electron/linux_proxy_controller/build/CMakeFiles/OutlineProxyController.dir/compiler_depend.ts(1,25)
      TS2304: Cannot find name 'DO'.
[tsl] ERROR in /root/outline-apps/client/electron/linux_proxy_controller/build/CMakeFiles/OutlineProxyController.dir/compiler_depend.ts(1,28)
      TS2304: Cannot find name 'NOT'.
[tsl] ERROR in /root/outline-apps/client/electron/linux_proxy_controller/build/CMakeFiles/OutlineProxyController.dir/compiler_depend.ts(1,32)
      TS2304: Cannot find name 'EDIT'.
[tsl] ERROR in /root/outline-apps/client/electron/linux_proxy_controller/build/CMakeFiles/OutlineProxyController.dir/compiler_depend.ts(2,3)
      TS2304: Cannot find name 'Timestamp'.
[tsl] ERROR in /root/outline-apps/client/electron/linux_proxy_controller/build/CMakeFiles/OutlineProxyController.dir/compiler_depend.ts(2,13)
      TS2552: Cannot find name 'file'. Did you mean 'File'?
[tsl] ERROR in /root/outline-apps/client/electron/linux_proxy_controller/build/CMakeFiles/OutlineProxyController.dir/compiler_depend.ts(2,22)
      TS2304: Cannot find name 'compiler'.
[tsl] ERROR in /root/outline-apps/client/electron/linux_proxy_controller/build/CMakeFiles/OutlineProxyController.dir/compiler_depend.ts(2,31)
      TS2304: Cannot find name 'generated'.
[tsl] ERROR in /root/outline-apps/client/electron/linux_proxy_controller/build/CMakeFiles/OutlineProxyController.dir/compiler_depend.ts(2,41)
      TS2304: Cannot find name 'dependencies'.
[tsl] ERROR in /root/outline-apps/client/electron/linux_proxy_controller/build/CMakeFiles/OutlineProxyController.dir/compiler_depend.ts(2,54)
      TS2304: Cannot find name 'management'.
[tsl] ERROR in /root/outline-apps/client/electron/linux_proxy_controller/build/CMakeFiles/OutlineProxyController.dir/compiler_depend.ts(2,69)
      TS2304: Cannot find name 'OutlineProxyController'.
Thrown at:
    at loadESM (node:internal/process/esm_loader:40:33)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)


Node.js v18.20.8
ERROR(spawn_stream): node --trace-uncaught /root/outline-apps/client/src/www/build.action.mjs linux failed with exit code 1.}
No error output was given... Please fix this so it gives an error output :(

▶ action(client/src/www/build): ❌ Failed. ▶ action(client/electron/build): ❌ Failed.

</details>

dmatora avatar Mar 29 '25 19:03 dmatora