Skip to content

Commit 378ccbf

Browse files
committed
改变kcptun缺省路径
1 parent 0d9a2cf commit 378ccbf

5 files changed

Lines changed: 10 additions & 10 deletions

File tree

32 Bytes
Binary file not shown.

files/luci/i18n/shadowsocksr.zh-cn.po

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,8 @@ msgstr "服务端配置"
133133
msgid "KcpTun Enable"
134134
msgstr "KcpTun 启用"
135135

136-
msgid "bin:/usr/bin/kcptun/ssr-kcptun"
137-
msgstr "二进制文件:/usr/bin/kcptun/ssr-kcptun"
136+
msgid "bin:/usr/bin/ssr-kcptun"
137+
msgstr "二进制文件:/usr/bin/ssr-kcptun"
138138

139139
msgid "KcpTun Port"
140140
msgstr "KcpTun 端口"
@@ -146,7 +146,7 @@ msgid "KcpTun Password"
146146
msgstr "KcpTun 密码"
147147

148148
msgid "Haven't a Kcptun executable file"
149-
msgstr "不存在Kcptun可执行文件,请下载Kcptun可执行文件并放入/usr/bin/kcptun/ssr-kcptun"
149+
msgstr "不存在Kcptun可执行文件,请下载Kcptun可执行文件并改名放入/usr/bin/ssr-kcptun"
150150

151151
msgid "Not a Kcptun executable file"
152152
msgstr "Kcptun可执行文件格式不正确,请确认是否正确下载了路由器对应的可执行文件"

files/luci/model/cbi/shadowsocksr/client.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,15 +145,15 @@ o.rmempty = false
145145

146146
o = s:option(Value, "obfs_param", translate("obfs_param(optional)"))
147147

148-
kcp_enable = s:option(Flag, "kcp_enable", translate("KcpTun Enable"), translate("bin:/usr/bin/kcptun/ssr-kcptun"))
148+
kcp_enable = s:option(Flag, "kcp_enable", translate("KcpTun Enable"), translate("bin:/usr/bin/ssr-kcptun"))
149149
kcp_enable.rmempty = false
150150

151151

152152
o = s:option(Value, "kcp_port", translate("KcpTun Port"))
153153
o.datatype = "port"
154154
o.default = 4000
155155
function o.validate(self, value, section)
156-
local kcp_file="/usr/bin/kcptun/ssr-kcptun"
156+
local kcp_file="/usr/bin/ssr-kcptun"
157157
local enable = kcp_enable:formvalue(section) or kcp_enable.disabled
158158
if enable == kcp_enable.enabled then
159159
if not fs.access(kcp_file) then

files/shadowsocksr.init

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,16 +86,16 @@ start_rules() {
8686
#deal kcp
8787
local kcp_enable=$(uci_get_by_name $GLOBAL_SERVER kcp_enable)
8888
if [ $kcp_enable = "1" ] ;then
89-
[ ! -f "/usr/bin/kcptun/ssr-kcptun" ] && return 1
90-
chmod 755 /usr/bin/kcptun/ssr-kcptun
91-
local kcp_str=`/usr/bin/kcptun/ssr-kcptun -v |grep kcptun|wc -l`
89+
[ ! -f "/usr/bin/ssr-kcptun" ] && return 1
90+
91+
local kcp_str=`/usr/bin/ssr-kcptun -v |grep kcptun|wc -l`
9292
[ "0" = $kcp_str ] && return 1
9393
local kcp_port=$(uci_get_by_name $GLOBAL_SERVER kcp_port)
9494
local server_port=$(uci_get_by_name $GLOBAL_SERVER server_port)
9595
local password=$(uci_get_by_name $GLOBAL_SERVER kcp_password)
9696
local kcp_param=$(uci_get_by_name $GLOBAL_SERVER kcp_param)
9797
[ "$password" != "" ] && password="--key "${password}
98-
service_start /usr/bin/kcptun/ssr-kcptun -r $server:$kcp_port -l :$server_port $password $kcp_param
98+
service_start /usr/bin/ssr-kcptun -r $server:$kcp_port -l :$server_port $password $kcp_param
9999
kcp_enable_flag=1
100100
fi
101101

files/shadowsocksr.monitor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ do
8787
then
8888
killall -q -9 ssr-kcptun
8989

90-
( /usr/bin/kcptun/ssr-kcptun -r $server:$kcp_port -l :$server_port $password $kcp_param &)
90+
( /usr/bin/ssr-kcptun -r $server:$kcp_port -l :$server_port $password $kcp_param &)
9191
fi
9292
fi
9393

0 commit comments

Comments
 (0)