mirror of
https://github.com/kenzok8/small.git
synced 2025-01-08 12:08:21 +08:00
update 2024-11-04 00:14:36
This commit is contained in:
parent
ff6a2ef983
commit
e8d1d295a9
@ -15,7 +15,13 @@ CON_T=$SDNS/rules.conf
|
||||
PID=/var/run/smartdns.pid
|
||||
LOG=/var/log/bypass.log
|
||||
BIN_DIR=/usr/share/bypass
|
||||
DNS_FILE=/tmp/dnsmasq.d/dnsmasq-by.conf
|
||||
# Get the default DNSMasq config ID from the UCI configuration
|
||||
DEFAULT_DNSMASQ_CFGID=$(uci show dhcp.@dnsmasq[0] | awk -F '.' '{print $2}' | awk -F '=' '{print $1}' | head -1)
|
||||
# Locate the dnsmasq.conf file that contains the conf-dir option
|
||||
DNSMASQ_CONF_PATH=$(grep -l "^conf-dir=" "/tmp/etc/dnsmasq.conf.${DEFAULT_DNSMASQ_CFGID}")
|
||||
# Extract the directory path from the conf-dir line
|
||||
DNSMASQ_CONF_DIR=$(grep '^conf-dir=' "$DNSMASQ_CONF_PATH" | cut -d'=' -f2 | head -n 1)
|
||||
DNS_FILE=${DNSMASQ_CONF_DIR%*/}/dnsmasq-by.conf
|
||||
DNS_DIR=/tmp/dnsmasq.by
|
||||
O=$DNS_DIR/tmp
|
||||
CRON="grep -q $BIN_DIR $CRON_FILE && sed -i '/\/share\/bypass/d' $CRON_FILE"
|
||||
@ -698,7 +704,7 @@ gen_dns(){
|
||||
for i in $dns_tmp;do ipset add ss_spec_wan_ac $i 2>/dev/null;done
|
||||
fi
|
||||
smartdns_flag=1
|
||||
mkdir -p /tmp/dnsmasq.d $SDNS $DNS_DIR
|
||||
mkdir -p ${DNSMASQ_CONF_DIR%*/} $SDNS $DNS_DIR
|
||||
cat >$DNS_T <<-EOF
|
||||
force-AAAA-SOA yes
|
||||
speed-check-mode none
|
||||
|
@ -1,8 +1,8 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-ssr-plus
|
||||
PKG_VERSION:=188
|
||||
PKG_RELEASE:=9
|
||||
PKG_VERSION:=189
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_NONE_V2RAY \
|
||||
|
@ -125,8 +125,11 @@ o:depends("adblock", "1")
|
||||
o.description = translate("Support AdGuardHome and DNSMASQ format list")
|
||||
|
||||
o = s:option(Button, "reset", translate("Reset to defaults"))
|
||||
o.rawhtml = true
|
||||
o.template = "shadowsocksr/reset"
|
||||
o.inputstyle = "reload"
|
||||
o.write = function()
|
||||
luci.sys.call("/etc/init.d/shadowsocksr reset")
|
||||
luci.http.redirect(luci.dispatcher.build_url("admin", "services", "shadowsocksr", "servers"))
|
||||
end
|
||||
|
||||
-- [[ SOCKS5 Proxy ]]--
|
||||
s = m:section(TypedSection, "socks5_proxy", translate("Global SOCKS5 Proxy Server"))
|
||||
|
@ -1154,54 +1154,6 @@ reset() {
|
||||
set_lock
|
||||
rm -rf /etc/config/shadowsocksr $LOG_FILE
|
||||
touch /etc/config/shadowsocksr $LOG_FILE
|
||||
uci -q batch <<-EOF >/dev/null
|
||||
add shadowsocksr global
|
||||
set shadowsocksr.@global[0].global_server='nil'
|
||||
set shadowsocksr.@global[0].netflix_server='nil'
|
||||
set shadowsocksr.@global[0].netflix_proxy='0'
|
||||
set shadowsocksr.@global[0].threads='0'
|
||||
set shadowsocksr.@global[0].run_mode='router'
|
||||
set shadowsocksr.@global[0].dports='2'
|
||||
set shadowsocksr.@global[0].custom_ports='80,443'
|
||||
set shadowsocksr.@global[0].pdnsd_enable='1'
|
||||
set shadowsocksr.@global[0].tunnel_forward='8.8.4.4:53'
|
||||
set shadowsocksr.@global[0].monitor_enable='1'
|
||||
set shadowsocksr.@global[0].enable_switch='1'
|
||||
set shadowsocksr.@global[0].switch_time='667'
|
||||
set shadowsocksr.@global[0].switch_timeout='5'
|
||||
set shadowsocksr.@global[0].switch_try_count='3'
|
||||
# set shadowsocksr.@global[0].default_packet_encoding='xudp'
|
||||
set shadowsocksr.@global[0].shunt_dns='1'
|
||||
set shadowsocksr.@global[0].gfwlist_url='https://fastly.jsdelivr.net/gh/YW5vbnltb3Vz/domain-list-community@release/gfwlist.txt'
|
||||
set shadowsocksr.@global[0].chnroute_url='https://ispip.clang.cn/all_cn.txt'
|
||||
set shadowsocksr.@global[0].nfip_url='https://fastly.jsdelivr.net/gh/QiuSimons/Netflix_IP/NF_only.txt'
|
||||
set shadowsocksr.@global[0].adblock_url='https://anti-ad.net/anti-ad-for-dnsmasq.conf'
|
||||
add shadowsocksr server_subscribe
|
||||
set shadowsocksr.@server_subscribe[0].proxy='0'
|
||||
set shadowsocksr.@server_subscribe[0].auto_update_time='2'
|
||||
set shadowsocksr.@server_subscribe[0].auto_update='1'
|
||||
set shadowsocksr.@server_subscribe[0].filter_words='过期时间/剩余流量/QQ群/官网/防失联地址/回国'
|
||||
set shadowsocksr.@server_subscribe[0].save_words=''
|
||||
add shadowsocksr access_control
|
||||
set shadowsocksr.@access_control[0].lan_ac_mode='0'
|
||||
set shadowsocksr.@access_control[0].router_proxy='1'
|
||||
add_list shadowsocksr.@access_control[0].wan_fw_ips=149.154.160.0/20
|
||||
add_list shadowsocksr.@access_control[0].wan_fw_ips=67.198.55.0/24
|
||||
add_list shadowsocksr.@access_control[0].wan_fw_ips=91.108.4.0/22
|
||||
add_list shadowsocksr.@access_control[0].wan_fw_ips=91.108.56.0/22
|
||||
add_list shadowsocksr.@access_control[0].wan_fw_ips=109.239.140.0/24
|
||||
add_list shadowsocksr.@access_control[0].wan_fw_ips=8.8.8.8
|
||||
add_list shadowsocksr.@access_control[0].wan_fw_ips=1.1.1.1
|
||||
add_list shadowsocksr.@access_control[0].Interface='lan'
|
||||
add shadowsocksr socks5_proxy
|
||||
set shadowsocksr.@socks5_proxy[0].server='nil'
|
||||
set shadowsocksr.@socks5_proxy[0].local_port='1080'
|
||||
add shadowsocksr server_global
|
||||
set shadowsocksr.@server_global[0].enable_server='0'
|
||||
add shadowsocksr global_xray_fragment
|
||||
set shadowsocksr.@global_xray_fragment[0].fragment='0'
|
||||
set shadowsocksr.@global_xray_fragment[0].noise='0'
|
||||
commit shadowsocksr
|
||||
EOF
|
||||
cp /usr/share/shadowsocksr/shadowsocksr.config /etc/config/shadowsocksr
|
||||
unset_lock
|
||||
}
|
||||
|
@ -0,0 +1,51 @@
|
||||
|
||||
config global
|
||||
option global_server 'nil'
|
||||
option netflix_server 'nil'
|
||||
option netflix_proxy '0'
|
||||
option threads '0'
|
||||
option run_mode 'router'
|
||||
option dports '2'
|
||||
option custom_ports '80,443'
|
||||
option pdnsd_enable '1'
|
||||
option tunnel_forward '8.8.4.4:53'
|
||||
option monitor_enable '1'
|
||||
option enable_switch '1'
|
||||
option switch_time '667'
|
||||
option switch_timeout '5'
|
||||
option switch_try_count '3'
|
||||
option shunt_dns '1'
|
||||
option gfwlist_url 'https://fastly.jsdelivr.net/gh/YW5vbnltb3Vz/domain-list-community@release/gfwlist.txt'
|
||||
option chnroute_url 'https://ispip.clang.cn/all_cn.txt'
|
||||
option nfip_url 'https://fastly.jsdelivr.net/gh/QiuSimons/Netflix_IP/NF_only.txt'
|
||||
option adblock_url 'https://anti-ad.net/anti-ad-for-dnsmasq.conf'
|
||||
|
||||
config server_subscribe
|
||||
option proxy '0'
|
||||
option auto_update_time '2'
|
||||
option auto_update '1'
|
||||
option filter_words '过期时间/剩余流量/QQ群/官网/防失联地址/回国'
|
||||
|
||||
config access_control
|
||||
option lan_ac_mode '0'
|
||||
option router_proxy '1'
|
||||
list wan_fw_ips '149.154.160.0/20'
|
||||
list wan_fw_ips '67.198.55.0/24'
|
||||
list wan_fw_ips '91.108.4.0/22'
|
||||
list wan_fw_ips '91.108.56.0/22'
|
||||
list wan_fw_ips '109.239.140.0/24'
|
||||
list wan_fw_ips '8.8.8.8'
|
||||
list wan_fw_ips '1.1.1.1'
|
||||
list Interface 'lan'
|
||||
|
||||
config socks5_proxy
|
||||
option server 'nil'
|
||||
option local_port '1080'
|
||||
|
||||
config server_global
|
||||
option enable_server '0'
|
||||
|
||||
config global_xray_fragment
|
||||
option fragment '0'
|
||||
option noise '0'
|
||||
|
Loading…
Reference in New Issue
Block a user