luci-app-ssr-plus: add trojan multiple instance support

This commit is contained in:
LEAN-ESX 2020-02-24 18:14:03 -08:00
parent faae4fd125
commit 9655c39078
2 changed files with 4 additions and 1 deletions

View File

@ -324,8 +324,10 @@ start_redir() {
$sscmd -config /var/etc/v2-ssr-retcp.json >/dev/null 2>&1 &
echo "$(date "+%Y-%m-%d %H:%M:%S") $($sscmd -version | head -1) Started!" >>/tmp/ssrplus.log
elif [ "$stype" == "trojan" ]; then
for i in $(seq 1 $threads); do
$sscmd --config /var/etc/trojan-ssr-retcp.json >/dev/null 2>&1 &
echo "$(date "+%Y-%m-%d %H:%M:%S") $($sscmd --version 2>&1 | head -1) Started!" >>/tmp/ssrplus.log
done
echo "$(date "+%Y-%m-%d %H:%M:%S") $($sscmd --version 2>&1 | head -1) , $threads Threads Started!" >>/tmp/ssrplus.log
fi
if [ -n "$UDP_RELAY_SERVER" ]; then
redir_udp=1

View File

@ -32,6 +32,7 @@ local trojan = {
tcp = {
no_delay = true,
keep_alive = true,
reuse_port = true,
fast_open = (server.fast_open == "1") and true or false,
fast_open_qlen = 20
}