Skip to content

Commit

Permalink
Version 3.3.5-2, witH UI working in DSM 7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
davidcava committed Jun 6, 2022
1 parent 5263ad5 commit 54c3611
Show file tree
Hide file tree
Showing 362 changed files with 3,963 additions and 13 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,21 @@ When removing the package, the config files are kept and reused if the package i

If ss-redir is used, then routing will be activated. The incoming non-local traffic will be routed to ss-redir through iptables. udp will/might not work (see limitation below).

In DSM7, the services use Systemd. You can check / control them in the SSH shell (as root) with commands such as:
```sh
systemctl list-units -a | grep pkg-ss-
synosystemctl start pkg-ss-local@ss-local
systemctl stop --type=service 'pkg-ss-*'
systemctl status pkg-ss-local@ss-local
```

# Limitation
- The user installing the package must have admin rights. Since 3.3.5, being the default admin user is not needed anymore.
- Since DSM7, after installing the package, it is needed to manually ssh into the Synology and run: sudo /var/packages/shadowsocks-libev/scripts/addprivileges. I had a hard time with the migration to DSM7 so things might still have bugs.
- Since DSM7, after installing the package, it is needed to manually ssh into the Synology and run: sudo /var/packages/shadowsocks-libev/scripts/addprivileges.
- Service is considered "started" in DSM even though no shadowsocks service could be started. This is needed for DSM to show the shadowsocks config app in the app list.
- Branch dsm6 works on DSM 6.1 and 6.2 (not maintained anymore). Branch master works on DSM 7.
- I don't know how to compile v2ray-plugin using Synology's dev environment so I just copy the binaries provided in the project. Not really sure which one goes into which architecture so probably not working for all. If not working, just drop the v2ray-plugin executable into /var/packages/shadowsocks-libev/target/bin (and tell me what works for you).
- Graphical interface is still experimental: it works well on my model but might not on others. Use SSH and edit json files manually if any issue.
- Graphical interface works well on my model and seems to work on other models. If any issue, use SSH and edit json files manually.
- Graphical interface does not allow to view the logs.
- DSM does not include the needed kernel modules for TProxy (at least on my model), which prevents using ss-redir with udp. Workaround is possible by recompiling the missing modules and iptables.
- When ss-redir is used, only incoming traffic is redirected (chain PREROUTING). DSM traffic itself is not sent to ss-redir (chain OUTPUT).
Expand Down
5 changes: 4 additions & 1 deletion SynoBuildConf/install
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ INST_DIR="/tmp/_${PKG_NAME}"
PKG_DIR="/tmp/_${PKG_NAME}_pkg"
PKG_DEST="/image/packages"

INST_DIR_EXPECTED_FILES=41
#INST_DIR_EXPECTED_FILES=41
# 356 files for ext-js
INST_DIR_EXPECTED_FILES=397

LANG=C; export LANG
LC_ALL=C; export LC_ALL
Expand Down Expand Up @@ -74,6 +76,7 @@ SetupPackageFiles() {
mkdir $INST_DIR/ui
install -D -m 0755 -t $INST_DIR/ui synology/ui/*.cgi synology/ui/*.php
install -D -m 0644 -t $INST_DIR/ui synology/ui/config
cp -r synology/ui/ext-3.4.1/ $INST_DIR/ui/
mkdir $INST_DIR/ui/images
install -D -m 0644 -t $INST_DIR/ui/images synology/ui/images/*
mkdir $INST_DIR/ui/templates
Expand Down
4 changes: 2 additions & 2 deletions synology/INFO.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/bin/sh
# Copyright (c) 2019-2021 David Cavallini
# Copyright (c) 2019-2022 David Cavallini

. /pkgscripts-ng/include/pkg_util.sh

package="shadowsocks-libev"
version="3.3.5-1"
version="3.3.5-2"
os_min_ver="7.0-40000"
displayname="Shadowsocks-libev"
arch="$(pkg_get_platform_family)"
Expand Down
5 changes: 3 additions & 2 deletions synology/scripts/start-stop-status
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,9 @@ setvars_unit_file ()
exit_if_not_root ()
{
if [ ! "$(id -u)" = "0" ]; then
echo "Cannot proceed because not root. Connect though SSH, run the following command and restart: sudo /var/packages/shadowsocks-libev/scripts/addprivileges" >> "$SYNOPKG_TEMP_LOGFILE"
echo "Cannot proceed because not root. Connect though SSH, run the following command and restart: sudo /var/packages/shadowsocks-libev/scripts/addprivileges"
rootmsg="You need to grant root privileges to the package components. Connect though SSH, run the following command: sudo /var/packages/shadowsocks-libev/scripts/addprivileges. Then stop and start the package."
echo "$rootmsg" >> "$SYNOPKG_TEMP_LOGFILE"
echo "$rootmsg"
exit 0 # We should exit 1 but this triggers a "repair", not what we want
fi
}
Expand Down
1 change: 1 addition & 0 deletions synology/ui/ext-3.4.1/adapter/ext/ext-base.js

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions synology/ui/ext-3.4.1/ext-all.js

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions synology/ui/ext-3.4.1/resources/css/ext-all.css

Large diffs are not rendered by default.

43 changes: 43 additions & 0 deletions synology/ui/ext-3.4.1/resources/css/theme-gray/borders.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
This file is part of Ext JS 3.4
Copyright (c) 2011-2013 Sencha Inc
Contact: http://www.sencha.com/contact
GNU General Public License Usage
This file may be used under the terms of the GNU General Public License version 3.0 as
published by the Free Software Foundation and appearing in the file LICENSE included in the
packaging of this file.
Please review the following information to ensure the GNU General Public License version 3.0
requirements will be met: http://www.gnu.org/copyleft/gpl.html.
If you are unsure which license is appropriate for your use, please contact the sales department
at http://www.sencha.com/contact.
Build date: 2013-04-03 15:07:25
*/
.x-panel-noborder .x-panel-header-noborder {
border-bottom-color:#d0d0d0;
}

.x-panel-noborder .x-panel-tbar-noborder .x-toolbar {
border-bottom-color:#d0d0d0;
}

.x-panel-noborder .x-panel-bbar-noborder .x-toolbar {
border-top-color:#d0d0d0;
}

.x-tab-panel-bbar-noborder .x-toolbar {
border-top-color:#d0d0d0;
}

.x-tab-panel-tbar-noborder .x-toolbar {
border-bottom-color:#d0d0d0;
}

.x-border-layout-ct {
background-color:#f0f0f0;
}
88 changes: 88 additions & 0 deletions synology/ui/ext-3.4.1/resources/css/theme-gray/box.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
/*
This file is part of Ext JS 3.4
Copyright (c) 2011-2013 Sencha Inc
Contact: http://www.sencha.com/contact
GNU General Public License Usage
This file may be used under the terms of the GNU General Public License version 3.0 as
published by the Free Software Foundation and appearing in the file LICENSE included in the
packaging of this file.
Please review the following information to ensure the GNU General Public License version 3.0
requirements will be met: http://www.gnu.org/copyleft/gpl.html.
If you are unsure which license is appropriate for your use, please contact the sales department
at http://www.sencha.com/contact.
Build date: 2013-04-03 15:07:25
*/
.x-box-tl {
background-image: url(../images/default/box/corners.gif);
}

.x-box-tc {
background-image: url(../images/default/box/tb.gif);
}

.x-box-tr {
background-image: url(../images/default/box/corners.gif);
}

.x-box-ml {
background-image: url(../images/default/box/l.gif);
}

.x-box-mc {
background-color: #eee;
background-image: url(../images/default/box/tb.gif);
font-family: "Myriad Pro","Myriad Web","Tahoma","Helvetica","Arial",sans-serif;
color: #393939;
font-size: 12px;
}

.x-box-mc h3 {
font-size: 14px;
font-weight: bold;
}

.x-box-mr {
background-image: url(../images/default/box/r.gif);
}

.x-box-bl {
background-image: url(../images/default/box/corners.gif);
}

.x-box-bc {
background-image: url(../images/default/box/tb.gif);
}

.x-box-br {
background-image: url(../images/default/box/corners.gif);
}

.x-box-blue .x-box-bl, .x-box-blue .x-box-br, .x-box-blue .x-box-tl, .x-box-blue .x-box-tr {
background-image: url(../images/default/box/corners-blue.gif);
}

.x-box-blue .x-box-bc, .x-box-blue .x-box-mc, .x-box-blue .x-box-tc {
background-image: url(../images/default/box/tb-blue.gif);
}

.x-box-blue .x-box-mc {
background-color: #c3daf9;
}

.x-box-blue .x-box-mc h3 {
color: #17385b;
}

.x-box-blue .x-box-ml {
background-image: url(../images/default/box/l-blue.gif);
}

.x-box-blue .x-box-mr {
background-image: url(../images/default/box/r-blue.gif);
}
108 changes: 108 additions & 0 deletions synology/ui/ext-3.4.1/resources/css/theme-gray/button.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
/*
This file is part of Ext JS 3.4
Copyright (c) 2011-2013 Sencha Inc
Contact: http://www.sencha.com/contact
GNU General Public License Usage
This file may be used under the terms of the GNU General Public License version 3.0 as
published by the Free Software Foundation and appearing in the file LICENSE included in the
packaging of this file.
Please review the following information to ensure the GNU General Public License version 3.0
requirements will be met: http://www.gnu.org/copyleft/gpl.html.
If you are unsure which license is appropriate for your use, please contact the sales department
at http://www.sencha.com/contact.
Build date: 2013-04-03 15:07:25
*/
.x-btn{
font:normal 11px tahoma, verdana, helvetica;
}

.x-btn button{
font:normal 11px arial,tahoma,verdana,helvetica;
color:#333;
}

.x-btn em {
font-style:normal;
font-weight:normal;
}

.x-btn-tl, .x-btn-tr, .x-btn-tc, .x-btn-ml, .x-btn-mr, .x-btn-mc, .x-btn-bl, .x-btn-br, .x-btn-bc{
background-image:url(../images/gray/button/btn.gif);
}

.x-btn-click .x-btn-text, .x-btn-menu-active .x-btn-text, .x-btn-pressed .x-btn-text{
color:#000;
}

.x-btn-disabled *{
color:gray !important;
}

.x-btn-mc em.x-btn-arrow {
background-image:url(../images/default/button/arrow.gif);
}

.x-btn-mc em.x-btn-split {
background-image:url(../images/default/button/s-arrow.gif);
}

.x-btn-over .x-btn-mc em.x-btn-split, .x-btn-click .x-btn-mc em.x-btn-split, .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-btn-pressed .x-btn-mc em.x-btn-split {
background-image:url(../images/gray/button/s-arrow-o.gif);
}

.x-btn-mc em.x-btn-arrow-bottom {
background-image:url(../images/default/button/s-arrow-b-noline.gif);
}

.x-btn-mc em.x-btn-split-bottom {
background-image:url(../images/default/button/s-arrow-b.gif);
}

.x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-btn-click .x-btn-mc em.x-btn-split-bottom, .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-btn-pressed .x-btn-mc em.x-btn-split-bottom {
background-image:url(../images/gray/button/s-arrow-bo.gif);
}

.x-btn-group-header {
color: #666;
}

.x-btn-group-tc {
background-image: url(../images/gray/button/group-tb.gif);
}

.x-btn-group-tl {
background-image: url(../images/gray/button/group-cs.gif);
}

.x-btn-group-tr {
background-image: url(../images/gray/button/group-cs.gif);
}

.x-btn-group-bc {
background-image: url(../images/gray/button/group-tb.gif);
}

.x-btn-group-bl {
background-image: url(../images/gray/button/group-cs.gif);
}

.x-btn-group-br {
background-image: url(../images/gray/button/group-cs.gif);
}

.x-btn-group-ml {
background-image: url(../images/gray/button/group-lr.gif);
}
.x-btn-group-mr {
background-image: url(../images/gray/button/group-lr.gif);
}

.x-btn-group-notitle .x-btn-group-tc {
background-image: url(../images/gray/button/group-tb.gif);
}
57 changes: 57 additions & 0 deletions synology/ui/ext-3.4.1/resources/css/theme-gray/combo.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/*
This file is part of Ext JS 3.4
Copyright (c) 2011-2013 Sencha Inc
Contact: http://www.sencha.com/contact
GNU General Public License Usage
This file may be used under the terms of the GNU General Public License version 3.0 as
published by the Free Software Foundation and appearing in the file LICENSE included in the
packaging of this file.
Please review the following information to ensure the GNU General Public License version 3.0
requirements will be met: http://www.gnu.org/copyleft/gpl.html.
If you are unsure which license is appropriate for your use, please contact the sales department
at http://www.sencha.com/contact.
Build date: 2013-04-03 15:07:25
*/
.x-combo-list {
border-color:#ccc;
background-color:#ddd;
font:normal 12px tahoma, arial, helvetica, sans-serif;
}

.x-combo-list-inner {
background-color:#fff;
}

.x-combo-list-hd {
font:bold 11px tahoma, arial, helvetica, sans-serif;
color:#333;
background-image: url(../images/default/layout/panel-title-light-bg.gif);
border-bottom-color:#BCBCBC;
}

.x-resizable-pinned .x-combo-list-inner {
border-bottom-color:#BEBEBE;
}

.x-combo-list-item {
border-color:#fff;
}

.x-combo-list .x-combo-selected{
border-color:#777 !important;
background-color:#f0f0f0;
}

.x-combo-list .x-toolbar {
border-top-color:#BCBCBC;
}

.x-combo-list-small {
font:normal 11px tahoma, arial, helvetica, sans-serif;
}
Loading

0 comments on commit 54c3611

Please sign in to comment.