mirror of
https://github.com/tsingui/softcenter-1.git
synced 2024-12-25 19:45:16 +00:00
first commit
This commit is contained in:
commit
9af7ce5e15
9
index.html
Normal file
9
index.html
Normal file
@ -0,0 +1,9 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta name="KoolshareMonitor" content="KoolshareMonitor Tag">
|
||||
<title>Hello to everyone</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Hello to everyone </h1>
|
||||
</body>
|
||||
</html>
|
30
v2ray/build.sh
Executable file
30
v2ray/build.sh
Executable file
@ -0,0 +1,30 @@
|
||||
#!/bin/sh
|
||||
|
||||
|
||||
MODULE=v2ray
|
||||
VERSION=4.7.0
|
||||
TITLE=v2ray
|
||||
DESCRIPTION=v2ray
|
||||
HOME_URL=Module_v2ray.asp
|
||||
|
||||
# Check and include base
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
if [ "$MODULE" == "" ]; then
|
||||
echo "module not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -f "$DIR/$MODULE/$MODULE/install.sh" ]; then
|
||||
echo "install script not found"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
# now include build_base.sh
|
||||
. $DIR/../softcenter/build_base.sh
|
||||
|
||||
# change to module directory
|
||||
cd $DIR
|
||||
|
||||
# do something here
|
||||
|
||||
do_build_result
|
8
v2ray/config.json.js
Normal file
8
v2ray/config.json.js
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"version":"4.7.0",
|
||||
"md5":"04f601b456d657a7021dae2c30192572",
|
||||
"home_url":"Module_v2ray.asp",
|
||||
"title":"v2ray",
|
||||
"description":"v2ray",
|
||||
"build_date":"2018-12-02_02:23:04"
|
||||
}
|
BIN
v2ray/v2ray.tar.gz
Normal file
BIN
v2ray/v2ray.tar.gz
Normal file
Binary file not shown.
BIN
v2ray/v2ray/bin/geoip.dat
Normal file
BIN
v2ray/v2ray/bin/geoip.dat
Normal file
Binary file not shown.
152
v2ray/v2ray/bin/geosite.dat
Normal file
152
v2ray/v2ray/bin/geosite.dat
Normal file
File diff suppressed because one or more lines are too long
BIN
v2ray/v2ray/bin/v2ctl
Normal file
BIN
v2ray/v2ray/bin/v2ctl
Normal file
Binary file not shown.
BIN
v2ray/v2ray/bin/v2ray
Normal file
BIN
v2ray/v2ray/bin/v2ray
Normal file
Binary file not shown.
16
v2ray/v2ray/install.sh
Executable file
16
v2ray/v2ray/install.sh
Executable file
@ -0,0 +1,16 @@
|
||||
#! /bin/sh
|
||||
cd /tmp
|
||||
cp -rf /tmp/v2ray/v2ray /jffs/softcenter/bin/
|
||||
cp -rf /tmp/v2ray/v2ctl /jffs/softcenter/bin/
|
||||
cp -rf /tmp/v2ray/geosite.dat /jffs/softcenter/bin/
|
||||
cp -rf /tmp/v2ray/geoip.dat /jffs/softcenter/bin/
|
||||
cp -rf /tmp/v2ray/webs/Module_v2ray.asp /jffs/softcenter/webs/
|
||||
cp -rf /tmp/v2ray/res/* /jffs/softcenter/res/
|
||||
cp -rf /tmp/v2ray/scripts/softcenter_v2ray.sh /jffs/softcenter/scripts/
|
||||
cd /
|
||||
rm -rf /tmp/v2ray* >/dev/null 2>&1
|
||||
|
||||
|
||||
chmod 755 /jffs/softcenter/bin/v2*
|
||||
chmod 755 /jffs/softcenter/scripts/softcenter_v2ray.sh
|
||||
|
BIN
v2ray/v2ray/res/icon-v2ray.png
Normal file
BIN
v2ray/v2ray/res/icon-v2ray.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.1 KiB |
269
v2ray/v2ray/scripts/softcenter_v2ray.sh
Normal file
269
v2ray/v2ray/scripts/softcenter_v2ray.sh
Normal file
@ -0,0 +1,269 @@
|
||||
#!/bin/sh
|
||||
|
||||
udp_enable=`nvram get v2ray_udp_enable`
|
||||
v2ray_user=`nvram get v2ray_user`
|
||||
v2ray_sip=`nvram get v2ray_srcip`
|
||||
dns_mode=`nvram get v2ray_dnsmode`
|
||||
ss_dns_china=`nvram get v2ray_dns`
|
||||
mdisk=`nvram get k3c_disk`
|
||||
usb_disk="/tmp/mnt/$mdisk"
|
||||
usbmount=`ls /tmp/mnt/`
|
||||
V2RAY_CONFIG_FILE="/tmp/etc/v2rayconfig.json"
|
||||
TEMP_CONFIG_FILE="/tmp/v2rayconfig.pb"
|
||||
|
||||
gen_conf() {
|
||||
json_data=`/jffs/softcenter/bin/jq . $V2RAY_CONFIG_FILE`
|
||||
/jffs/softcenter/bin/jq -e . $V2RAY_CONFIG_FILE >/dev/null 2>&1 || return 2
|
||||
local json_key="socks"
|
||||
local json_value="\"dokodemo-door\""
|
||||
local line_data=$(echo "$json_data" | grep -w "$json_key" )
|
||||
[ "${line_data:$((${#line_data}-1))}" = "," ] && json_value="${json_value},"
|
||||
local json_new_data=$(echo "$json_data" | sed "s/$line_data/ \"protocol\": $json_value/")
|
||||
echo "$json_new_data" | /jffs/softcenter/bin/jq -e . >/dev/null 2>&1 || return 3
|
||||
json_data="$json_new_data" && echo "$json_data" > $V2RAY_CONFIG_FILE
|
||||
}
|
||||
gen_conf1() {
|
||||
json_data=`/jffs/softcenter/bin/jq . $V2RAY_CONFIG_FILE`
|
||||
/jffs/softcenter/bin/jq -e . $V2RAY_CONFIG_FILE >/dev/null 2>&1 || return 2
|
||||
local json_key="1080,"
|
||||
local json_value="1234"
|
||||
local line_data=$(echo "$json_data" | grep -w "$json_key" )
|
||||
[ "${line_data:$((${#line_data}-1))}" = "," ] && json_value="${json_value},"
|
||||
local json_new_data=$(echo "$json_data" | sed "s/$line_data/ \"port\": $json_value/")
|
||||
echo "$json_new_data" | /jffs/softcenter/bin/jq -e . >/dev/null 2>&1 || return 3
|
||||
json_data="$json_new_data" && echo "$json_data" > $V2RAY_CONFIG_FILE
|
||||
}
|
||||
gen_conf2() {
|
||||
json_data=`/jffs/softcenter/bin/jq . $V2RAY_CONFIG_FILE`
|
||||
/jffs/softcenter/bin/jq -e . $V2RAY_CONFIG_FILE >/dev/null 2>&1 || return 2
|
||||
local json_key="127.0.0.1"
|
||||
local json_value=" \"followRedirect\": true"
|
||||
local line_data=$(echo "$json_data" | grep -w "$json_key" )
|
||||
[ "${line_data:$((${#line_data}-1))}" = "," ] && json_value="${json_value}," && json_key="\"${json_key}\","
|
||||
local json_new_data=$(echo "$json_data" | sed "s/$line_data/ \"ip\": $json_key\n$json_value/")
|
||||
json_data="$json_new_data" && echo "$json_data" > $V2RAY_CONFIG_FILE
|
||||
}
|
||||
|
||||
download_v2ray(){
|
||||
#
|
||||
PKG_VERSION=$(wget --no-check-certificate https://api.github.com/repos/v2ray/v2ray-core/releases/latest -q -O -|grep tag_name|awk {'print $2'}|cut -d '"' -f 2)
|
||||
V2RA_VER=`/jffs/softcenter/bin/v2ray --version 2>/dev/null | head -n1 | awk '{print $2}'` || 0
|
||||
Tmpv2ray=v2ray
|
||||
Tmpv2ctl=v2ctl
|
||||
tarfile=v2ray-linux-mips.zip
|
||||
v2ray_bin=https://github.com/v2ray/v2ray-core/releases/download/"$PKG_VERSION"/$tarfile
|
||||
v2ray_bin2=http://k3c.paldier.com/tools/$tarfile
|
||||
d_rule() {
|
||||
wget --no-check-certificate --timeout=10 --tries=3 -qO $1 $2
|
||||
}
|
||||
echo "$(date "+%F %T") 在线版本: $PKG_VERSION" >> /tmp/v2ray.log
|
||||
echo "$(date "+%F %T") 本地版本: v$V2RA_VER" >> /tmp/v2ray.log
|
||||
logger -t "【v2ray】" "在线版本 $PKG_VERSION"
|
||||
logger -t "【v2ray】" "本地版本 v$V2RA_VER"
|
||||
if [ "v$V2RA_VER" != "$PKG_VERSION" ]; then
|
||||
logger -t "【v2ray】" "本地版本与在线版本不同,下载 $PKG_VERSION ......"
|
||||
echo "$(date "+%F %T"): 本地版本与在线版本不同,下载 $PKG_VERSION ......" >> /tmp/v2ray.log
|
||||
cd /tmp
|
||||
d_rule $tarfile $v2ray_bin
|
||||
[ "$?" != "0" ] && sleep 2 && d_rule $tarfile $v2ray_bin2 && \
|
||||
[ "$?" != "0" ] && logger -t "【v2ray】" "$PKG_VERSION 下载失败" && echo "$(date "+%F %T"): $PKG_VERSION 下载失败" >> /tmp/v2ray.log && exit 1
|
||||
mkdir /tmp/v2ray-"$PKG_VERSION"-linux-mips
|
||||
unzip -o /tmp/$tarfile -d /tmp/v2ray-"$PKG_VERSION"-linux-mips
|
||||
mv /tmp/v2ray-"$PKG_VERSION"-linux-mips/v2ray /jffs/softcenter/bin/v2ray && chmod 755 /jffs/softcenter/bin/v2ray
|
||||
mv /tmp/v2ray-"$PKG_VERSION"-linux-mips/v2ctl /jffs/softcenter/bin/v2ctl && chmod 755 /jffs/softcenter/bin/v2ctl
|
||||
mv /tmp/v2ray-"$PKG_VERSION"-linux-mips/geosite.dat /jffs/softcenter/bin/geosite.dat && chmod 755 /jffs/softcenter/bin/geosite.dat
|
||||
mv /tmp/v2ray-"$PKG_VERSION"-linux-mips/geoip.dat /jffs/softcenter/bin/geoip.dat && chmod 755 /jffs/softcenter/bin/geoip.dat
|
||||
if [ ! -e "/jffs/softcenter/bin/jq" ] ;then
|
||||
wget --no-check-certificate --timeout=10 --tries=3 -qO /jffs/softcenter/bin/jq http://k3c.paldier.com/tools/jq
|
||||
wget --no-check-certificate --timeout=10 --tries=3 -qO /jffs/softcenter/bin/dns2socks http://k3c.paldier.com/tools/dns2socks
|
||||
chmod 755 /jffs/softcenter/bin/jq >/dev/null 2>&1
|
||||
chmod 755 /jffs/softcenter/bin/dns2socks >/dev/null 2>&1
|
||||
fi
|
||||
jqmd5=`md5sum /jffs/softcenter/bin/jq |awk '{print $1}'`
|
||||
if [ "$jqmd5" != "91d61fbe4378a0d077109f9c9047dffa" ] ;then
|
||||
wget --no-check-certificate --timeout=10 --tries=3 -qO /jffs/softcenter/bin/jq http://k3c.paldier.com/tools/jq
|
||||
[ "$?" != "0" ] && sleep 2 && wget --no-check-certificate --timeout=10 --tries=3 -qO /jffs/softcenter/bin/jq http://k3c.paldier.com/tools/jq
|
||||
[ "$?" != "0" ] && echo "$(date "+%F %T"): jq 下载失败" >> /tmp/v2ray.log && exit 1
|
||||
fi
|
||||
logger -t "【v2ray】" "$PKG_VERSION 下载成功!"
|
||||
echo "$(date "+%F %T"): $PKG_VERSION 下载成功" >> /tmp/v2ray.log
|
||||
rm -rf /tmp/$tarfile /tmp/v2ray-"$PKG_VERSION"-linux-mips >/dev/null 2>&1
|
||||
fi
|
||||
}
|
||||
|
||||
v2ray_test(){
|
||||
echo "$(date "+%F %T"): 测试V2Ray配置文件....." >> /tmp/v2ray.log
|
||||
result=$(/jffs/softcenter/bin/v2ray -test -config="$V2RAY_CONFIG_FILE" | grep "Configuration OK.")
|
||||
if [ -n "$result" ];then
|
||||
echo $result
|
||||
echo "$(date "+%F %T"): V2Ray配置文件通过测试!!!" >> /tmp/v2ray.log
|
||||
logger -t "【v2ray】" "配置文件通过测试!"
|
||||
[ "$v2ray_user" = "1" ] && {
|
||||
cp -f "$V2RAY_CONFIG_FILE" /jffs/softcenter/etc/v2rayconfig.json.bak
|
||||
echo "$(date "+%F %T"): V2Ray配置文件已备份!!!" >> /tmp/v2ray.log
|
||||
echo "$(date "+%F %T"): 运行正常后请关闭启用配置选项,不然每重启均保存一次!" >> /tmp/v2ray.log
|
||||
logger -t "【v2ray】" "配置文件已备份!"
|
||||
logger -t "【v2ray】" "运行正常后请关闭启用配置选项,不然每重启均保存一次!"
|
||||
}
|
||||
/jffs/softcenter/bin/v2ctl config < "$V2RAY_CONFIG_FILE" > "$TEMP_CONFIG_FILE"
|
||||
else
|
||||
echo "$(date "+%F %T"): V2Ray配置文件没有通过测试,请检查设置!!!" >> /tmp/v2ray.log
|
||||
logger -t "【v2ray】" "配置文件没有通过测试,请检查设置!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
v2ray_serverip(){
|
||||
# 检测用户json的服务器ip地址
|
||||
v2ray_protocal=`cat "$V2RAY_CONFIG_FILE" | /jffs/softcenter/bin/jq -r .outbound.protocol`
|
||||
case $v2ray_protocal in
|
||||
vmess)
|
||||
v2ray_server=`cat "$V2RAY_CONFIG_FILE" | /jffs/softcenter/bin/jq -r .outbound.settings.vnext[0].address`
|
||||
;;
|
||||
socks)
|
||||
v2ray_server=`cat "$V2RAY_CONFIG_FILE" | /jffs/softcenter/bin/jq -r .outbound.settings.servers[0].address`
|
||||
;;
|
||||
shadowsocks)
|
||||
v2ray_server=`cat "$V2RAY_CONFIG_FILE" | /jffs/softcenter/bin/jq -r .outbound.settings.servers[0].address`
|
||||
;;
|
||||
*)
|
||||
v2ray_server=""
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -n "$v2ray_server" -a "$v2ray_server" != "null" ];then
|
||||
IFIP_VS=`echo $v2ray_server|grep -E "([0-9]{1,3}[\.]){3}[0-9]{1,3}|:"`
|
||||
if [ -n "$IFIP_VS" ];then
|
||||
v2ray_server_ip="$v2ray_server"
|
||||
echo "$(date "+%F %T"): 检测到你的json配置的v2ray服务器是:$v2ray_server" >> /tmp/v2ray.log
|
||||
else
|
||||
echo "$(date "+%F %T"): 检测到你的json配置的v2ray服务器:$v2ray_server不是ip格式!" >> /tmp/v2ray.log
|
||||
echo "$(date "+%F %T"): 为了确保v2ray的正常工作,建议配置ip格式的v2ray服务器地址!" >> /tmp/v2ray.log
|
||||
echo "$(date "+%F %T"): 尝试解析v2ray服务器的ip地址..." >> /tmp/v2ray.log
|
||||
v2ray_server_ip=`nslookup "$v2ray_server" 114.114.114.114 | sed '1,4d' | awk '{print $3}' | grep -v :|awk 'NR==1{print}'`
|
||||
if [ "$?" == "0" ]; then
|
||||
v2ray_server_ip=`echo $v2ray_server_ip|grep -E "([0-9]{1,3}[\.]){3}[0-9]{1,3}|:"`
|
||||
else
|
||||
echo "$(date "+%F %T"): v2ray服务器域名解析失败!" >> /tmp/v2ray.log
|
||||
echo "$(date "+%F %T"): 尝试用resolveip方式解析..." >> /tmp/v2ray.log
|
||||
v2ray_server_ip=`resolveip -4 -t 2 $ss_basic_server|awk 'NR==1{print}'`
|
||||
if [ "$?" == "0" ];then
|
||||
v2ray_server_ip=`echo $v2ray_server_ip|grep -E "([0-9]{1,3}[\.]){3}[0-9]{1,3}|:"`
|
||||
fi
|
||||
fi
|
||||
if [ -n "$v2ray_server_ip" ];then
|
||||
echo "$(date "+%F %T"): v2ray服务器的ip地址解析成功:$v2ray_server_ip" >> /tmp/v2ray.log
|
||||
echo "address=/$v2ray_server/$v2ray_server_ip" > /etc/dnsmasq.user/ss_host.conf
|
||||
v2ray_server_ip="$v2ray_server_ip"
|
||||
else
|
||||
echo "$(date "+%F %T"): v2ray服务器的ip地址解析失败!插件将继续运行,域名解析将由v2ray自己进行!" >> /tmp/v2ray.log
|
||||
echo "$(date "+%F %T"): 请自行将v2ray服务器的ip地址填入IP/CIDR白名单中!" >> /tmp/v2ray.log
|
||||
echo "$(date "+%F %T"): 为了确保v2ray的正常工作,建议配置ip格式的v2ray服务器地址!" >> /tmp/v2ray.log
|
||||
fi
|
||||
fi
|
||||
else
|
||||
echo "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" >> /tmp/v2ray.log
|
||||
echo "+ 没有检测到你的v2ray服务器地址,如果你确定你的配置是正确的 +" >> /tmp/v2ray.log
|
||||
echo "+ 请自行将v2ray服务器的ip地址填入黑名单中,以确保正常使用 +" >> /tmp/v2ray.log
|
||||
echo "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" >> /tmp/v2ray.log
|
||||
fi
|
||||
mip=$v2ray_server_ip
|
||||
}
|
||||
|
||||
stop() {
|
||||
killall -q -9 v2ray_mon.sh >/dev/null 2>&1 && killall v2ray_mon.sh >/dev/null 2>&1
|
||||
killall -q -9 dns2socks 2>/dev/null && killall dns2socks 2>/dev/null
|
||||
killall -q -9 v2ray 2>/dev/null && killall v2ray 2>/dev/null
|
||||
killall -q pdnsd 2>/dev/null
|
||||
service restart_dnsmasq >/dev/null 2>&1
|
||||
|
||||
}
|
||||
|
||||
start() {
|
||||
killall -q -9 v2ray_mon.sh >/dev/null 2>&1
|
||||
icount=`ps -w|grep v2rayconfig |grep -v grep|wc -l`
|
||||
|
||||
if [ $icount != 0 ] ;then
|
||||
stop
|
||||
sleep 2s
|
||||
fi
|
||||
|
||||
if [ "$usbmount" == "" ];then
|
||||
echo " $(date "+%F %T"):""系统正在启动,等待USB设备挂载中!" >> /tmp/v2ray.log
|
||||
fi
|
||||
while [ "$usbmount" == "" ]
|
||||
do
|
||||
sleep 5s
|
||||
usbmount=`ls /tmp/mnt/ |grep $mdisk`
|
||||
done
|
||||
[ "$ss_dns_china" == "0" ] && GFWCDN="208.67.222.222"
|
||||
[ "$ss_dns_china" == "1" ] && GFWCDN="8.8.8.8"
|
||||
|
||||
download_v2ray
|
||||
|
||||
if [ "$v2ray_user" = "1" ] ;then
|
||||
echo $v2ray_sip > $V2RAY_CONFIG_FILE
|
||||
sed -i "s/,yushi,/\n/g" $V2RAY_CONFIG_FILE
|
||||
|
||||
gen_conf
|
||||
gen_conf1
|
||||
gen_conf2
|
||||
else
|
||||
if [ -f /jffs/softcenter/etc/v2rayconfig.json.bak ];then
|
||||
rm -rf "$V2RAY_CONFIG_FILE"
|
||||
cp -f /jffs/softcenter/etc/v2rayconfig.json.bak "$V2RAY_CONFIG_FILE"
|
||||
echo "$(date "+%F %T"): V2Ray使用备份配置启动!!!" >> /tmp/v2ray.log
|
||||
logger -t "【v2ray】" "使用备份配置启动!"
|
||||
else
|
||||
echo "$(date "+%F %T"): V2Ray没选择启用配置,地球上也找不到备份配置,暂时休息!!!" >> /tmp/v2ray.log
|
||||
logger -t "【v2ray】" "没选择启用配置,地球上也找不到备份配置,暂时休息!"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
#
|
||||
v2ray_test
|
||||
v2ray_serverip
|
||||
|
||||
#if [ -f "$TEMP_CONFIG_FILE" ];then
|
||||
/jffs/softcenter/bin/v2ray -format pb -config "$TEMP_CONFIG_FILE" >/dev/null 2>&1 &
|
||||
#else
|
||||
# /jffs/toolscript/ssr/v2ray -config "$V2RAY_CONFIG_FILE" >/dev/null 2>&1 &
|
||||
#fi
|
||||
if [ "$udp_enable" == "1" ];then
|
||||
echo "$(date "+%F %T"): V2Ray暂不支持前端UDP转发这个选项,不影响程序继续运行!!!" >> /tmp/v2ray.log
|
||||
logger -t "【v2ray】" "V2Ray暂不支持前端UDP转发这个选项,不影响程序继续运行!"
|
||||
fi
|
||||
if [ "$dns_mode" == "2" ];then
|
||||
/jffs/softcenter/bin/dns2socks 127.0.0.1:23456 $GFWCDN:53 127.0.0.1:7913 >/dev/null 2>&1 &
|
||||
fi
|
||||
if [ "$dns_mode" == "0" ];then
|
||||
echo "$(date "+%F %T"): V2Ray暂不支持远程解析模式,请选择其它解析模式再试!!!" >> /tmp/v2ray.log
|
||||
logger -t "【v2ray】" "暂不支持远程解析模式,请选择其它解析模式再试!"
|
||||
exit 1
|
||||
fi
|
||||
/usr/sbin/v2ray-rules $mip 1234 &
|
||||
|
||||
/usr/sbin/ssr-state 2>/dev/null &
|
||||
rm -rf $V2RAY_CONFIG_FILE
|
||||
exit 0
|
||||
}
|
||||
|
||||
restart() {
|
||||
stop
|
||||
sleep 2
|
||||
menable=`nvram get v2ray_enable`
|
||||
kenable=`nvram get k3c_enable`
|
||||
if [ "$menable" == "1" ];then
|
||||
if [ "$kenable" == "1" ] ;then
|
||||
start
|
||||
else
|
||||
logger -t "K3C" "K3C扩展设置挂载未开启!"
|
||||
echo " $(date "+%F %T"):""K3C扩展设置挂载未开启!" >> /tmp/v2ray.log
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
restart
|
||||
|
364
v2ray/v2ray/webs/Module_v2ray.asp
Normal file
364
v2ray/v2ray/webs/Module_v2ray.asp
Normal file
@ -0,0 +1,364 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<html xmlns:v>
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
|
||||
<meta HTTP-EQUIV="Expires" CONTENT="-1">
|
||||
<title>软件中心 - v2ray</title>
|
||||
<link rel="shortcut icon" href="images/favicon.png">
|
||||
<link rel="icon" href="images/favicon.png">
|
||||
<link rel="stylesheet" type="text/css" href="ParentalControl.css">
|
||||
<link rel="stylesheet" type="text/css" href="index_style.css">
|
||||
<link rel="stylesheet" type="text/css" href="form_style.css">
|
||||
<link rel="stylesheet" type="text/css" href="usp_style.css">
|
||||
<link rel="stylesheet" type="text/css" href="/calendar/fullcalendar.css">
|
||||
<link rel="stylesheet" type="text/css" href="/device-map/device-map.css">
|
||||
<script type="text/javascript" src="/state.js"></script>
|
||||
<script type="text/javascript" src="/popup.js"></script>
|
||||
<script type="text/javascript" src="/help.js"></script>
|
||||
<script type="text/javascript" src="/general.js"></script>
|
||||
<script type="text/javascript" src="/client_function.js"></script>
|
||||
<script type="text/javascript" src="/validator.js"></script>
|
||||
<script type="text/javascript" src="/js/jquery.js"></script>
|
||||
<script type="text/javascript" src="/calendar/jquery-ui.js"></script>
|
||||
<script type="text/javascript" src="/switcherplugin/jquery.iphone-switch.js"></script>
|
||||
<style>
|
||||
#selectable .ui-selecting { background: #FECA40; }
|
||||
#selectable .ui-selected { background: #F39814; color: white; }
|
||||
#selectable .ui-unselected { background: gray; color: green; }
|
||||
#selectable .ui-unselecting { background: green; color: black; }
|
||||
#selectable { border-spacing:0px; margin-left:0px;margin-top:0px; padding: 0px; width:100%;}
|
||||
#selectable td { height: 22px; }
|
||||
.parental_th{
|
||||
color:white;
|
||||
background:#2F3A3E;
|
||||
cursor: pointer;
|
||||
width:160px;
|
||||
height:22px;
|
||||
border-bottom:solid 1px black;
|
||||
border-right:solid 1px black;
|
||||
}
|
||||
.parental_th:hover{
|
||||
background:rgb(94, 116, 124);
|
||||
cursor: pointer;
|
||||
}
|
||||
.checked{
|
||||
background-color:#9CB2BA;
|
||||
width:82px;
|
||||
border-bottom:solid 1px black;
|
||||
border-right:solid 1px black;
|
||||
}
|
||||
.disabled{
|
||||
width:82px;
|
||||
border-bottom:solid 1px black;
|
||||
border-right:solid 1px black;
|
||||
}
|
||||
#switch_menu{
|
||||
text-align:right
|
||||
}
|
||||
#switch_menu span{
|
||||
/*border:1px solid #222;*/
|
||||
border-radius:4px;
|
||||
font-size:16px;
|
||||
padding:3px;
|
||||
}
|
||||
/*#switch_menu span:hover{
|
||||
box-shadow:0px 0px 5px 3px white;
|
||||
background-color:#97CBFF;
|
||||
}*/
|
||||
.click:hover{
|
||||
box-shadow:0px 0px 5px 3px white;
|
||||
background-color:#97CBFF;
|
||||
}
|
||||
.clicked{
|
||||
background-color:#2894FF;
|
||||
box-shadow:0px 0px 5px 3px white;
|
||||
}
|
||||
.click{
|
||||
background:#8E8E8E;
|
||||
}
|
||||
.contentM_qis{
|
||||
position:absolute;
|
||||
-webkit-border-radius: 5px;
|
||||
-moz-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
z-index:200;
|
||||
background-color:#2B373B;
|
||||
display:none;
|
||||
margin-left: 32%;
|
||||
top: 250px;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
function initial(){
|
||||
show_menu();
|
||||
document.form.v2ray_srcip.value = document.form.v2ray_srcip.value.replace(/,yushi,/g,"\r\n");
|
||||
show_footer();
|
||||
}
|
||||
function applyRule() {
|
||||
document.form.save_name.disabled=true;
|
||||
document.form.save_content.disabled=true;
|
||||
document.form.v2ray_srcip.value = document.form.v2ray_srcip.value.replace(/\r\n/g,",yushi,");
|
||||
document.form.v2ray_srcip.value = document.form.v2ray_srcip.value.replace(/\n/g,",yushi,");
|
||||
showLoading();
|
||||
document.form.submit();
|
||||
}
|
||||
function reload_Soft_Center() {
|
||||
location.href = "/Softcenter.asp";
|
||||
}
|
||||
$(document).ready(function () {
|
||||
$('#radio_v2ray_enable').iphoneSwitch(document.form.v2ray_enable.value,
|
||||
function(){
|
||||
document.form.v2ray_enable.value = "1";
|
||||
},
|
||||
function(){
|
||||
document.form.v2ray_enable.value = "0";
|
||||
}
|
||||
);
|
||||
});
|
||||
$(document).ready(function () {
|
||||
$('#radio_v2ray_udp_enable').iphoneSwitch(document.form.v2ray_udp_enable.value,
|
||||
function(){
|
||||
document.form.v2ray_udp_enable.value = "1";
|
||||
},
|
||||
function(){
|
||||
document.form.v2ray_udp_enable.value = "0";
|
||||
}
|
||||
);
|
||||
});
|
||||
$(document).ready(function () {
|
||||
$('#radio_v2ray_user').iphoneSwitch(document.form.v2ray_user.value,
|
||||
function(){
|
||||
document.form.v2ray_user.value = "1";
|
||||
},
|
||||
function(){
|
||||
document.form.v2ray_user.value = "0";
|
||||
}
|
||||
);
|
||||
});
|
||||
</script></head>
|
||||
<body onload="initial();" onunload="unload_body();" onselectstart="return false;">
|
||||
<div id="TopBanner"></div>
|
||||
<div id="Loading" class="popup_bg"></div>
|
||||
<iframe name="hidden_frame" id="hidden_frame" width="0" height="0" frameborder="0"></iframe>
|
||||
<form method="post" name="form" action="/start_apply.htm" target="hidden_frame">
|
||||
<input type="hidden" name="productid" value="<% nvram_get("productid"); %>">
|
||||
<input type="hidden" name="current_page" value="Tools_v2ray.asp">
|
||||
<input type="hidden" name="next_page" value="">
|
||||
<input type="hidden" name="modified" value="0">
|
||||
<input type="hidden" name="action_wait" value="2">
|
||||
<input type="hidden" name="action_mode" value="toolscript">
|
||||
<input type="hidden" name="action_script" value="softcenter_v2ray.sh">
|
||||
<input type="hidden" name="preferred_lang" id="preferred_lang" value="<% nvram_get("preferred_lang"); %>" disabled>
|
||||
<input type="hidden" name="firmver" value="<% nvram_get("firmver"); %>">
|
||||
<input type="hidden" name="v2ray_enable" value="<% nvram_get("v2ray_enable"); %>">
|
||||
<input type="hidden" name="v2ray_udp_enable" value="<% nvram_get("v2ray_udp_enable"); %>">
|
||||
<input type="hidden" name="ss_china_state" value="<% nvram_get("ss_china_state"); %>">
|
||||
<input type="hidden" name="ss_foreign_state" value="<% nvram_get("ss_foreign_state"); %>">
|
||||
<input type="hidden" name="v2ray_dns" value="<% nvram_get("v2ray_dns"); %>">
|
||||
<input type="hidden" name="v2ray_user" value="<% nvram_get("v2ray_user"); %>">
|
||||
<input type="hidden" name="save_name" value="">
|
||||
<input type="hidden" name="save_content" value="">
|
||||
<table class="content" align="center" cellpadding="0" cellspacing="0" >
|
||||
<tr>
|
||||
<td width="17"> </td>
|
||||
<td valign="top" width="202">
|
||||
<div id="mainMenu"></div>
|
||||
<div id="subMenu"></div>
|
||||
</td>
|
||||
<td valign="top">
|
||||
<div id="tabMenu" class="submenuBlock"></div>
|
||||
<table width="98%" border="0" align="left" cellpadding="0" cellspacing="0" >
|
||||
<tr>
|
||||
<td valign="top" >
|
||||
<table width="730px" border="0" cellpadding="4" cellspacing="0" class="FormTitle" id="FormTitle">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td bgcolor="#4D595D" valign="top">
|
||||
<div> </div>
|
||||
<div style="margin-top:-5px;">
|
||||
<table width="730px">
|
||||
<tr>
|
||||
<td align="left" >
|
||||
<div id="content_title" class="formfonttitle" style="width:400px">工具箱 - v2ray</div>
|
||||
<div style="float:right; width:15px; height:25px;margin-top:10px">
|
||||
<img id="return_btn" onclick="reload_Soft_Center();" align="right" style="cursor:pointer;position:absolute;margin-left:-30px;margin-top:-25px;" title="返回软件中心" src="/images/backprev.png" onMouseOver="this.src='/images/backprevclick.png'" onMouseOut="this.src='/images/backprev.png'"></img>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div style="margin:0px 0px 10px 5px;"><img src="/images/New_ui/export/line_export.png"></div>
|
||||
</div>
|
||||
<div id="PC_desc">
|
||||
<table width="700px" style="margin-left:25px;">
|
||||
<tr>
|
||||
<td>
|
||||
<div id="guest_image" style="background: url(images/New_ui/ssr.png);width: 100px;height: 87px;"></div>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td style="font-size: 14px;">
|
||||
<span id="desc_title">使用步骤:</span>
|
||||
<ol>
|
||||
<li>首先打开扩展挂载并挂载虚拟内存</li>
|
||||
<li>然后自行获取服务器参数</li>
|
||||
<li>最后手动上传配置文件或在自定义配置里粘贴配置</li>
|
||||
</ol>
|
||||
<span id="desc_note" style="color:#FC0;">注意:</span>
|
||||
<ol style="color:#FC0;margin:-5px 0px 3px -18px;*margin-left:18px;">
|
||||
<li>测试版,不保证各项功能正常</li>
|
||||
<li>所有别名及参数中不允许有">"字符。仅dns2socks模式socks5代理端口:23456 (待测) </li>
|
||||
<li>本地代理必须为默认:协议socks端口1080</li>
|
||||
</ol>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id="edit_time_anchor"></div>
|
||||
<table width="100%" border="1" align="center" cellpadding="4" cellspacing="0" bordercolor="#6b8fa3" class="FormTable">
|
||||
<tr>
|
||||
<th id="PC_enable">启用代理</th>
|
||||
<td>
|
||||
<div align="center" class="left" style="width:94px; float:left; cursor:pointer;" id="radio_v2ray_enable"></div>
|
||||
<div class="iphone_switch_container" style="height:32px; width:74px; position: relative; overflow: hidden">
|
||||
<script type="text/javascript">
|
||||
$('#radio_v2ray_enable').iphoneSwitch('<% nvram_get("v2ray_enable"); %>',
|
||||
function(){
|
||||
document.form.v2ray_enable.value = 1;
|
||||
},
|
||||
function(){
|
||||
document.form.v2ray_enable.value = 0;
|
||||
}
|
||||
);
|
||||
</script>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table id="list_table" width="100%" border="0" align="center" cellpadding="0" cellspacing="0" >
|
||||
<tr>
|
||||
<td valign="top" align="center">
|
||||
<div id="VSList_Block"></div>
|
||||
<div >
|
||||
<table width="100%" border="1" cellspacing="0" cellpadding="4" class="FormTable">
|
||||
<tr>
|
||||
<th width="20%">UDP转发</th>
|
||||
<td align="left">
|
||||
<div align="center" class="left" style="width:94px; float:left; cursor:pointer;" id="radio_v2ray_udp_enable"></div>
|
||||
<div class="iphone_switch_container" style="height:32px; width:74px; position: relative; overflow: hidden">
|
||||
<script type="text/javascript">
|
||||
$('#radio_v2ray_udp_enable').iphoneSwitch('<% nvram_get("v2ray_udp_enable"); %>',
|
||||
function(){
|
||||
document.form.v2ray_udp_enable.value = 1;
|
||||
},
|
||||
function(){
|
||||
document.form.v2ray_udp_enable.value = 0;
|
||||
}
|
||||
);
|
||||
</script>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>运行模式</th>
|
||||
<td>
|
||||
<select name="v2ray_mode" class="input_option input_15_table">
|
||||
<option value="0" <% nvram_match( "v2ray_mode", "0","selected"); %>>国外代理模式</option>
|
||||
<option value="1" <% nvram_match( "v2ray_mode", "1","selected"); %>>GFW列表模式</option>
|
||||
<option value="2" <% nvram_match( "v2ray_mode", "2","selected"); %>>全局代理模式</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>DNS解析方式</th>
|
||||
<td>
|
||||
<select name="v2ray_dnsmode" class="input_option input_15_table">
|
||||
<option value="0" <% nvram_match( "v2ray_dnsmode", "0","selected"); %>>远程解析模式</option>
|
||||
<option value="1" <% nvram_match( "v2ray_dnsmode", "1","selected"); %>>Pdnsd解析模式</option>
|
||||
<option value="2" <% nvram_match( "v2ray_dnsmode", "2","selected"); %>>dns2socks模式</option>
|
||||
</select>
|
||||
<a href="http://www.ip111.cn/" target=_blank> 【 分流检测 】</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>国外DNS</th>
|
||||
<td>
|
||||
<select name="v2ray_dns" class="input_option input_15_table">
|
||||
<option value="0" <% nvram_match( "v2ray_dns", "0","selected"); %>>opendns</option>
|
||||
<option value="1" <% nvram_match( "v2ray_dns", "1","selected"); %>>googledns</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th width="20%">启用v2ray配置</th>
|
||||
<td align="left">
|
||||
<div align="center" class="left" style="width:94px; float:left; cursor:pointer;" id="radio_v2ray_user"></div>
|
||||
<div class="iphone_switch_container" style="height:32px; width:74px; position: relative; overflow: hidden">
|
||||
<script type="text/javascript">
|
||||
$('#radio_v2ray_user').iphoneSwitch('<% nvram_get("v2ray_user"); %>',
|
||||
function(){
|
||||
document.form.v2ray_user.value = 1;
|
||||
},
|
||||
function(){
|
||||
document.form.v2ray_user.value = 0;
|
||||
}
|
||||
);
|
||||
</script>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>自定义配置</th>
|
||||
<td>
|
||||
<textarea rows="6" cols="44" style="width:99%;background-color: #475A5F;color:#FFFFFF;" name="v2ray_srcip" maxlength="5000" placeholder="提示: 手动输入自定义配置,正常运行后请关闭启用v2ray配置选项,使用备份配置运行,不然每重启均保存一次配置。"><% nvram_show_chinese_char("v2ray_srcip"); %></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id="ss_status">
|
||||
<table style="margin:-1px 0px 0px 0px;" width="100%" border="1" align="center" cellpadding="4" cellspacing="0" bordercolor="#6b8fa3" class="FormTable" >
|
||||
<tr id="ss_state">
|
||||
<th id="mode_state" width="35%">运行状态</th>
|
||||
<td>
|
||||
<div style="display:table-cell;float: left;margin-left:0px;">
|
||||
<span id="ss_state1"><% nvram_get("ss_foreign_state"); %></span>
|
||||
<br/>
|
||||
<span id="ss_state2"><% nvram_get("ss_china_state"); %></span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<thead>
|
||||
<tr>
|
||||
<td colspan="2">运行信息</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr><td colspan="2">
|
||||
<textarea cols="63" rows="25" wrap="off" readonly="readonly" id="textarea" style="width:99%;font-family:Courier New, Courier, mono; font-size:11px;background:#475A5F;color:#FFFFFF;">
|
||||
<% nvram_dump("v2ray.log",""); %>
|
||||
</textarea>
|
||||
</td></tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="apply_gen">
|
||||
<input class="button_gen" onclick="applyRule()" type="button" value="应用设置"/>
|
||||
<input type="button" onClick="location.href=location.href" value="刷新状态" class="button_gen">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td width="10" align="center" valign="top"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<div id="footer"></div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
2
v2ray/version
Normal file
2
v2ray/version
Normal file
@ -0,0 +1,2 @@
|
||||
4.7.0
|
||||
04f601b456d657a7021dae2c30192572
|
Loading…
Reference in New Issue
Block a user