├── .gitignore ├── README.md ├── pack.sh └── packages └── ipkbuild └── speedifyunofficial ├── control ├── control ├── postinst ├── postinst-pkg └── prerm ├── data ├── etc │ ├── config │ │ └── speedifyunofficial │ └── init.d │ │ └── speedifyunofficial ├── usr │ ├── lib │ │ ├── lua │ │ │ └── luci │ │ │ │ ├── controller │ │ │ │ └── speedifyunofficial │ │ │ │ │ └── spdconf.lua │ │ │ │ ├── model │ │ │ │ └── cbi │ │ │ │ │ └── speedifyunofficial │ │ │ │ │ ├── options.lua │ │ │ │ │ └── spdconf.lua │ │ │ │ └── view │ │ │ │ └── speedifyunofficial │ │ │ │ └── file_viewer.htm │ │ └── speedifyunofficial │ │ │ ├── nginx.conf │ │ │ └── run.sh │ └── share │ │ ├── luci │ │ └── menu.d │ │ │ └── speedifyunofficial.json │ │ └── rpcd │ │ └── acl.d │ │ └── speedifyunofficial.json └── www │ └── luci-static │ └── resources │ └── view │ └── speedifyunofficial │ └── bypass.js └── debian-binary /.gitignore: -------------------------------------------------------------------------------- 1 | packages/ipkbuild/speedifyunofficial/control.tar.gz 2 | packages/ipkbuild/speedifyunofficial/data.tar.gz 3 | packages/*.ipk -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Unofficial Speedify Installer for OpenWrt (experimental) 2 | 3 | **Update: [Speedify now officially supports OpenWrt as of Q4 2024](https://support.speedify.com/article/918-openwrt)** 4 | 5 | ## Minimum Requirements 6 | 7 | - 64 bit Intel/AMD or 64-bit ARM or 32-bit ARM hard float 8 | - 512MB RAM 9 | - 64MB storage 10 | - OpenWrt 18 and higher 11 | - Working packages and kernel module repsositories 12 | - Internet connection 13 | - Familiarity with OpenWrt, else checkout [SmoothWAN](https://smoothwan.com) 14 | 15 | ## Tested devices 16 | 17 | *Officially verified:* 18 | - Official OpenWrt PC (23.05.2) 19 | - GL.iNet Slate AX & Flint 4.4.6 official firmware 20 | 21 | *User reports:* 22 | - GL.iNet Beryl AX 4.4.6 official firmware 23 | - GL.iNet Spitz AX 4.0 official firmware 24 | - Banana Pi BPI-R3 OpenWrt 23.05 25 | - Nano Pi R6S FriendlyWrt 23.05.X 26 | 27 | ## Installation 28 | 29 | Download the `.ipk` file from the [Releases section](https://github.com/TalalMash/Unofficial-Speedify-Installer-For-OpenWrt/releases/latest) and follow the video below: 30 | 31 | https://github.com/TalalMash/Unofficial-Speedify-Installer-For-OpenWrt/assets/96490382/0c49dea6-e07f-4db8-8813-b6786d552da9 32 | 33 | ## Known issues & Workarounds 34 | 35 | ### Generating logs 36 | The official **Help -> Generate Logs** button in Speedify UI doesn't work. 37 | 38 | Instead you need to: 39 | 1. Open our custom Speedify Configuration menu from the OpenWrt Menu **VPN -> Speedify** 40 | 2. Click the **Download Logs & Config** button 41 | 42 | ### Restarting Speedify 43 | 44 | The official **Restart Speedify Service** in the Speedify UI doesn't work. 45 | 46 | Instead you need to: 47 | 1. Open our custom Speedify Configuration menu from the OpenWrt Menu **VPN -> Speedify** 48 | 2. Click the **Reset** button 49 | -------------------------------------------------------------------------------- /pack.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | VERSION="1.2" 4 | 5 | pushd packages/ipkbuild/speedifyunofficial/control/ 6 | rm ../control.tar.gz 7 | tar --numeric-owner --group=0 --owner=0 -czf ../control.tar.gz ./* 8 | popd 9 | 10 | pushd packages/ipkbuild/speedifyunofficial/data 11 | rm ../data.tar.gz 12 | tar --numeric-owner --group=0 --owner=0 -czf ../data.tar.gz ./* 13 | popd 14 | 15 | pushd packages/ipkbuild/speedifyunofficial 16 | rm ../../speedifyunofficial* 17 | tar --numeric-owner --group=0 --owner=0 -czf ../../speedifyunofficial_${VERSION}_all.ipk ./debian-binary ./data.tar.gz ./control.tar.gz 18 | popd 19 | -------------------------------------------------------------------------------- /packages/ipkbuild/speedifyunofficial/control/control: -------------------------------------------------------------------------------- 1 | Package: speedifyunofficial 2 | Version: 1.2 3 | Architecture: all 4 | Section: luci 5 | SourceDateEpoch: 1680488509 6 | SourceName: speedifyunofficial 7 | License: BSD 8 | Installed-Size: 1024 9 | Maintainer: 0talal.mash0@gmail.com 10 | Depends: ar, xz, xz-utils, tar, luci-compat, libcap-bin, curl, wget-ssl, nginx, kmod-tun 11 | Description: Unofficial Speedify Installer 12 | -------------------------------------------------------------------------------- /packages/ipkbuild/speedifyunofficial/control/postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | [ "${IPKG_NO_SCRIPT}" = "1" ] && exit 0 3 | [ -s ${IPKG_INSTROOT}/lib/functions.sh ] || exit 0 4 | . ${IPKG_INSTROOT}/lib/functions.sh 5 | default_postinst $0 $@ 6 | 7 | -------------------------------------------------------------------------------- /packages/ipkbuild/speedifyunofficial/control/postinst-pkg: -------------------------------------------------------------------------------- 1 | [ -n "${IPKG_INSTROOT}" ] || { rm -f /tmp/luci-indexcache 2 | rm -rf /tmp/luci-modulecache/ 3 | killall -HUP rpcd 2>/dev/null 4 | exit 0 5 | } 6 | 7 | -------------------------------------------------------------------------------- /packages/ipkbuild/speedifyunofficial/control/prerm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | [ -s ${IPKG_INSTROOT}/lib/functions.sh ] || exit 0 3 | . ${IPKG_INSTROOT}/lib/functions.sh 4 | default_prerm $0 $@ 5 | 6 | -------------------------------------------------------------------------------- /packages/ipkbuild/speedifyunofficial/data/etc/config/speedifyunofficial: -------------------------------------------------------------------------------- 1 | config config 'Setup' 2 | option enabled '1' 3 | option apt 'https://apt.connectify.me/' 4 | option version '0' 5 | option logpath 'logs' 6 | -------------------------------------------------------------------------------- /packages/ipkbuild/speedifyunofficial/data/etc/init.d/speedifyunofficial: -------------------------------------------------------------------------------- 1 | #!/bin/sh /etc/rc.common 2 | 3 | START=99 4 | USE_PROCD=1 5 | 6 | 7 | reload_service() 8 | { 9 | stop "$@" 10 | sleep 5 11 | start "$@" 12 | } 13 | 14 | start_service() 15 | { 16 | if [ $(uci get speedifyunofficial.Setup.enabled) == 1 ] 17 | then 18 | continue 19 | else 20 | exit 0 21 | fi 22 | 23 | procd_open_instance 24 | procd_set_param command sh /usr/lib/speedifyunofficial/run.sh start > /usr/lib/speedifyunofficial/speedifyunofficial.log 25 | procd_close_instance 26 | } 27 | 28 | stop_service() 29 | { 30 | /usr/bin/killall speedify 31 | } -------------------------------------------------------------------------------- /packages/ipkbuild/speedifyunofficial/data/usr/lib/lua/luci/controller/speedifyunofficial/spdconf.lua: -------------------------------------------------------------------------------- 1 | module("luci.controller.speedifyunofficial.spdconf", package.seeall) 2 | 3 | local fs = require "nixio.fs" 4 | local sys = require "luci.sys" 5 | local template = require "luci.template" 6 | local i18n = require "luci.i18n" 7 | 8 | 9 | function index() 10 | local e = entry({"admin", "vpn", "spdconf"}, firstchild(), _("Speedify"), 60) 11 | e.acl_depends = { "speedifyunofficial" } 12 | e.dependent = false 13 | 14 | entry({"admin", "vpn", "spdconf", "config"}, cbi("speedifyunofficial/spdconf"), _("Configuration"), 1) 15 | entry({"admin", "vpn", "spdconf", "logs"}, call("spdconflog"), _("View Log"), 2) 16 | entry({"admin", "vpn", "spdconf", "options"}, cbi("speedifyunofficial/options"), _("Options"), 4) 17 | end 18 | 19 | function spdconflog() 20 | local logfile = fs.readfile("/tmp/speedifyunofficial.log") or "" 21 | template.render("speedifyunofficial/file_viewer", 22 | {title = i18n.translate("Install/Service Script Log"), content = logfile}) 23 | end -------------------------------------------------------------------------------- /packages/ipkbuild/speedifyunofficial/data/usr/lib/lua/luci/model/cbi/speedifyunofficial/options.lua: -------------------------------------------------------------------------------- 1 | config = Map("speedifyunofficial") 2 | 3 | view = config:section(NamedSection,"Setup", "config", translate("Configuration Extras"), translate("Check the log tab for action results.")) 4 | verovd = view:option(Value, "verovd", "Version override:", "Format example: 12.8.0-10744
Empty to use the latest version.
Re-install Speedify in the configuration tab after applying."); view.optional=false; view.rmempty = false; 5 | dmpver = view:option(Button, "_dmpver", "List versions", "Lists previously available versions in the log tab.") 6 | restart = view:option(Button, "_restart", "Restart Speedify", "Force restart Speedify.") 7 | stop = view:option(Button, "_stop", "Halt Speedify", "Force stop Speedify.") 8 | uninstall = view:option(Button, "_remove", "Uninstall Speedify", "Remove all files.") 9 | 10 | function dmpver.write() 11 | luci.sys.call("echo 'Log Reset' > /tmp/speedifyunofficial.log") 12 | luci.sys.call("sh /usr/lib/speedifyunofficial/run.sh list-versions >> /tmp/speedifyunofficial.log") 13 | luci.http.redirect("/cgi-bin/luci/admin/vpn/spdconf/logs") 14 | end 15 | 16 | function restart.write() 17 | luci.sys.call("/etc/init.d/speedifyunofficial restart &") 18 | luci.sys.call("echo 'Done Restart' > /tmp/speedifyunofficial.log") 19 | end 20 | 21 | function stop.write() 22 | luci.sys.call("/etc/init.d/speedifyunofficial stop &") 23 | luci.sys.call("echo 'Done Stop' > /tmp/speedifyunofficial.log") 24 | end 25 | 26 | function uninstall.write() 27 | luci.sys.call("/etc/init.d/speedifyunofficial stop") 28 | luci.sys.call("rm -rf /usr/share/speedify/* /usr/share/speedifyui/* /www/spdui/*") 29 | luci.sys.call("echo 'Speedify was manually uninstalled...' > tee /tmp/speedifyunofficial.log") 30 | luci.http.redirect("/cgi-bin/luci/admin/vpn/spdconf/logs") 31 | end 32 | 33 | return config -------------------------------------------------------------------------------- /packages/ipkbuild/speedifyunofficial/data/usr/lib/lua/luci/model/cbi/speedifyunofficial/spdconf.lua: -------------------------------------------------------------------------------- 1 | config = Map("speedifyunofficial") 2 | 3 | view = config:section(NamedSection,"Setup", "config", translate("Speedify Configuration"), translate("Check the log tab for installation progress.
Speedify Web UI Link")) 4 | enabled = view:option(Flag, "enabled", "Enable", "Enables Speedify on device startup."); view.optional=false; view.rmempty = false; 5 | apt = view:option(Value, "apt", "Debian Repository URL:", "Default address last tested on Q1 2024."); view.optional=false; view.rmempty = false; 6 | auto = view:option(Flag, "autoupdate", "Update on boot:", "Update Speedify before starting."); view.optional=false; view.rmempty = false; 7 | upd = view:option(Button, "_update", "Install/Update", "Install Speedify or update and restart.") 8 | rst = view:option(Button, "_reset", "Reset", "Reset and restart Speedify.") 9 | genlog = view:option(Button, "_genlog", "Download Logs & Config", "Downloads Speedify log files and OpenWRT configuration/log files.") 10 | 11 | function upd.write() 12 | luci.sys.call("echo 'Log Reset & Speedify Update/Install' > /tmp/speedifyunofficial.log && sh /usr/lib/speedifyunofficial/run.sh update >> /tmp/speedifyunofficial.log &") 13 | luci.http.redirect("/cgi-bin/luci/admin/vpn/spdconf/logs") 14 | end 15 | 16 | function rst.write() 17 | luci.sys.call("echo 'Log & Speedify Reset' > /tmp/speedifyunofficial.log && killall -KILL speedify && rm -rf /usr/share/speedify/logs/* && sh /usr/lib/speedifyunofficial/run.sh >> /tmp/speedifyunofficial.log 2>&1 &") 18 | luci.http.redirect("/cgi-bin/luci/admin/vpn/spdconf/logs") 19 | end 20 | 21 | function genlog.write() 22 | luci.sys.call("logread -F /tmp/logreadfile") 23 | luci.sys.call("dmesg >> /tmp/kmsgfile") 24 | luci.sys.call("tar -czf /tmp/spdlogs.tar.gz /usr/share/speedify/logs/* /etc/config/* /tmp/logreadfile /tmp/kmsgfile") 25 | luci.sys.call("ln -s /tmp/spdlogs.tar.gz /www/spdlogs.tar.gz") 26 | luci.http.redirect("/spdlogs.tar.gz") 27 | end 28 | 29 | function config.on_commit(self) 30 | luci.sys.exec("sh -c 'sleep 2 && /etc/init.d/speedifyunofficial restart' &") 31 | end 32 | 33 | return config -------------------------------------------------------------------------------- /packages/ipkbuild/speedifyunofficial/data/usr/lib/lua/luci/view/speedifyunofficial/file_viewer.htm: -------------------------------------------------------------------------------- 1 | <%+header%> 2 |

<%=title%>

3 |
(Auto refresh enabled)
4 |
5 | 6 | 7 |
8 | <%+footer%> 9 | 10 | -------------------------------------------------------------------------------- /packages/ipkbuild/speedifyunofficial/data/usr/lib/speedifyunofficial/nginx.conf: -------------------------------------------------------------------------------- 1 | daemon off; 2 | worker_processes 1; 3 | error_log /dev/stderr info; 4 | 5 | events {} 6 | 7 | http { 8 | server { 9 | listen 9331; 10 | location / { 11 | proxy_pass http://127.0.0.1:9330; 12 | proxy_set_header Origin "http://127.0.0.1"; 13 | proxy_set_header Host 127.0.0.1; 14 | proxy_http_version 1.1; 15 | proxy_set_header Upgrade $http_upgrade; 16 | proxy_set_header Connection "upgrade"; 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /packages/ipkbuild/speedifyunofficial/data/usr/lib/speedifyunofficial/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh /etc/rc.common 2 | 3 | . /lib/functions.sh 4 | 5 | ACTION="${1:-start}" 6 | PKGS=/tmp/spdpkgs 7 | SED="busybox sed" 8 | AWK="busybox awk" 9 | 10 | nginx_pid=$(cat /tmp/nginxproxy.pid) 11 | 12 | config_load speedifyunofficial 13 | 14 | run_speedify (){ 15 | kill "$nginx_pid" 16 | killall -KILL speedify 17 | if [ $(uci get speedifyunofficial.Setup.enabled) == 0 ]; then 18 | exit 0 19 | fi 20 | 21 | cd /usr/share/speedify || exit 1 22 | sh DisableRpFilter.sh 23 | mkdir -p logs 24 | nice -n -20 /usr/sbin/capsh --drop=cap_sys_nice --shell=/bin/sh -- -c './speedify -d logs &' 25 | sleep 2 26 | ./speedify_cli startupconnect on > /dev/null 27 | nginx -c /usr/lib/speedifyunofficial/nginx.conf & 28 | echo $! > /tmp/nginxproxy.pid 29 | } 30 | 31 | parse_versions(){ 32 | APT=$(config_get Setup apt) 33 | APT=$(echo $APT | $SED -e 's/\/$//') 34 | echo Repository URL:$APT 35 | aptURL="$APT$SPDDIR" 36 | echo Repository Ubuntu packages URL:$aptURL 37 | echo Note: Duplicated version is the Speedify UI version. 38 | curl -o $PKGS $aptURL 39 | cat $PKGS | grep Version 40 | } 41 | 42 | parse_apt_url(){ 43 | APT=$(config_get Setup apt) 44 | APT=$(echo $APT | $SED -e 's/\/$//') 45 | echo Repository URL:$APT 46 | aptURL="$APT$SPDDIR" 47 | echo Repository Ubuntu packages URL:$aptURL 48 | curl -o $PKGS $aptURL 49 | 50 | DWVER=$($AWK '/Version:/{gsub("Version: ", "");print;exit}' $PKGS) 51 | echo Latest Version:$DWVER 52 | 53 | SPDDW=$($AWK '/Filename/{gsub("Filename: ", "");print;exit}' $PKGS) 54 | export DWURL=$APT/$SPDDW 55 | echo Speedify package URL:$DWURL 56 | 57 | UIDW=$($SED -n '/speedifyui/{nnnnnnnn;p;q}' $PKGS | $AWK '/Filename/{gsub("Filename: ", "");print;exit}') 58 | export UIDWURL=$APT/$UIDW 59 | echo Speedify UI package URL:$UIDWURL 60 | 61 | if [[ $(config_get Setup verovd) ]]; then 62 | echo "Version override is set!" 63 | DWVER=$(config_get Setup verovd) 64 | echo "Set to $DWVER" 65 | SPDDW=$($SED -n '/'"$DWVER"'/{nn;p;q}' $PKGS | $AWK '/Filename/{gsub("Filename: ", "");print;exit}') 66 | export DWURL=$APT/$SPDDW 67 | echo Speedify package URL:$DWURL 68 | UIDW=$($SED -n '/'"$DWVER"'/{nn;p;q}' $PKGS | $AWK '/Filename/{gsub("Filename: ", "");print;exit}' | $SED 's/speedify/speedifyui/g') 69 | export UIDWURL=$APT/$UIDW 70 | echo Speedify UI package URL:$UIDWURL 71 | fi 72 | } 73 | 74 | installall(){ 75 | if [ "$(ping -q -c1 google.com &>/dev/null && echo 0 || echo 1)" = "1" ]; then 76 | echo "Internet connectivity issue. Stopping installation/update" 77 | run_speedify & 78 | exit 0 79 | fi 80 | 81 | echo "Installing GNU C Library" 82 | echo "Removing cache if it exists at /tmp/spddw" 83 | rm /tmp/spddw -r 84 | mkdir /tmp/spddw 85 | cd /tmp/spddw 86 | wget -q -c $LIBC6 87 | ar x * 88 | tar -xf data.tar.xz -C / 89 | rm /tmp/spddw/* -r 90 | wget -q -c $LIBGCC 91 | ar x * 92 | tar -xf data.tar.xz -C / 93 | rm /tmp/spddw/* -r 94 | 95 | echo "Downloading Speedify..." 96 | wget -q -P /tmp/spddw/speedify/ "$DWURL" 97 | echo "Downloading Speedify UI..." 98 | wget -q -P /tmp/spddw/speedifyui/ "$UIDWURL" 99 | echo "Extracting Speedify..." 100 | cd /tmp/spddw/speedify/ 101 | ar x *.deb 102 | tar -xzf data.tar.gz -C / 103 | mkdir -p /usr/share/speedify/logs 104 | echo "Extracting Speedify UI..." 105 | cd /tmp/spddw/speedifyui/ 106 | ar x *.deb 107 | tar -xzf data.tar.gz -C / 108 | mkdir /www/spdui/ 109 | ln -sf /usr/share/speedifyui/files/* /www/spdui/ 110 | echo "Deleting installation files..." 111 | rm -rf /tmp/spddw 112 | echo "Updating OpenWrt configration and starting Speedify..." 113 | uci set speedifyunofficial.Setup.version=$DWVER 114 | uci commit 115 | chmod 755 /etc/init.d/speedifyunofficial 116 | /etc/init.d/speedifyunofficial enable 117 | ifdown speedify 118 | ifdown speedify6 119 | uci del network.speedify 120 | uci del network.speedify6 121 | uci commit network 122 | uci del_list firewall.cfg03dc81.network='speedify' 123 | uci del_list firewall.cfg03dc81.network='speedify6' 124 | uci add_list firewall.cfg03dc81.network='speedify' 125 | uci add_list firewall.cfg03dc81.network='speedify6' 126 | uci set network.speedify=interface 127 | uci set network.speedify.force_link='0' 128 | uci set network.speedify.proto='static' 129 | uci set network.speedify.device='connectify0' 130 | uci set network.speedify.ipaddr='10.202.0.2' 131 | uci set network.speedify.netmask='255.255.255.0' 132 | uci set network.speedify.gateway='10.202.0.1' 133 | uci add_list network.speedify.dns='10.202.0.1' 134 | uci add_list firewall.cfg03dc81.network='speedify' 135 | uci set network.speedify6=interface 136 | uci set network.speedify6.proto='dhcpv6' 137 | uci set network.speedify6.device='connectify0' 138 | uci set network.speedify6.reqaddress='try' 139 | uci set network.speedify6.reqprefix='auto' 140 | uci set dhcp.speedify6=dhcp 141 | uci set dhcp.speedify6.interface='speedify6' 142 | uci set dhcp.speedify6.ignore='1' 143 | uci set dhcp.speedify6.ra='relay' 144 | uci set dhcp.speedify6.dhcpv6='relay' 145 | uci set dhcp.speedify6.ndp='relay' 146 | uci set dhcp.speedify6.master='1' 147 | uci commit network 148 | uci commit firewall 149 | uci commit dhcp 150 | ifup speedify 151 | ifup speedify6 152 | echo "Speedify is now installed, user interface is at http:///spdui/?wsPort=9331" 153 | } 154 | 155 | 156 | if [ $(uname -m) = "aarch64" ]; then 157 | ARCH=arm64 158 | elif [ $(uname -m) = "x86_64" ]; then 159 | ARCH=amd64 160 | else 161 | ARCH=armhf 162 | fi 163 | 164 | SPDDIR="/dists/speedify/main/binary-$ARCH/Packages" 165 | LIBC6="http://ftp.de.debian.org/debian/pool/main/g/glibc/libc6_2.31-13+deb11u5_$ARCH.deb" 166 | LIBGCC="https://deb.debian.org/debian/pool/main/g/gcc-8/libgcc1_8.3.0-6_$ARCH.deb" 167 | 168 | 169 | if [ "$ACTION" = "update" ]; then 170 | parse_apt_url 171 | installall 172 | run_speedify 173 | else 174 | if [ "$ACTION" = "stopkill" ]; then 175 | echo "Killing Speedify" 176 | killall -KILL speedify 177 | exit 0 178 | fi 179 | if [ "$ACTION" = "list-versions" ]; then 180 | parse_versions 181 | exit 0 182 | fi 183 | echo "Starting Speedify" 184 | AUPD=$(config_get Setup autoupdate) 185 | if [ "$AUPD" = 1 ]; then 186 | echo "Update on boot enabled." 187 | echo "Checking for updates..." 188 | parse_apt_url 189 | CURRVER=$(config_get Setup version | $AWK -F '|' -v 'OFS=|' '{ gsub(/[^0-9]/,"",$NF); print}') 190 | DWVER=$(echo $DWVER | $AWK -F '|' -v 'OFS=|' '{ gsub(/[^0-9]/,"",$NF); print}') 191 | echo "Current version: $CURRVER" 192 | echo "Repo version: $DWVER" 193 | if [ "$DWVER" -gt "$CURRVER" ]; then 194 | installall 195 | run_speedify 196 | echo "Update finished, running." 197 | exit 0 198 | else 199 | echo "Up to date, running." 200 | run_speedify 201 | exit 0 202 | fi 203 | else 204 | run_speedify 205 | echo "Running" 206 | fi 207 | fi 208 | -------------------------------------------------------------------------------- /packages/ipkbuild/speedifyunofficial/data/usr/share/luci/menu.d/speedifyunofficial.json: -------------------------------------------------------------------------------- 1 | { 2 | "admin/vpn/spdconf/bypass": { 3 | "title": "Custom Bypasses", 4 | "order": 3, 5 | "action": { 6 | "type": "view", 7 | "path": "speedifyunoffical/bypass" 8 | }, 9 | "depends": { 10 | "acl": [ "speedifyunoffical" ] 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /packages/ipkbuild/speedifyunofficial/data/usr/share/rpcd/acl.d/speedifyunofficial.json: -------------------------------------------------------------------------------- 1 | { 2 | "speedifyunofficial": { 3 | "description": "Grant UCI access for speedifyunofficial", 4 | "read": { 5 | "uci": [ "speedifyunofficial" ], 6 | "file": { 7 | "/usr/share/speedify/speedify_cli": [ "exec" ] 8 | } 9 | }, 10 | "write": { 11 | "uci": [ "speedifyunofficial" ], 12 | "file": { 13 | "/usr/share/speedify/speedify_cli": [ "exec" ] 14 | } 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /packages/ipkbuild/speedifyunofficial/data/www/luci-static/resources/view/speedifyunofficial/bypass.js: -------------------------------------------------------------------------------- 1 | 'require uci'; 2 | 'require fs'; 3 | 'require ui'; 4 | 'require rpc'; 5 | 'require form'; 6 | 'require view'; 7 | 'require network'; 8 | 'require validation'; 9 | 'require tools.widgets as widgets'; 10 | 11 | var bin = "/usr/share/speedify/speedify_cli"; 12 | var args = ['show', 'streamingbypass']; 13 | 14 | return view.extend({ 15 | formdata: { wol: {} }, 16 | 17 | load: function () { 18 | return Promise.all([ 19 | fs.exec_direct(bin, args, "json").then(function (res) { 20 | return res 21 | }), 22 | L.resolveDefault(fs.stat(bin)) 23 | ]); 24 | }, 25 | 26 | handleAddPort: function () { 27 | var portaddition = document.getElementById("portaddition").value; 28 | var protoaddition = document.getElementById("protoaddition").value; 29 | var spdarg = portaddition + "/" + protoaddition; 30 | fs.exec_direct(bin, ['streamingbypass', 'ports', 'add', spdarg]).then(function () { 31 | window.location.reload(); 32 | }); 33 | }, 34 | 35 | handleDeletePort: function (domain) { 36 | if (domain.portRangeEnd) { 37 | var spdarg = domain.port + '-' + domain.portRangeEnd + '/' + domain.protocol, 38 | args = ['streamingbypass', 'ports', 'rem', spdarg] 39 | } else { 40 | spdarg = domain.port + "/" + domain.protocol, 41 | args = ['streamingbypass', 'ports', 'rem', spdarg] 42 | } 43 | fs.exec_direct(bin, args).then(function () { 44 | window.location.reload(); 45 | }); 46 | }, 47 | 48 | handleAddDomain: function () { 49 | var domainAddition = document.getElementById("domainaddition").value; 50 | var spdarg = domainAddition; 51 | fs.exec_direct(bin, ['streamingbypass', 'domains', 'add', spdarg]).then(function () { 52 | window.location.reload(); 53 | }); 54 | }, 55 | 56 | handleDeleteDomain: function (domain) { 57 | args = ['streamingbypass', 'domains', 'rem', domain] 58 | fs.exec_direct(bin, args).then(function () { 59 | window.location.reload(); 60 | }); 61 | }, 62 | 63 | handleAddIPv4: function () { 64 | var IPv4Addition = document.getElementById("ipv4addition").value; 65 | var spdarg = IPv4Addition; 66 | fs.exec_direct(bin, ['streamingbypass', 'ipv4', 'add', spdarg]).then(function () { 67 | window.location.reload(); 68 | }); 69 | }, 70 | 71 | handleDeleteIPv4: function (domain) { 72 | args = ['streamingbypass', 'ipv4', 'rem', domain] 73 | fs.exec_direct(bin, args).then(function () { 74 | window.location.reload(); 75 | }); 76 | }, 77 | 78 | handleAddIPv6: function () { 79 | var IPv6Addition = document.getElementById("ipv6addition").value; 80 | var spdarg = IPv6Addition; 81 | fs.exec_direct(bin, ['streamingbypass', 'ipv6', 'add', spdarg]).then(function () { 82 | window.location.reload(); 83 | }); 84 | }, 85 | 86 | handleDeleteIPv6: function (domain) { 87 | args = ['streamingbypass', 'ipv6', 'rem', domain] 88 | fs.exec_direct(bin, args).then(function () { 89 | window.location.reload(); 90 | }); 91 | }, 92 | 93 | renderBypass: function (data) { 94 | var ports = Array.isArray(data[0].ports) ? data[0].ports : []; 95 | var domains = Array.isArray(data[0].ports) ? data[0].domains : []; 96 | var ipv4 = Array.isArray(data[0].ports) ? data[0].ipv4 : []; 97 | var ipv6 = Array.isArray(data[0].ports) ? data[0].ipv6 : []; 98 | 99 | //PORTS 100 | var portstable = E('table', { 'class': 'table lases' }, [ 101 | E('tr', { 'class': 'tr table-titles' }, [ 102 | E('th', { 'class': 'th' }, _('Port')), 103 | E('th', { 'class': 'th' }, _('Protocol')), 104 | E('th', { 'class': 'th' }, _('Action')) 105 | ]) 106 | ]); 107 | 108 | cbi_update_table(portstable, 109 | ports.map(function (domain) { 110 | var rows; 111 | rows = [ 112 | domain.portRangeEnd ? domain.port + '-' + domain.portRangeEnd : domain.port, 113 | domain.protocol 114 | ]; 115 | rows.push(E('button', { 116 | 'class': 'cbi-button cbi-button-negative', 117 | 'click': L.bind(this.handleDeletePort, this, domain) 118 | }, [_('Delete')])); 119 | return rows; 120 | }, this)); 121 | 122 | var portAddition = E('input', { 'id': 'portaddition', 'type': "text", 'style': 'width: 150px' }); 123 | var protoAddition = E('select', { 'id': 'protoaddition', 'style': 'width: 70px; margin-left: 10px' }, [ 124 | E('option', { 'value': 'tcp' }, _('TCP')), 125 | E('option', { 'value': 'udp' }, _('UDP')) 126 | ]); 127 | var addbutton = E('button', { 128 | 'class': 'cbi-button cbi-button-positive', 129 | 'click': L.bind(this.handleAddPort, this), 130 | 'style': 'margin-left: 10px; padding: 0 26px;' 131 | }, [_('Add')]); 132 | //PORTS-end 133 | //DOMAINS 134 | var domainstable = E('table', { 'class': 'table lases' }, [ 135 | E('tr', { 'class': 'tr table-titles' }, [ 136 | E('th', { 'class': 'th' }, _('Domains')), 137 | E('th', { 'class': 'th' }, _('Action')) 138 | ]) 139 | ]); 140 | 141 | cbi_update_table(domainstable, 142 | domains.map(function (domain) { 143 | var rows; 144 | rows = [ 145 | domain 146 | ]; 147 | rows.push(E('button', { 148 | 'class': 'cbi-button cbi-button-negative', 149 | 'click': L.bind(this.handleDeleteDomain, this, domain) 150 | }, [_('Delete')])); 151 | return rows; 152 | }, this)); 153 | 154 | var domainAddition = E('input', { 'id': 'domainaddition', 'type': "text", 'style': 'width: 150px' }); 155 | var domainAddButton = E('button', { 156 | 'class': 'cbi-button cbi-button-positive', 157 | 'click': L.bind(this.handleAddDomain, this), 158 | 'style': 'margin-left: 10px; padding: 0 26px;' 159 | }, [_('Add')]); 160 | //DOMAINS-end 161 | //IPv4 162 | var ipv4table = E('table', { 'class': 'table lases' }, [ 163 | E('tr', { 'class': 'tr table-titles' }, [ 164 | E('th', { 'class': 'th' }, _('IPv4')), 165 | E('th', { 'class': 'th' }, _('Action')) 166 | ]) 167 | ]); 168 | 169 | cbi_update_table(ipv4table, 170 | ipv4.map(function (domain) { 171 | var rows; 172 | rows = [ 173 | domain 174 | ]; 175 | rows.push(E('button', { 176 | 'class': 'cbi-button cbi-button-negative', 177 | 'click': L.bind(this.handleDeleteIPv4, this, domain) 178 | }, [_('Delete')])); 179 | return rows; 180 | }, this)); 181 | 182 | var IPv4Addition = E('input', { 'id': 'ipv4addition', 'type': "text", 'style': 'width: 150px' }); 183 | var IPv4AddButton = E('button', { 184 | 'class': 'cbi-button cbi-button-positive', 185 | 'click': L.bind(this.handleAddIPv4, this), 186 | 'style': 'margin-left: 10px; padding: 0 26px;' 187 | }, [_('Add')]); 188 | //IPv4-end 189 | //IPv6 190 | var ipv6table = E('table', { 'class': 'table lases' }, [ 191 | E('tr', { 'class': 'tr table-titles' }, [ 192 | E('th', { 'class': 'th' }, _('IPv6')), 193 | E('th', { 'class': 'th' }, _('Action')) 194 | ]) 195 | ]); 196 | 197 | cbi_update_table(ipv6table, 198 | ipv6.map(function (domain) { 199 | var rows; 200 | rows = [ 201 | domain 202 | ]; 203 | rows.push(E('button', { 204 | 'class': 'cbi-button cbi-button-negative', 205 | 'click': L.bind(this.handleDeleteIPv6, this, domain) 206 | }, [_('Delete')])); 207 | return rows; 208 | }, this)); 209 | 210 | var IPv6Addition = E('input', { 'id': 'ipv6addition', 'type': "text", 'style': 'width: 150px' }); 211 | var IPv6AddButton = E('button', { 212 | 'class': 'cbi-button cbi-button-positive', 213 | 'click': L.bind(this.handleAddIPv6, this), 214 | 'style': 'margin-left: 10px; padding: 0 26px;' 215 | }, [_('Add')]); 216 | //IPv6-end 217 | 218 | return E([ 219 | E('h2', _("Speedify's Bypass Service")), 220 | E('p', _('
‣ Speedify will dynamically choose the best WAN for bypass depending on data caps and priority as well as failover.
‣ Navigate to VPN->VPN Policy Routing for static client/WAN specific settings.
')), 221 | E('h3', _('Ports')), 222 | portstable, 223 | E('p', _('• Examples:
- Single: 1234
- Range: 1210-1220')), 224 | portAddition, 225 | protoAddition, 226 | addbutton, 227 | E('h3', _('Domains')), 228 | domainstable, 229 | domainAddition, 230 | domainAddButton, 231 | E('h3', _('Remote IPv4 addresses')), 232 | ipv4table, 233 | IPv4Addition, 234 | IPv4AddButton, 235 | E('h3', _('Remote IPv6 addresses')), 236 | ipv6table, 237 | IPv6Addition, 238 | IPv6AddButton 239 | ]) 240 | }, 241 | 242 | handleSave: null, 243 | handleSaveApply: null, 244 | handleReset: null, 245 | 246 | render: function (data) { 247 | return this.renderBypass(data) 248 | } 249 | }); -------------------------------------------------------------------------------- /packages/ipkbuild/speedifyunofficial/debian-binary: -------------------------------------------------------------------------------- 1 | 2.0 --------------------------------------------------------------------------------