mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-14 19:41:51 +00:00
Use Shadowsocks-libev or Shadowsocks-rust config for limit to LAN
This commit is contained in:
parent
900dd5db0c
commit
7e56a0f417
2 changed files with 4 additions and 2 deletions
|
@ -57,7 +57,7 @@ _err() {
|
||||||
|
|
||||||
version_over_5_4() {
|
version_over_5_4() {
|
||||||
MAJOR_VERSION=$(uname -r | awk -F '.' '{print $1}')
|
MAJOR_VERSION=$(uname -r | awk -F '.' '{print $1}')
|
||||||
MINOR_VERSION=$(uname -r | awk -F '.' '{print $2}')
|
MINOR_VERSION=$(uname -r | awk -F '.' '{print $2}' | awk -F '-' '{print $1}')
|
||||||
if [ $MAJOR_VERSION -ge 5 ] && [ $MINOR_VERSION -gt 13 ] || [ $MAJOR_VERSION -gt 5 ] ; then
|
if [ $MAJOR_VERSION -ge 5 ] && [ $MINOR_VERSION -gt 13 ] || [ $MAJOR_VERSION -gt 5 ] ; then
|
||||||
return 0
|
return 0
|
||||||
else
|
else
|
||||||
|
@ -473,6 +473,7 @@ add_v2ray_redirect_rules() {
|
||||||
|
|
||||||
[ "$(uci -q get v2ray.main_transparent_proxy.redirect_udp)" = "1" ] && [ "$(uci -q get v2ray.omrout.protocol)" != "socks" ] && portudp="$port"
|
[ "$(uci -q get v2ray.main_transparent_proxy.redirect_udp)" = "1" ] && [ "$(uci -q get v2ray.omrout.protocol)" != "socks" ] && portudp="$port"
|
||||||
ifnames="$(uci -q get shadowsocks-libev.ss_rules.ifnames)"
|
ifnames="$(uci -q get shadowsocks-libev.ss_rules.ifnames)"
|
||||||
|
[ -z "$ifnames" ] && ifnames="$(uci -q get shadowsocks-rust.ss_rules.ifnames)"
|
||||||
|
|
||||||
local tmp="/tmp/v2rrules"
|
local tmp="/tmp/v2rrules"
|
||||||
json_init
|
json_init
|
||||||
|
|
|
@ -57,7 +57,7 @@ _err() {
|
||||||
|
|
||||||
version_over_5_4() {
|
version_over_5_4() {
|
||||||
MAJOR_VERSION=$(uname -r | awk -F '.' '{print $1}')
|
MAJOR_VERSION=$(uname -r | awk -F '.' '{print $1}')
|
||||||
MINOR_VERSION=$(uname -r | awk -F '.' '{print $2}')
|
MINOR_VERSION=$(uname -r | awk -F '.' '{print $2}' | awk -F '-' '{print $1}')
|
||||||
if [ $MAJOR_VERSION -ge 5 ] && [ $MINOR_VERSION -gt 13 ] || [ $MAJOR_VERSION -gt 5 ] ; then
|
if [ $MAJOR_VERSION -ge 5 ] && [ $MINOR_VERSION -gt 13 ] || [ $MAJOR_VERSION -gt 5 ] ; then
|
||||||
return 0
|
return 0
|
||||||
else
|
else
|
||||||
|
@ -485,6 +485,7 @@ add_xray_redirect_rules() {
|
||||||
|
|
||||||
[ "$(uci -q get xray.main_transparent_proxy.redirect_udp)" = "1" ] && [ "$(uci -q get xray.omrout.protocol)" != "socks" ] && portudp="$port"
|
[ "$(uci -q get xray.main_transparent_proxy.redirect_udp)" = "1" ] && [ "$(uci -q get xray.omrout.protocol)" != "socks" ] && portudp="$port"
|
||||||
ifnames="$(uci -q get shadowsocks-libev.ss_rules.ifnames)"
|
ifnames="$(uci -q get shadowsocks-libev.ss_rules.ifnames)"
|
||||||
|
[ -z "$ifnames" ] && ifnames="$(uci -q get shadowsocks-rust.ss_rules.ifnames)"
|
||||||
|
|
||||||
local tmp="/tmp/xrrules"
|
local tmp="/tmp/xrrules"
|
||||||
json_init
|
json_init
|
||||||
|
|
Loading…
Reference in a new issue