add ss new method support in luci-app-ssr-pro

This commit is contained in:
coolsnowwolf 2018-06-15 16:48:04 +08:00
parent f4c8f11cc7
commit a62ac8f9ab
5 changed files with 29 additions and 8 deletions

View File

@ -6,10 +6,10 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI support for SSR Pro
LUCI_DEPENDS:=+iptables-mod-tproxy +kmod-ipt-tproxy +ip +ipset-lists +shadowsocksr-libev-alt +pdnsd-alt +coreutils +coreutils-base64 +coreutils-nohup +dnsmasq-full
LUCI_DEPENDS:=+iptables-mod-tproxy +kmod-ipt-tproxy +ip +ipset-lists +shadowsocksr-libev-alt +shadowsocks-libev-ss-redir +pdnsd-alt +coreutils +coreutils-base64 +coreutils-nohup +dnsmasq-full
LUCI_PKGARCH:=all
PKG_VERSION:=2
PKG_RELEASE:=26
PKG_RELEASE:=28
include $(TOPDIR)/feeds/luci/luci.mk

View File

@ -48,9 +48,6 @@ safe_dns_tcp = s:taboption("basic",Flag, "safe_dns_tcp", translate("DNS uses TCP
safe_dns_tcp.rmempty = false
-- safe_dns_tcp:depends("more", "1")
-- more_opt = s:taboption("basic",Flag, "more", translate("More Options"),
-- translate("Options for advanced users"))
-- timeout = s:taboption("basic",Value, "timeout", translate("Timeout"))
-- timeout.datatype = "range(0,10000)"
-- timeout.placeholder = "60"
@ -77,6 +74,9 @@ safe_dns_tcp.rmempty = false
s:tab("main", translate("Server Setting"))
moreopt = s:taboption("main",Flag, "more", translate("Using SS instead of SSR"),translate("Using incorrect encryption mothod may causes service fail to start"))
moreopt.rmempty = false
server = s:taboption("main",Value, "server", translate("Server Address"))
server.optional = false
server.datatype = "host"
@ -98,12 +98,21 @@ method:value("aes-256-ctr")
method:value("aes-128-cfb")
method:value("aes-192-cfb")
method:value("aes-256-cfb")
method:value("aes-128-gcm")
method:value("aes-192-gcm")
method:value("aes-256-gcm")
method:value("rc4")
method:value("rc4-md5")
method:value("rc4-md5-6")
method:value("salsa20")
method:value("chacha20")
method:value("chacha20-ietf")
method:value("camellia-128-cfb")
method:value("camellia-192-cfb")
method:value("camellia-256-cfb")
method:value("bf-cfb")
method:value("chacha20-ietf-poly1305")
method:value("xchacha20-ietf-poly1305")
protocol = s:taboption("main",ListValue, "protocol", translate("Protocol"))
protocol:value("origin")

View File

@ -106,7 +106,11 @@ msgstr "全局代理"
msgid "Game Mode"
msgstr "游戏模式"
msgid "Using SS instead of SSR"
msgstr "使用SS新版代替SSR"
msgid "Using incorrect encryption mothod may causes service fail to start"
msgstr "设置不正确的加密方法可能会导致SS/SSR服务无法启动"

View File

@ -8,7 +8,8 @@ config ssrpro
option proxy_mode 'M'
option safe_dns_tcp '1'
option cron_mode '1'
option method 'none'
option method 'rc4-md5'
option server '4.4.4.4'
option enabled '0'
option more '0'

View File

@ -35,6 +35,7 @@ get_config()
config_get vt_safe_dns_port $1 safe_dns_port
config_get vt_safe_dns_tcp $1 safe_dns_tcp
config_get cron_mode $1 cron_mode 1
config_get_bool vt_more $1 more 0
}
@ -105,7 +106,13 @@ start()
}
EOF
/usr/bin/ssr-redir -u -c $SSRCONF -f $SS_REDIR_PIDFILE || return 1
if [ "$vt_more" = 0 ]; then
ln -sf /usr/bin/ssr-redir /usr/sbin/ssr-redir
else
ln -sf /usr/bin/ss-redir /usr/sbin/ssr-redir
fi
/usr/sbin/ssr-redir -u -c $SSRCONF -f $SS_REDIR_PIDFILE || return 1
# IPv4 firewall rules
add_rule