mirror of
https://github.com/Mo3he/Axis_Cam_Tailscale.git
synced 2026-10-01 12:05:37 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f3556d3e76 | ||
|
|
d5e2be837f | ||
|
|
10f5cec1dd | ||
|
|
eb46f0f201 | ||
|
|
5a6aada216 | ||
|
|
65509f037e | ||
|
|
5e27f2f6ca | ||
|
|
f27769f415 | ||
|
|
b8038797f3 | ||
|
|
07f73648bf | ||
|
|
108ea203b4 | ||
|
|
4b282e81e6 | ||
|
|
34943f62b9 | ||
|
|
3d12e28a1f | ||
|
|
b453bcb6f2 | ||
|
|
616d270350 | ||
|
|
17c2ae705c | ||
|
|
54be4dd84f | ||
|
|
452f7d54d8 | ||
|
|
b444c964f6 | ||
|
|
e0178b531e | ||
|
|
46f7a524c0 | ||
|
|
f5ab42fd3f | ||
|
|
019beb3c73 | ||
|
|
db343b4447 | ||
|
|
f3163cae45 | ||
|
|
b7391743d6 | ||
|
|
2b373227d2 | ||
|
|
fa4e6edde1 | ||
|
|
c26643adf0 | ||
|
|
39bc29e1ab | ||
|
|
af3813135a | ||
|
|
5fe5a01f59 | ||
|
|
080b3bb90e | ||
|
|
41b9bd04b5 | ||
|
|
86d902d289 | ||
|
|
f4b64b7f3a | ||
|
|
d00a45effb | ||
|
|
74af48b024 | ||
|
|
0e89c01546 | ||
|
|
87de22b8a1 | ||
|
|
0ddd3c1ee2 | ||
|
|
0e6227149f | ||
|
|
7943176695 | ||
|
|
ad5e52aff3 | ||
|
|
70e4e8d49d | ||
|
|
b2aec2cbf8 | ||
|
|
343fe09e1f | ||
|
|
852a7546b8 | ||
|
|
5ab1a3e063 | ||
|
|
e283930aaf | ||
|
|
1062a63513 | ||
|
|
0d2e5da139 | ||
|
|
542c43fc2e | ||
|
|
fd3ea4b747 | ||
|
|
1860565cff |
@@ -0,0 +1,13 @@
|
|||||||
|
# These are supported funding model platforms
|
||||||
|
|
||||||
|
github: Mo3he # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
||||||
|
patreon: # Replace with a single Patreon username
|
||||||
|
open_collective: # Replace with a single Open Collective username
|
||||||
|
ko_fi: # Replace with a single Ko-fi username
|
||||||
|
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||||
|
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||||
|
liberapay: # Replace with a single Liberapay username
|
||||||
|
issuehunt: # Replace with a single IssueHunt username
|
||||||
|
otechie: # Replace with a single Otechie username
|
||||||
|
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
|
||||||
|
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
||||||
+2
-1
@@ -1 +1,2 @@
|
|||||||
.DS_Store
|
**/.DS_Store
|
||||||
|
**/build
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
@Mo3he
|
|
||||||
@pandosme
|
|
||||||
@johanssonfrans
|
|
||||||
@@ -6,6 +6,7 @@ All types of contributions are encouraged and valued. See the [Table of contents
|
|||||||
> - Tweet about it
|
> - Tweet about it
|
||||||
> - Refer this project in your project's readme
|
> - Refer this project in your project's readme
|
||||||
> - Mention the project at local meetups and tell your friends/colleagues
|
> - Mention the project at local meetups and tell your friends/colleagues
|
||||||
|
> - A sponsorship of any amount is always appreciated
|
||||||
|
|
||||||
<!-- omit in toc -->
|
<!-- omit in toc -->
|
||||||
## Table of contents
|
## Table of contents
|
||||||
|
|||||||
@@ -2,7 +2,36 @@
|
|||||||
|
|
||||||
This ACAP packages the scripts and files required to install the Tailscale VPN client on Axis Cameras.
|
This ACAP packages the scripts and files required to install the Tailscale VPN client on Axis Cameras.
|
||||||
|
|
||||||
Current version 1.34.0
|
Current version 1.82.0
|
||||||
|
|
||||||
|
https://tailscale.com/changelog/
|
||||||
|
|
||||||
|
The "ROOT" versions require root privileges on the camera and will not work on OS 12 up.
|
||||||
|
|
||||||
|
If you like my work and want to help me to keep maintaining it, a sponsor would be amazing, every bit helps.
|
||||||
|
|
||||||
|
[:dollar: Sponsor](https://github.com/sponsors/Mo3he)
|
||||||
|
|
||||||
|
## Testers needed
|
||||||
|
|
||||||
|
I have added a new "custom" version (Tailscale_VPN_Custom_1_82_0_aarch64.eap) which allows you to set a custom server and auth key for use of headscale.
|
||||||
|
|
||||||
|
Click the three dots then "settings" to add your details.
|
||||||
|
If you get a tls error restart the app.
|
||||||
|
|
||||||
|
Please give it a try and let me know if it works well or if you have issues.
|
||||||
|
|
||||||
|
## Good news, everyone!
|
||||||
|
|
||||||
|
We have found a way to run the Tailscale ACAP without root privileges allowing it to run on Axis OS 12.
|
||||||
|
|
||||||
|
Please note this new version runs in user space networking mode and therefore has some limitations, most notably the camera will not be able to connect out to other Tailscale nodes.
|
||||||
|
This does not affect the normal use case of using Tailscale to connect to the camera.
|
||||||
|
If you require full functionality, please do not upgrade to Axis OS 12 and use the version marked "ROOT".
|
||||||
|
|
||||||
|
The changes are implemented from version 1.68.1 of the acap.
|
||||||
|
|
||||||
|
Thank you for your continued support.
|
||||||
|
|
||||||
## Purpose
|
## Purpose
|
||||||
|
|
||||||
@@ -37,9 +66,6 @@ note that you need to enclose your password with quotes (`'`) if it contains spe
|
|||||||
|
|
||||||
The recommended way to install this ACAP is to use the pre built eap file.
|
The recommended way to install this ACAP is to use the pre built eap file.
|
||||||
Go to "Apps" on the camera and click "Add app".
|
Go to "Apps" on the camera and click "Add app".
|
||||||
Once installed it will look like below.
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
|
|
||||||
## Using the Tailscale ACAP
|
## Using the Tailscale ACAP
|
||||||
@@ -75,7 +101,17 @@ docker build --tag <package name> .
|
|||||||
docker cp $(docker create <package name>):/opt/app ./build
|
docker cp $(docker create <package name>):/opt/app ./build
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Thanks to wesQ3 there is now also a version in the "all" folder with a script that simplifies the build process with the following changes.
|
||||||
|
|
||||||
|
1. Architecture specific build directories are not required, target arch is now an argument
|
||||||
|
|
||||||
|
2. manifest files are templated as part of the build
|
||||||
|
|
||||||
|
3. Tailscale binaries are downloaded as part of the build
|
||||||
|
|
||||||
|
|
||||||
|
## Star History
|
||||||
|
|
||||||
|
[](https://www.star-history.com/#Mo3he/Axis_Cam_Tailscale&Date)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
echo "Starting Service"
|
echo "Starting Service"
|
||||||
chmod 777 /usr/local/packages/Tailscale_VPN/lib/tailscale
|
chmod 777 /usr/local/packages/Tailscale_VPN/lib/tailscale
|
||||||
chmod 777 /usr/local/packages/Tailscale_VPN/lib/tailscaled
|
chmod 777 /usr/local/packages/Tailscale_VPN/lib/tailscaled
|
||||||
/usr/local/packages/Tailscale_VPN/lib/tailscaled &
|
/usr/local/packages/Tailscale_VPN/lib/tailscaled --tun=userspace-networking --socket=/usr/local/packages/Tailscale_VPN/tailscaled.sock &
|
||||||
echo "Service Started"
|
echo "Service Started"
|
||||||
echo "Scroll to Bottom for link"
|
echo "Scroll to Bottom for link"
|
||||||
/usr/local/packages/Tailscale_VPN/lib/tailscale up
|
/usr/local/packages/Tailscale_VPN/lib/tailscale --socket=/usr/local/packages/Tailscale_VPN/tailscaled.sock up
|
||||||
wait
|
wait
|
||||||
+15
-20
@@ -1,23 +1,18 @@
|
|||||||
{
|
{
|
||||||
"schemaVersion": "1.3",
|
"schemaVersion": "1.3",
|
||||||
"acapPackageConf": {
|
"acapPackageConf": {
|
||||||
"setup": {
|
"setup": {
|
||||||
"architecture": "aarch64",
|
"appName": "Tailscale_VPN",
|
||||||
"appName": "Tailscale_VPN",
|
"friendlyName": "Tailscale VPN",
|
||||||
"friendlyName": "Tailscale VPN",
|
"vendor": "Tailscale - Packaged by Mo3he",
|
||||||
"vendor": "Tailscale - Packaged by Axis Labs",
|
"embeddedSdkVersion": "3.0",
|
||||||
"embeddedSdkVersion": "3.0",
|
"vendorUrl": "https://www.tailscale.com",
|
||||||
"user": {
|
"runMode": "once",
|
||||||
"group": "root",
|
"version": "1.84.0",
|
||||||
"username": "root"
|
"architecture": "aarch64"
|
||||||
},
|
|
||||||
"vendorUrl": "https://www.tailscale.com",
|
|
||||||
"runMode": "once",
|
|
||||||
"version": "1.34.0"
|
|
||||||
},
|
},
|
||||||
"configuration": {
|
"configuration": {
|
||||||
"settingPage": "index.html"
|
"settingPage": "index.html"
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
Binary file not shown.
Binary file not shown.
@@ -1,23 +0,0 @@
|
|||||||
{
|
|
||||||
"schemaVersion": "1.3",
|
|
||||||
"acapPackageConf": {
|
|
||||||
"setup": {
|
|
||||||
"architecture": "aarch64",
|
|
||||||
"appName": "Tailscale_VPN",
|
|
||||||
"friendlyName": "Tailscale VPN",
|
|
||||||
"vendor": "Tailscale - Packaged by Axis Labs",
|
|
||||||
"embeddedSdkVersion": "3.0",
|
|
||||||
"user": {
|
|
||||||
"group": "root",
|
|
||||||
"username": "root"
|
|
||||||
},
|
|
||||||
"vendorUrl": "https://www.tailscale.com",
|
|
||||||
"runMode": "once",
|
|
||||||
"version": "1.34.0"
|
|
||||||
},
|
|
||||||
"configuration": {
|
|
||||||
"settingPage": "index.html"
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
PACKAGENAME="Tailscale VPN"
|
|
||||||
APPTYPE="aarch64"
|
|
||||||
APPNAME="Tailscale_VPN"
|
|
||||||
APPID=""
|
|
||||||
LICENSENAME="Available"
|
|
||||||
LICENSEPAGE="none"
|
|
||||||
VENDOR="Tailscale - Packaged by Axis Labs"
|
|
||||||
REQEMBDEVVERSION="3.0"
|
|
||||||
APPMAJORVERSION="1"
|
|
||||||
APPMINORVERSION="34"
|
|
||||||
APPMICROVERSION="0"
|
|
||||||
APPGRP="root"
|
|
||||||
APPUSR="root"
|
|
||||||
APPOPTS=""
|
|
||||||
OTHERFILES=""
|
|
||||||
SETTINGSPAGEFILE="index.html"
|
|
||||||
SETTINGSPAGETEXT=""
|
|
||||||
VENDORHOMEPAGELINK='<a href="https://www.tailscale.com" target="_blank">www.tailscale.com</a>'
|
|
||||||
PREUPGRADESCRIPT=""
|
|
||||||
POSTINSTALLSCRIPT=""
|
|
||||||
STARTMODE="once"
|
|
||||||
HTTPCGIPATHS=""
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
APPTYPE="aarch64"
|
|
||||||
APPNAME="Tailscale_VPN"
|
|
||||||
PACKAGENAME="Tailscale VPN"
|
|
||||||
VENDOR="Tailscale - Packaged by Axis Labs"
|
|
||||||
REQEMBDEVVERSION="3.0"
|
|
||||||
APPGRP="root"
|
|
||||||
APPUSR="root"
|
|
||||||
VENDORHOMEPAGELINK='<a href="https://www.tailscale.com" target="_blank">www.tailscale.com</a>'
|
|
||||||
STARTMODE="once"
|
|
||||||
APPMAJORVERSION="1"
|
|
||||||
APPMINORVERSION="34"
|
|
||||||
APPMICROVERSION="0"
|
|
||||||
SETTINGSPAGEFILE="index.html"
|
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
ARG ARCH=aarch64
|
||||||
|
ARG VERSION=1.3
|
||||||
|
ARG UBUNTU_VERSION=22.04
|
||||||
|
ARG REPO=axisecp
|
||||||
|
ARG SDK=acap-native-sdk
|
||||||
|
|
||||||
|
FROM ${REPO}/${SDK}:${VERSION}-${ARCH}-ubuntu${UBUNTU_VERSION}
|
||||||
|
|
||||||
|
# Building the ACAP application
|
||||||
|
COPY ./app /opt/app/
|
||||||
|
WORKDIR /opt/app
|
||||||
|
RUN . /opt/axis/acapsdk/environment-setup* && acap-build ./
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
To build, from main directory
|
||||||
|
|
||||||
|
docker build --tag aarch64 .
|
||||||
|
|
||||||
|
docker cp $(docker create aarch64):/opt/app ./build
|
||||||
@@ -6,5 +6,5 @@
|
|||||||
/usr/local/packages/Tailscale_VPN/lib/tailscaled &
|
/usr/local/packages/Tailscale_VPN/lib/tailscaled &
|
||||||
echo "Service Started"
|
echo "Service Started"
|
||||||
echo "Scroll to Bottom for link"
|
echo "Scroll to Bottom for link"
|
||||||
/usr/local/packages/Tailscale_VPN/lib/tailscale up
|
/usr/local/packages/Tailscale_VPN/lib/tailscale up --accept-routes
|
||||||
wait
|
wait
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"schemaVersion": "1.3",
|
||||||
|
"acapPackageConf": {
|
||||||
|
"setup": {
|
||||||
|
"appName": "Tailscale_VPN",
|
||||||
|
"friendlyName": "Tailscale VPN",
|
||||||
|
"vendor": "Tailscale - Packaged by Mo3he",
|
||||||
|
"embeddedSdkVersion": "3.0",
|
||||||
|
"user": {
|
||||||
|
"group": "root",
|
||||||
|
"username": "root"
|
||||||
|
},
|
||||||
|
"vendorUrl": "https://www.tailscale.com",
|
||||||
|
"runMode": "once",
|
||||||
|
"version": "1.84.0",
|
||||||
|
"architecture": "aarch64"
|
||||||
|
},
|
||||||
|
"configuration": {
|
||||||
|
"settingPage": "index.html"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
ARG ARCH=aarch64
|
||||||
|
ARG VERSION=12.3.0
|
||||||
|
ARG UBUNTU_VERSION=24.04
|
||||||
|
ARG REPO=axisecp
|
||||||
|
ARG SDK=acap-native-sdk
|
||||||
|
|
||||||
|
FROM ${REPO}/${SDK}:${VERSION}-${ARCH}-ubuntu${UBUNTU_VERSION}
|
||||||
|
|
||||||
|
# Building the ACAP application
|
||||||
|
COPY ./app /opt/app/
|
||||||
|
WORKDIR /opt/app
|
||||||
|
RUN . /opt/axis/acapsdk/environment-setup* && acap-build .
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
To build, from main directory
|
||||||
|
|
||||||
|
docker build --tag aarch64 .
|
||||||
|
|
||||||
|
docker cp $(docker create aarch64):/opt/app ./build
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
PROGS = serverconfig
|
||||||
|
SRCS = config_updater.c
|
||||||
|
OBJS = $(SRCS:.c=.o)
|
||||||
|
|
||||||
|
PKGS = glib-2.0 gio-2.0 axparameter
|
||||||
|
|
||||||
|
CFLAGS += $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) pkg-config --cflags $(PKGS))
|
||||||
|
LDLIBS += $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) pkg-config --libs $(PKGS))
|
||||||
|
|
||||||
|
CFLAGS += -Wall \
|
||||||
|
-Wextra \
|
||||||
|
-Wformat=2 \
|
||||||
|
-Wpointer-arith \
|
||||||
|
-Wbad-function-cast \
|
||||||
|
-Wstrict-prototypes \
|
||||||
|
-Wmissing-prototypes \
|
||||||
|
-Winline \
|
||||||
|
-Wdisabled-optimization \
|
||||||
|
-Wfloat-equal \
|
||||||
|
-W \
|
||||||
|
-Werror
|
||||||
|
|
||||||
|
all: $(PROGS)
|
||||||
|
|
||||||
|
$(PROGS): $(OBJS)
|
||||||
|
$(CC) $(LDFLAGS) $^ $(LIBS) $(LDLIBS) -o $@
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f $(PROGS) *.o *.eap* *_LICENSE.txt package.conf* param.conf tmp*
|
||||||
@@ -0,0 +1,232 @@
|
|||||||
|
/**
|
||||||
|
* Simple file-based configuration updater for Tailscale
|
||||||
|
* This avoids the AXParameter system and just writes directly to a config file
|
||||||
|
*/
|
||||||
|
#include <axsdk/axparameter.h>
|
||||||
|
#include <glib-unix.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include <syslog.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/wait.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
|
#define APP_NAME "serverconfig"
|
||||||
|
#define CONFIG_FILE "/usr/local/packages/serverconfig/config.txt"
|
||||||
|
#define SCRIPT_PATH "/usr/local/packages/serverconfig/start_tailscale.sh"
|
||||||
|
#define SCRIPT_SOURCE "/usr/local/packages/serverconfig/lib/start_tailscale.sh"
|
||||||
|
|
||||||
|
static gboolean signal_handler(gpointer loop) {
|
||||||
|
g_main_loop_quit((GMainLoop*)loop);
|
||||||
|
syslog(LOG_INFO, "Configuration updater stopping.");
|
||||||
|
return G_SOURCE_REMOVE;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Copy script from lib folder to main directory
|
||||||
|
static void copy_script_file(void) {
|
||||||
|
char buffer[4096];
|
||||||
|
ssize_t bytes_read, bytes_written;
|
||||||
|
int source_fd, dest_fd;
|
||||||
|
|
||||||
|
syslog(LOG_INFO, "Copying script from %s to %s", SCRIPT_SOURCE, SCRIPT_PATH);
|
||||||
|
|
||||||
|
// Open source file
|
||||||
|
source_fd = open(SCRIPT_SOURCE, O_RDONLY);
|
||||||
|
if (source_fd < 0) {
|
||||||
|
syslog(LOG_ERR, "Failed to open source script: %s", strerror(errno));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Open destination file (create if doesn't exist, truncate if exists)
|
||||||
|
dest_fd = open(SCRIPT_PATH, O_WRONLY | O_CREAT | O_TRUNC, 0755);
|
||||||
|
if (dest_fd < 0) {
|
||||||
|
syslog(LOG_ERR, "Failed to open destination script: %s", strerror(errno));
|
||||||
|
close(source_fd);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Copy the file
|
||||||
|
while ((bytes_read = read(source_fd, buffer, sizeof(buffer))) > 0) {
|
||||||
|
bytes_written = write(dest_fd, buffer, bytes_read);
|
||||||
|
if (bytes_written != bytes_read) {
|
||||||
|
syslog(LOG_ERR, "Error writing to destination file: %s", strerror(errno));
|
||||||
|
close(source_fd);
|
||||||
|
close(dest_fd);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Close file descriptors
|
||||||
|
close(source_fd);
|
||||||
|
close(dest_fd);
|
||||||
|
|
||||||
|
// Make the script executable
|
||||||
|
if (chmod(SCRIPT_PATH, 0755) != 0) {
|
||||||
|
syslog(LOG_ERR, "Failed to make script executable: %s", strerror(errno));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
syslog(LOG_INFO, "Script copied and made executable successfully");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute the Tailscale script
|
||||||
|
static void start_tailscale(void) {
|
||||||
|
syslog(LOG_INFO, "Starting Tailscale VPN script");
|
||||||
|
|
||||||
|
// Check if script exists, if not, copy it
|
||||||
|
struct stat st;
|
||||||
|
if (stat(SCRIPT_PATH, &st) != 0) {
|
||||||
|
syslog(LOG_INFO, "Script not found at %s, copying from lib folder", SCRIPT_PATH);
|
||||||
|
copy_script_file();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Fork and execute the script
|
||||||
|
pid_t pid = fork();
|
||||||
|
if (pid < 0) {
|
||||||
|
syslog(LOG_ERR, "Failed to fork for Tailscale script: %s", strerror(errno));
|
||||||
|
return;
|
||||||
|
} else if (pid == 0) {
|
||||||
|
// Child process - execute the script
|
||||||
|
execl(SCRIPT_PATH, "start_tailscale.sh", NULL);
|
||||||
|
|
||||||
|
// If we get here, execl failed
|
||||||
|
syslog(LOG_ERR, "Failed to execute Tailscale script: %s", strerror(errno));
|
||||||
|
_exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
syslog(LOG_INFO, "Tailscale script started with PID: %d", pid);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update the configuration file with current parameter values
|
||||||
|
static void update_config_file(AXParameter* handle) {
|
||||||
|
GError* error = NULL;
|
||||||
|
gchar* server_value = NULL;
|
||||||
|
gchar* key_value = NULL;
|
||||||
|
FILE* file;
|
||||||
|
|
||||||
|
// Get parameter values
|
||||||
|
if (!ax_parameter_get(handle, "CustomServer", &server_value, &error)) {
|
||||||
|
syslog(LOG_ERR, "Failed to get CustomServer: %s",
|
||||||
|
error ? error->message : "unknown error");
|
||||||
|
if (error) g_error_free(error);
|
||||||
|
error = NULL;
|
||||||
|
server_value = g_strdup("");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!ax_parameter_get(handle, "AuthKey", &key_value, &error)) {
|
||||||
|
syslog(LOG_ERR, "Failed to get AuthKey: %s",
|
||||||
|
error ? error->message : "unknown error");
|
||||||
|
if (error) g_error_free(error);
|
||||||
|
key_value = g_strdup("");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Write to config file
|
||||||
|
file = fopen(CONFIG_FILE, "w");
|
||||||
|
if (file) {
|
||||||
|
fprintf(file, "custom_server=%s\n", server_value ? server_value : "");
|
||||||
|
fprintf(file, "auth_key=%s\n", key_value ? key_value : "");
|
||||||
|
fclose(file);
|
||||||
|
|
||||||
|
// Set permissions to ensure the file is readable
|
||||||
|
chmod(CONFIG_FILE, 0644);
|
||||||
|
|
||||||
|
syslog(LOG_INFO, "Updated configuration file: custom_server=%s",
|
||||||
|
server_value ? server_value : "");
|
||||||
|
syslog(LOG_INFO, "Updated configuration file: auth_key=%s",
|
||||||
|
key_value && strlen(key_value) > 0 ? "(set)" : "(empty)");
|
||||||
|
} else {
|
||||||
|
syslog(LOG_ERR, "Failed to open config file for writing");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Clean up
|
||||||
|
g_free(server_value);
|
||||||
|
g_free(key_value);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Handle parameter changes
|
||||||
|
static void parameter_changed(const gchar* name, const gchar* value, gpointer handle_void_ptr) {
|
||||||
|
AXParameter* handle = handle_void_ptr;
|
||||||
|
|
||||||
|
// Extract simple parameter name from the fully qualified name
|
||||||
|
const char* simple_name = name;
|
||||||
|
const char* prefix = "root." APP_NAME ".";
|
||||||
|
if (strncmp(name, prefix, strlen(prefix)) == 0) {
|
||||||
|
simple_name = name + strlen(prefix);
|
||||||
|
}
|
||||||
|
|
||||||
|
syslog(LOG_INFO, "Parameter changed: %s = %s", simple_name, value);
|
||||||
|
|
||||||
|
// Update config file whenever any parameter changes
|
||||||
|
update_config_file(handle);
|
||||||
|
|
||||||
|
// Restart Tailscale to apply the new settings
|
||||||
|
start_tailscale();
|
||||||
|
}
|
||||||
|
|
||||||
|
int main(void) {
|
||||||
|
GError* error = NULL;
|
||||||
|
GMainLoop* loop = NULL;
|
||||||
|
|
||||||
|
// Open syslog for logging
|
||||||
|
openlog(APP_NAME, LOG_PID, LOG_USER);
|
||||||
|
syslog(LOG_INFO, "Config updater starting");
|
||||||
|
|
||||||
|
// Initialize parameter handling
|
||||||
|
AXParameter* handle = ax_parameter_new(APP_NAME, &error);
|
||||||
|
if (handle == NULL) {
|
||||||
|
syslog(LOG_ERR, "Failed to initialize parameters: %s",
|
||||||
|
error ? error->message : "unknown error");
|
||||||
|
if (error) g_error_free(error);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ensure script is copied from lib folder
|
||||||
|
copy_script_file();
|
||||||
|
|
||||||
|
// Create initial config file
|
||||||
|
update_config_file(handle);
|
||||||
|
|
||||||
|
// Start Tailscale VPN script
|
||||||
|
start_tailscale();
|
||||||
|
|
||||||
|
// Register for parameter changes
|
||||||
|
if (!ax_parameter_register_callback(handle, "CustomServer", parameter_changed, handle, &error)) {
|
||||||
|
syslog(LOG_ERR, "Failed to register CustomServer callback: %s",
|
||||||
|
error ? error->message : "unknown error");
|
||||||
|
if (error) g_error_free(error);
|
||||||
|
error = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!ax_parameter_register_callback(handle, "AuthKey", parameter_changed, handle, &error)) {
|
||||||
|
syslog(LOG_ERR, "Failed to register AuthKey callback: %s",
|
||||||
|
error ? error->message : "unknown error");
|
||||||
|
if (error) g_error_free(error);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Register for parameter changes with fully qualified names as fallback
|
||||||
|
if (!ax_parameter_register_callback(handle, "root." APP_NAME ".CustomServer", parameter_changed, handle, NULL)) {
|
||||||
|
syslog(LOG_INFO, "Fallback CustomServer registration failed (this may be normal)");
|
||||||
|
}
|
||||||
|
if (!ax_parameter_register_callback(handle, "root." APP_NAME ".AuthKey", parameter_changed, handle, NULL)) {
|
||||||
|
syslog(LOG_INFO, "Fallback AuthKey registration failed (this may be normal)");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set up main loop
|
||||||
|
loop = g_main_loop_new(NULL, FALSE);
|
||||||
|
g_unix_signal_add(SIGTERM, signal_handler, loop);
|
||||||
|
g_unix_signal_add(SIGINT, signal_handler, loop);
|
||||||
|
|
||||||
|
syslog(LOG_INFO, "Config updater running. Waiting for parameter changes...");
|
||||||
|
g_main_loop_run(loop);
|
||||||
|
|
||||||
|
// Clean up
|
||||||
|
g_main_loop_unref(loop);
|
||||||
|
ax_parameter_free(handle);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<body>
|
||||||
|
<head>
|
||||||
|
<h1 style="color:red;">Scroll to the bottom to find authentication URL</h1>
|
||||||
|
<script>
|
||||||
|
function refreshIFrame() {
|
||||||
|
var x = document.getElementById("*Your_iframe_id*");
|
||||||
|
x.contentWindow.location.reload();
|
||||||
|
var t = setTimeout(refreshIFrame, 5000);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body onload="refreshIFrame()">
|
||||||
|
<iframe id="*Your_iframe_id*" src= "/axis-cgi/admin/systemlog.cgi?appname=serverconfig" style="height:600px;width:100%;border: none;" ></iframe>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Make sure this script terminates any existing Tailscale processes before starting new ones
|
||||||
|
|
||||||
|
# Kill any existing tailscaled processes
|
||||||
|
pkill -f tailscaled || true
|
||||||
|
|
||||||
|
# Simple script to start Tailscale with custom configuration
|
||||||
|
CONFIG_FILE="/usr/local/packages/serverconfig/config.txt"
|
||||||
|
TAILSCALED_PATH="/usr/local/packages/serverconfig/lib/tailscaled"
|
||||||
|
TAILSCALE_PATH="/usr/local/packages/serverconfig/lib/tailscale"
|
||||||
|
SOCKET_PATH="/usr/local/packages/serverconfig/tailscaled.sock"
|
||||||
|
|
||||||
|
# Log to syslog
|
||||||
|
logger -t "tailscale_script" "Starting Tailscale VPN service"
|
||||||
|
|
||||||
|
# Set execute permissions
|
||||||
|
chmod 755 $TAILSCALED_PATH
|
||||||
|
chmod 755 $TAILSCALE_PATH
|
||||||
|
|
||||||
|
# Read configuration (if exists)
|
||||||
|
CUSTOM_SERVER=""
|
||||||
|
AUTH_KEY=""
|
||||||
|
if [ -f "$CONFIG_FILE" ]; then
|
||||||
|
logger -t "tailscale_script" "Reading configuration from $CONFIG_FILE"
|
||||||
|
# Read values from config file
|
||||||
|
while IFS='=' read -r key value; do
|
||||||
|
case "$key" in
|
||||||
|
"custom_server") CUSTOM_SERVER="$value" ;;
|
||||||
|
"auth_key") AUTH_KEY="$value" ;;
|
||||||
|
esac
|
||||||
|
done < "$CONFIG_FILE"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Start tailscaled
|
||||||
|
logger -t "tailscale_script" "Starting tailscaled daemon"
|
||||||
|
$TAILSCALED_PATH --tun=userspace-networking --socket=$SOCKET_PATH &
|
||||||
|
TAILSCALED_PID=$!
|
||||||
|
|
||||||
|
# Wait for tailscaled to initialize
|
||||||
|
sleep 2
|
||||||
|
|
||||||
|
# Build up the command based on available parameters
|
||||||
|
TAILSCALE_CMD="$TAILSCALE_PATH --socket=$SOCKET_PATH up"
|
||||||
|
|
||||||
|
if [ -n "$CUSTOM_SERVER" ]; then
|
||||||
|
logger -t "tailscale_script" "Using custom server: $CUSTOM_SERVER"
|
||||||
|
TAILSCALE_CMD="$TAILSCALE_CMD --login-server $CUSTOM_SERVER"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$AUTH_KEY" ]; then
|
||||||
|
logger -t "tailscale_script" "Using authentication key"
|
||||||
|
TAILSCALE_CMD="$TAILSCALE_CMD --authkey $AUTH_KEY"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Connect to Tailscale network
|
||||||
|
logger -t "tailscale_script" "Running: $TAILSCALE_CMD"
|
||||||
|
eval $TAILSCALE_CMD
|
||||||
|
|
||||||
|
# Keep the script running to maintain the tailscaled process
|
||||||
|
logger -t "tailscale_script" "Tailscale VPN is running"
|
||||||
|
logger -t "tailscale_script" "To change settings, modify parameters in ACAP web interface"
|
||||||
|
|
||||||
|
# Wait for tailscaled process to exit
|
||||||
|
wait $TAILSCALED_PID
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
"schemaVersion": "1.7.3",
|
||||||
|
"acapPackageConf": {
|
||||||
|
"setup": {
|
||||||
|
"friendlyName": "Tailscale VPN",
|
||||||
|
"appName": "serverconfig",
|
||||||
|
"vendor": "Tailscale - Packaged by Mo3he",
|
||||||
|
"embeddedSdkVersion": "3.0",
|
||||||
|
"vendorUrl": "https://www.tailscale.com",
|
||||||
|
"runMode": "respawn",
|
||||||
|
"version": "1.84.0"
|
||||||
|
},
|
||||||
|
"configuration": {
|
||||||
|
"settingPage": "index.html",
|
||||||
|
"paramConfig": [
|
||||||
|
{
|
||||||
|
"name": "CustomServer",
|
||||||
|
"default": "",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "AuthKey",
|
||||||
|
"default": "",
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
# example usage:
|
||||||
|
# docker build --build-arg ARCH=armv7hf --build-arg TAILSCALE_VERSION=1.70.0 -t axis_tailscale:latest .
|
||||||
|
# docker cp $(docker create axis_tailscale):/opt/app ./build
|
||||||
|
|
||||||
|
ARG REPO=axisecp
|
||||||
|
ARG SDK=acap-native-sdk
|
||||||
|
ARG VERSION=1.3
|
||||||
|
ARG ARCH=armv7hf
|
||||||
|
ARG UBUNTU_VERSION=22.04
|
||||||
|
|
||||||
|
FROM ${REPO}/${SDK}:${VERSION}-${ARCH}-ubuntu${UBUNTU_VERSION}
|
||||||
|
WORKDIR /opt/app
|
||||||
|
COPY ./app /opt/app/
|
||||||
|
|
||||||
|
ARG ARCH=armv7hf
|
||||||
|
ARG TAILSCALE_VERSION=1.68.1
|
||||||
|
|
||||||
|
# template files
|
||||||
|
RUN sed -i "s/@@ARCH@@/${ARCH}/g" /opt/app/manifest.json \
|
||||||
|
&& sed -i "s/@@TAILSCALE_VERSION@@/${TAILSCALE_VERSION}/g" /opt/app/manifest.json
|
||||||
|
|
||||||
|
# tailscale uses "arm(64)" instead of the more specific arm arch names
|
||||||
|
RUN \
|
||||||
|
if [ "${ARCH}" = "armv7hf" ]; then TAILSCALE_ARCH="arm"; \
|
||||||
|
elif [ "${ARCH}" = "aarch64" ]; then TAILSCALE_ARCH="arm64"; \
|
||||||
|
else TAILSCALE_ARCH="${ARCH}"; fi \
|
||||||
|
&& curl -sS --fail -L -o /tmp/tailscale.tgz https://pkgs.tailscale.com/stable/tailscale_${TAILSCALE_VERSION}_${TAILSCALE_ARCH}.tgz \
|
||||||
|
&& mkdir -p /opt/app/lib \
|
||||||
|
&& tar xzf /tmp/tailscale.tgz -C /opt/app/lib --strip-components=1 --wildcards --no-anchored '*/tailscale' '*/tailscaled' \
|
||||||
|
&& rm /tmp/tailscale.tgz
|
||||||
|
|
||||||
|
RUN . /opt/axis/acapsdk/environment-setup* && acap-build ./
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
# Building
|
||||||
|
|
||||||
|
Set your preferred build parameters via the docker build command.
|
||||||
|
|
||||||
|
* `ARCH` - use the Axis architecture string you can fetch from `/axis-cgi/param.cgi?action=list&group=Properties.System.Architecture`
|
||||||
|
* `TAILSCALE_VERSION` - Specify the version string as it appears on the [Tailscale archive](https://pkgs.tailscale.com/stable/#static)
|
||||||
|
|
||||||
|
Tailscale arm arch strings are different than the axis format. The Dockerfile has some mappings for common strings.
|
||||||
|
|
||||||
|
```
|
||||||
|
docker build --build-arg ARCH=armv7hf --build-arg TAILSCALE_VERSION=1.70.0 -t axis_tailscale:latest .
|
||||||
|
```
|
||||||
|
|
||||||
|
Then copy out the build artifacts:
|
||||||
|
|
||||||
|
```
|
||||||
|
docker cp $(docker create axis_tailscale):/opt/app ./build
|
||||||
|
```
|
||||||
Executable
+10
@@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
echo "Starting Service"
|
||||||
|
chmod 777 /usr/local/packages/Tailscale_VPN/lib/tailscale
|
||||||
|
chmod 777 /usr/local/packages/Tailscale_VPN/lib/tailscaled
|
||||||
|
/usr/local/packages/Tailscale_VPN/lib/tailscaled --tun=userspace-networking --socket=/usr/local/packages/Tailscale_VPN/tailscaled.sock &
|
||||||
|
echo "Service Started"
|
||||||
|
echo "Scroll to Bottom for link"
|
||||||
|
/usr/local/packages/Tailscale_VPN/lib/tailscale --socket=/usr/local/packages/Tailscale_VPN/tailscaled.sock up
|
||||||
|
wait
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<body>
|
||||||
|
<head>
|
||||||
|
<h1 style="color:red;">Scroll to the bottom to find authentication URL</h1>
|
||||||
|
<script>
|
||||||
|
function refreshIFrame() {
|
||||||
|
var x = document.getElementById("*Your_iframe_id*");
|
||||||
|
x.contentWindow.location.reload();
|
||||||
|
var t = setTimeout(refreshIFrame, 5000);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body onload="refreshIFrame()">
|
||||||
|
<iframe id="*Your_iframe_id*" src= "/axis-cgi/admin/systemlog.cgi?appname=Tailscale_VPN" style="height:600px;width:100%;border: none;" ></iframe>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"schemaVersion": "1.3",
|
||||||
|
"acapPackageConf": {
|
||||||
|
"setup": {
|
||||||
|
"appName": "Tailscale_VPN",
|
||||||
|
"friendlyName": "Tailscale VPN",
|
||||||
|
"vendor": "Tailscale - Packaged by Mo3he",
|
||||||
|
"embeddedSdkVersion": "3.0",
|
||||||
|
"vendorUrl": "https://www.tailscale.com",
|
||||||
|
"runMode": "once",
|
||||||
|
"version": "@@TAILSCALE_VERSION@@",
|
||||||
|
"architecture": "@@ARCH@@"
|
||||||
|
},
|
||||||
|
"configuration": {
|
||||||
|
"settingPage": "index.html"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,8 +3,8 @@
|
|||||||
echo "Starting Service"
|
echo "Starting Service"
|
||||||
chmod 777 /usr/local/packages/Tailscale_VPN/lib/tailscale
|
chmod 777 /usr/local/packages/Tailscale_VPN/lib/tailscale
|
||||||
chmod 777 /usr/local/packages/Tailscale_VPN/lib/tailscaled
|
chmod 777 /usr/local/packages/Tailscale_VPN/lib/tailscaled
|
||||||
/usr/local/packages/Tailscale_VPN/lib/tailscaled &
|
/usr/local/packages/Tailscale_VPN/lib/tailscaled --tun=userspace-networking --socket=/usr/local/packages/Tailscale_VPN/tailscaled.sock &
|
||||||
echo "Service Started"
|
echo "Service Started"
|
||||||
echo "Scroll to Bottom for link"
|
echo "Scroll to Bottom for link"
|
||||||
/usr/local/packages/Tailscale_VPN/lib/tailscale up
|
/usr/local/packages/Tailscale_VPN/lib/tailscale --socket=/usr/local/packages/Tailscale_VPN/tailscaled.sock up
|
||||||
wait
|
wait
|
||||||
+17
-22
@@ -1,23 +1,18 @@
|
|||||||
{
|
{
|
||||||
"schemaVersion": "1.3",
|
"schemaVersion": "1.3",
|
||||||
"acapPackageConf": {
|
"acapPackageConf": {
|
||||||
"setup": {
|
"setup": {
|
||||||
"architecture": "armv7hf",
|
"appName": "Tailscale_VPN",
|
||||||
"appName": "Tailscale_VPN",
|
"friendlyName": "Tailscale VPN",
|
||||||
"friendlyName": "Tailscale VPN",
|
"vendor": "Tailscale - Packaged by Mo3he",
|
||||||
"vendor": "Tailscale - Packaged by Axis Axis Labs",
|
"embeddedSdkVersion": "3.0",
|
||||||
"embeddedSdkVersion": "3.0",
|
"vendorUrl": "https://www.tailscale.com",
|
||||||
"user": {
|
"runMode": "once",
|
||||||
"group": "root",
|
"version": "1.84.0",
|
||||||
"username": "root"
|
"architecture": "armv7hf"
|
||||||
},
|
},
|
||||||
"vendorUrl": "https://www.tailscale.com",
|
"configuration": {
|
||||||
"runMode": "once",
|
"settingPage": "index.html"
|
||||||
"version": "1.34.0"
|
}
|
||||||
},
|
}
|
||||||
"configuration": {
|
}
|
||||||
"settingPage": "index.html"
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Binary file not shown.
Binary file not shown.
@@ -1,23 +0,0 @@
|
|||||||
{
|
|
||||||
"schemaVersion": "1.3",
|
|
||||||
"acapPackageConf": {
|
|
||||||
"setup": {
|
|
||||||
"architecture": "armv7hf",
|
|
||||||
"appName": "Tailscale_VPN",
|
|
||||||
"friendlyName": "Tailscale VPN",
|
|
||||||
"vendor": "Tailscale - Packaged by Axis Axis Labs",
|
|
||||||
"embeddedSdkVersion": "3.0",
|
|
||||||
"user": {
|
|
||||||
"group": "root",
|
|
||||||
"username": "root"
|
|
||||||
},
|
|
||||||
"vendorUrl": "https://www.tailscale.com",
|
|
||||||
"runMode": "once",
|
|
||||||
"version": "1.34.0"
|
|
||||||
},
|
|
||||||
"configuration": {
|
|
||||||
"settingPage": "index.html"
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
PACKAGENAME="Tailscale VPN"
|
|
||||||
APPTYPE="armv7hf"
|
|
||||||
APPNAME="Tailscale_VPN"
|
|
||||||
APPID=""
|
|
||||||
LICENSENAME="Available"
|
|
||||||
LICENSEPAGE="none"
|
|
||||||
VENDOR="Tailscale - Packaged by Axis Axis Labs"
|
|
||||||
REQEMBDEVVERSION="3.0"
|
|
||||||
APPMAJORVERSION="1"
|
|
||||||
APPMINORVERSION="34"
|
|
||||||
APPMICROVERSION="0"
|
|
||||||
APPGRP="root"
|
|
||||||
APPUSR="root"
|
|
||||||
APPOPTS=""
|
|
||||||
OTHERFILES=""
|
|
||||||
SETTINGSPAGEFILE="index.html"
|
|
||||||
SETTINGSPAGETEXT=""
|
|
||||||
VENDORHOMEPAGELINK='<a href="https://www.tailscale.com" target="_blank">www.tailscale.com</a>'
|
|
||||||
PREUPGRADESCRIPT=""
|
|
||||||
POSTINSTALLSCRIPT=""
|
|
||||||
STARTMODE="once"
|
|
||||||
HTTPCGIPATHS=""
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
APPTYPE="armv7hf"
|
|
||||||
APPNAME="Tailscale_VPN"
|
|
||||||
PACKAGENAME="Tailscale VPN"
|
|
||||||
VENDOR="Tailscale - Packaged by Axis Axis Labs"
|
|
||||||
REQEMBDEVVERSION="3.0"
|
|
||||||
APPGRP="root"
|
|
||||||
APPUSR="root"
|
|
||||||
VENDORHOMEPAGELINK='<a href="https://www.tailscale.com" target="_blank">www.tailscale.com</a>'
|
|
||||||
STARTMODE="once"
|
|
||||||
APPMAJORVERSION="1"
|
|
||||||
APPMINORVERSION="34"
|
|
||||||
APPMICROVERSION="0"
|
|
||||||
SETTINGSPAGEFILE="index.html"
|
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
ARG ARCH=armv7hf
|
||||||
|
ARG VERSION=1.3
|
||||||
|
ARG UBUNTU_VERSION=22.04
|
||||||
|
ARG REPO=axisecp
|
||||||
|
ARG SDK=acap-native-sdk
|
||||||
|
|
||||||
|
FROM ${REPO}/${SDK}:${VERSION}-${ARCH}-ubuntu${UBUNTU_VERSION}
|
||||||
|
|
||||||
|
# Building the ACAP application
|
||||||
|
COPY ./app /opt/app/
|
||||||
|
WORKDIR /opt/app
|
||||||
|
RUN . /opt/axis/acapsdk/environment-setup* && acap-build ./
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
To build from main directory
|
||||||
|
|
||||||
|
docker build --tag arm .
|
||||||
|
|
||||||
|
docker cp $(docker create arm):/opt/app ./build
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
nop:
|
||||||
@@ -6,5 +6,5 @@
|
|||||||
/usr/local/packages/Tailscale_VPN/lib/tailscaled &
|
/usr/local/packages/Tailscale_VPN/lib/tailscaled &
|
||||||
echo "Service Started"
|
echo "Service Started"
|
||||||
echo "Scroll to Bottom for link"
|
echo "Scroll to Bottom for link"
|
||||||
/usr/local/packages/Tailscale_VPN/lib/tailscale up
|
/usr/local/packages/Tailscale_VPN/lib/tailscale up --accept-routes
|
||||||
wait
|
wait
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"schemaVersion": "1.3",
|
||||||
|
"acapPackageConf": {
|
||||||
|
"setup": {
|
||||||
|
"appName": "Tailscale_VPN",
|
||||||
|
"friendlyName": "Tailscale VPN",
|
||||||
|
"vendor": "Tailscale - Packaged by Mo3he",
|
||||||
|
"embeddedSdkVersion": "3.0",
|
||||||
|
"user": {
|
||||||
|
"group": "root",
|
||||||
|
"username": "root"
|
||||||
|
},
|
||||||
|
"vendorUrl": "https://www.tailscale.com",
|
||||||
|
"runMode": "once",
|
||||||
|
"version": "1.84.0",
|
||||||
|
"architecture": "armv7hf"
|
||||||
|
},
|
||||||
|
"configuration": {
|
||||||
|
"settingPage": "index.html"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 41 KiB |
@@ -1 +0,0 @@
|
|||||||
|
|
||||||
Reference in New Issue
Block a user