1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-02-13 02:51:50 +00:00

Fix shadowsocks config

This commit is contained in:
Ycarus 2019-01-11 16:25:35 +01:00
parent 14fa47f2b4
commit 4f56f86539
2 changed files with 16 additions and 3 deletions

View file

@ -9,7 +9,7 @@ if [ "$NBCPU" -gt 2 ]; then
set shadowsocks-libev.hi$c.server=sss0
set shadowsocks-libev.hi$c.local_address="0.0.0.0"
set shadowsocks-libev.hi$c.local_port=1100
set shadowsocks-libev.hi$c.mode=tcp_only
set shadowsocks-libev.hi$c.mode=tcp_and_udp
set shadowsocks-libev.hi$c.timeout=600
set shadowsocks-libev.hi$c.fast_open=1
set shadowsocks-libev.hi$c.reuse_port=1
@ -41,5 +41,18 @@ if [ "$(uci -q get shadowsocks-libev.sss0.method)" != "chacha20" ]; then
commit shadowsocks-libev
EOF
fi
if [ "$(uci -q get shadowsocks-libev.hi.mode)" != "tcp" ]; then
uci -q batch <<-EOF > /dev/null
set shadowsocks-libev.hi.mode=tcp_and_udp
commit shadowsocks-libev
EOF
for c in $(seq 2 $NBCPU); do
uci -q batch <<-EOF > /dev/null
set shadowsocks-libev.hi$c.mode=tcp_and_udp
commit shadowsocks-libev
EOF
done
fi
rm -f /tmp/luci-indexcache
exit 0

View file

@ -2,7 +2,7 @@ config ss_redir hi
option server 'sss0'
option local_address '::'
option local_port '1100'
option mode 'tcp_only'
option mode 'tcp_and_udp'
option timeout '600'
option fast_open 1
option verbose 0
@ -16,7 +16,7 @@ config ss_redir hi2
option server 'sss0'
option local_address '0.0.0.0'
option local_port '1100'
option mode 'tcp_only'
option mode 'tcp_and_udp'
option timeout '600'
option fast_open 1
option verbose 0