option enable_dns_forward 1
config group 'wechat'
- option g_type '1'
- list domain_name 'open.weixin.qq.com'
- list domain_name 'api.weixin.qq.com'
+ option g_type '3'
+ list wildcard_domain '.weixin.qq.com'
+ option g_desc '微信泛域名'
+
+config group 'wechat2'
+ option g_type '1'
list domain_name 'weixin.qq.com'
- option g_desc '微信'
+ option g_desc '微信域名'
config group 'dingtalk'
- option g_type '1'
- list domain_name 'oapi.dingtalk.com'
- list domain_name 'open-dev.dingtalk.com'
- list domain_name 'dingtalk.com'
+ option g_type '3'
+ list wildcard_domain '.dingtalk.com'
option g_desc '钉钉'
+config group 'dingtalk2'
+ option g_type '1'
+ list domain_name 'dingtalk.com'
+ option g_desc '钉钉域名'
+
config group 'alipay'
+ option g_type '3'
+ list wildcard_domain '.alipay.com'
+ list wildcard_domain '.alipayobjects.com'
+ list wildcard_domain '.alipaydev.com'
+ option g_desc '支付宝'
+
+config group 'alipay2'
option g_type '1'
list domain_name 'alipay.com'
list domain_name 'alipayobjects.com'
list domain_name 'alipaydev.com'
- option g_desc '支付宝'
+ option g_desc '支付宝域名'
config group 'macdemo'
option g_type '2'
'apple_cna:bool:0' \
'channel_path:string' \
'trusted_domains:list(host)' \
+ 'trusted_wildcard_domains:list(string)' \
'trusted_macs:list(string)' \
'app_white_list:list(string)' \
'mac_white_list:list(string)' \
+ 'wildcard_white_list:list(string)' \
'enable_dns_forward:bool:1' \
'enable_websocket:bool:1' \
'js_filter:bool:1'
done
fi
+ if [ ! -z "$wildcard_white_list" ]; then
+ # iterate wildcard_white_list and find the corresponding domain according to the item
+ for group in $wildcard_white_list; do
+ group_wildcard_list=$(uci get wifidogx.$group.wildcard_domain)
+ if [ ! -z "$group_wildcard_list" ]; then
+ trusted_wildcard_domains="$trusted_wildcard_domains $group_wildcard_list"
+ fi
+ done
+ fi
+
# set above variables to config file
echo "GatewayID $gateway_id" > ${CONFIGFILE}
echo "GatewayInterface $gateway_interface" >> ${CONFIGFILE}
trusted_macs=$(echo $trusted_macs | tr ' ' ',')
echo "TrustedMACList $trusted_macs" >> ${CONFIGFILE}
fi
+ # if has trusted_wildcard_domains, add it to config file
+ if [ ! -z "$trusted_wildcard_domains" ]; then
+ trusted_wildcard_domains=$(echo $trusted_wildcard_domains | tr ' ' ',')
+ echo "TrustedPanDomains $trusted_wildcard_domains" >> ${CONFIGFILE}
+ fi
}
start_service() {