├── README.md ├── drcom-generic-debug-u62.py ├── etc ├── drcom.conf ├── opkg.conf └── rc.local ├── usr ├── bin │ ├── check_online.py │ ├── dog_drcom │ ├── drcom_get_account.py │ ├── wired-withouturllib2.py │ └── wired.py └── lib │ ├── lua │ └── luci │ │ ├── controller │ │ ├── admin_mobile │ │ │ └── index.lua │ │ ├── admin_web │ │ │ ├── guide.lua │ │ │ ├── index.lua │ │ │ └── traffic.lua │ │ └── api │ │ │ ├── clinet.lua │ │ │ ├── exam.lua │ │ │ ├── index.lua │ │ │ ├── network.lua │ │ │ ├── passport.lua │ │ │ ├── plugin.lua │ │ │ ├── system.lua │ │ │ ├── turbo.lua │ │ │ └── wifi.lua │ │ ├── util.lua │ │ └── view │ │ ├── admin_mobile │ │ ├── footer.htm │ │ ├── header.htm │ │ ├── index.htm │ │ ├── network │ │ │ └── net_setup.htm │ │ ├── sysauth.htm │ │ ├── sysinfo.htm │ │ ├── system │ │ │ ├── backup.htm │ │ │ ├── clinet_bind.htm │ │ │ ├── guide_finish.htm │ │ │ ├── guide_net.htm │ │ │ ├── guide_password.htm │ │ │ ├── guide_start.htm │ │ │ ├── guide_wifi.htm │ │ │ └── net_detect_1.htm │ │ └── wifi │ │ │ └── wifi_setup.htm │ │ ├── admin_web │ │ ├── guide │ │ │ ├── admin.htm │ │ │ ├── agreement.htm │ │ │ ├── common.htm │ │ │ ├── contact.htm │ │ │ ├── find1.htm │ │ │ ├── find2.htm │ │ │ ├── find3.htm │ │ │ ├── guide_online.htm │ │ │ ├── index.htm │ │ │ ├── insert.htm │ │ │ ├── insert_yes.htm │ │ │ ├── internet.htm │ │ │ ├── internet_DHCP.htm │ │ │ ├── internet_PPPoE.htm │ │ │ ├── internet_check.htm │ │ │ ├── internet_relay.htm │ │ │ ├── internet_static.htm │ │ │ ├── internet_success.htm │ │ │ ├── open_app.htm │ │ │ ├── setsafe.htm │ │ │ └── ssid.htm │ │ ├── home.htm │ │ ├── network │ │ │ ├── devices_list.htm │ │ │ ├── l2tp.htm │ │ │ ├── net_setup.htm │ │ │ ├── net_setup_autowantype.htm │ │ │ ├── net_setup_dhcp.htm │ │ │ ├── net_setup_lan.htm │ │ │ ├── net_setup_mac.htm │ │ │ ├── net_setup_mtu.htm │ │ │ ├── ppp_adv_setup.htm │ │ │ └── upnp.htm │ │ ├── passport │ │ │ ├── apps.htm │ │ │ └── bind.htm │ │ ├── plugin │ │ │ ├── drcom.htm │ │ │ ├── logs.htm │ │ │ ├── mentohust.htm │ │ │ └── x3c.htm │ │ ├── sysauth.htm │ │ ├── sysinfo.htm │ │ ├── system │ │ │ ├── agreement.htm │ │ │ ├── disk.htm │ │ │ ├── guide1.htm │ │ │ ├── guide2.htm │ │ │ ├── guide3.htm │ │ │ ├── guide_online.htm │ │ │ ├── net_detect.htm │ │ │ ├── net_detect_1.htm │ │ │ ├── phone_app_open.htm │ │ │ ├── reboot_reset.htm │ │ │ ├── setup.htm │ │ │ ├── systime.htm │ │ │ ├── upgrade.htm │ │ │ └── upgrade_user.htm │ │ ├── trafficinfo.htm │ │ └── wifi │ │ │ ├── wifi_devices_list.htm │ │ │ ├── wifi_mac_filter.htm │ │ │ ├── wifi_setup.htm │ │ │ └── wifi_setup_channel.htm │ │ ├── error404.htm │ │ ├── error500.htm │ │ ├── footer.htm │ │ ├── header.htm │ │ ├── indexer.htm │ │ └── themes │ │ ├── mobile │ │ ├── footer.htm │ │ └── header.htm │ │ └── turbo │ │ ├── footer.htm │ │ └── header.htm │ └── python2.7 │ ├── base64.py │ ├── httplib.py │ ├── mimetools.py │ ├── rfc822.py │ ├── urllib.py │ ├── urllib2.py │ └── urlparse.py └── www └── turbo-static └── turbo ├── mobile └── image │ ├── cloud.png │ └── cloud2.png └── web └── images ├── bg_131206.png ├── bg_131206@2x.png ├── cloud.png ├── cloud2.png └── cloud3.png /README.md: -------------------------------------------------------------------------------- 1 | DrCOM FOR HC5661 2 | ------------------ 3 | 4 | 强烈建议先看看 https://github.com/drcoms/generic 里的 wiki 5 | 6 | `/usr/bin/wired.py` 可能不是最新的,请访问 以获得最新代码 7 | 8 | 9 | # 保持更新的区域 10 | 11 | u60用户如果不能用请参考这个Issue: 12 | 13 | 14 | # Preface 15 | 16 | 注意对上面这个,对于 0.9004.xxxx 的同学请自行降级到 0.9003.2446s, 或者请自行批量替换 mmcblk0p1 为 mmcblk0p2
17 | 9004固件不稳定, 对于校园网9003固件足矣, 本人不提供9004固件的技术支持, 请见谅. 18 | 19 | 20 | # 警告 21 | * 请先确保在PC上使用 *drcom-generic-debug-u62.py* 测试可以上网以后再考虑本补丁 22 | * 所有风险由使用者承担,作者不承担任何法律责任,否则请您不要使用 23 | 24 | 有关其他可以让程序运行的更美好的办法可以参考 README 尾部
25 | 首先,刷打开了ssh的固件,通俗说为root (详细参考www.hiwifimi.com),版本 0.9003.2446s 26 | [下载连接](http://www.hiwifimi.com/root/%E6%9E%81%E5%A3%B9s2446root.zip)
27 | 或者可以手动开启ssh,办法请参考[将固件中ssh开启][sshon] 28 | 29 | *如果您的学校是 PPPOE 拨号和 DrCOM 双重认证,请您先在路由器上设置相应的拨号配置* 30 | 31 | * 修改/etc/drcom.conf中的认证地址,用户名,密码,和在网络中心注册时填写的mac,注意mac按范例格式写 32 | 33 | ```python 34 | server = "192.168.100.150" # 这里填写认证服务器ip 35 | username = "" # 上网的用户名 36 | password = "" # 密码 37 | host_name = "LIYUANYUAN" # 改不改无所谓 38 | host_os = "8089D" # 改不改无所谓 39 | host_ip = "10.30.22.17" # 有关这个选项请参考wiki 40 | dhcp_server = "0.0.0.0" # 不用改 41 | mac = 0xb888e3051680 # 学校绑定的mac地址,注意按照左边的格式写,如果您的mac是121212121212,则写成0x121212121212 42 | ``` 43 | 44 | 45 | * 可用scp或者ftp的方式,覆盖本压缩包内所有的文件到 / (根目录) 46 | (windows用户安装winscp,选择scp方式,账号root密码为路由器密码) 47 | 48 | * 在ssh下执行下列命令(windows下可用putty连接) 49 | 1. opkg update 50 | 2. opkg install python-mini (注意安装的应该是python2.7.3以上的版本) 51 | 3. chmod +x /usr/bin/dog_drcom 52 | 53 | * 重启路由器 54 | 55 | *注意:* 由于替换了界面,会失去 app 按钮,您可以通过直接访问 http://app.hiwifi.com 或者通过手机端管理插件等。 56 | 57 | # 不改变界面下使用(for Openwrt users) 58 | 59 | **适用于不想改动界面的用户或者一切基于 Openwrt 路由的其他用户** 60 | 61 | *注意:* 本操作任需要有 *ssh* 权限。手工开启 *ssh* 可以参考[将固件中ssh开启][sshon] 62 | 63 | 复制以下文件(夹)到路由器上相同目录 64 | 65 | ``` 66 | /usr/bin 67 | /usr/lib/python2.7 68 | /etc/drcom.conf 69 | /etc/opkg.conf (适用于mt7620的源,极壹等ar71xx请不要复制,或者替换源http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages/) 70 | ``` 71 | 72 | * 在ssh下执行下列命令(windows下可用putty连接) 73 | 1. opkg update 74 | 2. opkg install python-mini (注意安装的应该是python2.7.3以上的版本) 75 | 3. chmod +x /usr/bin/dog_drcom 76 | 77 | */etc/rc.local* 文件请在 `exit 0;` 之前加入 dog_drcom& 78 | 79 | # 检查运行情况 80 | 81 | 无论是哪种方式安装的本脚本,如果重启后仍然无法上网,您可以通过以下步骤检查问题所在 82 | 83 | * 检查 dog_drcom 是否执行 84 | ssh 中执行 `ps | grep dog_drcom` ,看到如同 `3594 root 3248 S {dog_drcom} /bin/sh /usr/bin/dog_drcom` 说明 *dog_drcom* 正常运行,否则请您检查 `/usr/bin/dog_drcom` 是否有执行权限,或者重新执行 `chmod +x /usr/bin/dog_drcom` 85 | 86 | * 检查客户端脚本是否运行 87 | ssh 中执行 `ps | grep python` ,看到如同 ` 3596 root 9064 S python /usr/bin/wired.py` 说明 *客户端脚本* 正常运行 88 | 如无法运行脚本,请检查 *python-mini* 是否已正确安装,`opkg list-installed | grep python-mini`,看到如同 `python-mini - 2.7.3-2` 文字说明安装正确,请您手工执行 `python /usr/bin/wired.py` 将错误信息以各种方式发给我 (Issue和Email都没问题) 89 | 90 | * 检查 /etc/drcom.conf 是否配置正确,请参考上方配置说明。已知需要注意的地方见 [wiki链接][wiki]。 91 | 92 | 93 | 如果上述三项检查均通过,而仍然无法上网,请检查您学校的 *DrCOM* 通信版本号,如果为 u3x u2x 或者 0.7,您可以试试另外的一个项目 [jlu-drcom-client](http://github.com/ly0/jlu-drcom-client), 配置方法大同小异。 94 | 95 | 理论上如果通过了 *drcom-generic-debug-u62.py* , 但是路由器上不通过的情况一般是不存在的,但是如果真的发生了,恳请您将 `/usr/bin/wired.py` 中 `DEBUG = False` 改成 `DEBUG = True` 之后执行如下的命令。 96 | 97 | ``` 98 | killall dog_drcom 99 | kill -9 `ps | grep wired.py | grep python | awk '{print $1}'` 100 | python /usr/bin/wired.py 101 | ``` 102 | 103 | 在看到程序执行到稳定时(约20s发生一次变化),或者明显进入死循环时,请`Ctrl+C`结束程序,将 `/var/log/drcom_client.log` 通过 Issue 或者 Email 发给我,并附上您的上网账号密码以及网络环境(包括但不限于如是否固定ip,是否ip-mac绑定,是否需要运行客户端前pppoe拨号等等)。 104 | 105 | # 其他事项 106 | 107 | * 如果您的学校是 **u62-u64** 但是不能登陆的话,请将您的学校的[截包情况](#wireshark)发给我。 108 | * 有任何问题请在 Issue 里提出 109 | * 欢迎 pull 任何可以让代码更好看一些、容错性能更好些的代码,感激不尽。 110 | * 缺少登出等功能,因为作者比较懒…… 如果您可以提交确认可以用的代码,当然感激不尽。 111 | * 如果您肯花一些时间将其改写成 *C语言* 版本,请一定要通知我。 112 | 113 | 114 | 115 | # 关于截包 116 | 117 | * 下载 Wireshark 软件 118 | * 尽可能的退出和网络有关的应用程序 119 | * 用 Wireshark 开始截包 120 | * 打开官方客户端,登陆,等待1-2分钟 121 | * 停止截包,将封包保存,连同您的账号密码,ip信息,网络环境等发至[我的邮箱][mail] 122 | 123 | 我看到邮件后会找时间与您联系。 124 | 125 | # Tricks 126 | 127 | 可以在 `/etc/inittab` 中加入 `::respawn:/usr/bin/dog_drcom` 来防止 *dog_drcom* 挂掉。 128 | 129 | # 许可证 130 | 131 | GPLv2 132 | 133 | 特别指出禁止任何个人或者公司将 [drcoms](http://github.com/drcoms/) 的代码投入商业使用,由此造成的后果和法律责任均与本人无关。 134 | 135 | [sshon]: http://wenku.baidu.com/view/056fceb84693daef5ff73d15.html 136 | [wiki]: https://github.com/drcoms/HC5661-1s-patch/wiki/-etc-drcom.conf%E6%B3%A8%E6%84%8F%E4%BA%8B%E9%A1%B9 137 | [mail]: latyas@gmail.com 138 | [drcoms]: https://github.com/drcoms 139 | -------------------------------------------------------------------------------- /etc/drcom.conf: -------------------------------------------------------------------------------- 1 | server = "192.168.100.150" # Auth server ip 2 | username = "" 3 | password = "" 4 | host_name = "LIYUANYUAN" 5 | host_os = "8089D" 6 | host_ip = "10.30.22.17" # your ip 7 | dhcp_server = "0.0.0.0" 8 | mac = 0xb888e3051680 -------------------------------------------------------------------------------- /etc/opkg.conf: -------------------------------------------------------------------------------- 1 | src/gz barrier_breaker http://downloads.openwrt.org.cn/PandoraBox/ralink/mt7620/packages 2 | dest root / 3 | dest ram /tmp 4 | lists_dir ext /var/opkg-lists 5 | option overlay_root /overlay 6 | option ssl_ca_path /etc/ca 7 | -------------------------------------------------------------------------------- /etc/rc.local: -------------------------------------------------------------------------------- 1 | # Put your custom commands here that should be executed once 2 | # the system init finished. By default this file does nothing. 3 | dog_drcom & 4 | exit 0 5 | -------------------------------------------------------------------------------- /usr/bin/check_online.py: -------------------------------------------------------------------------------- 1 | import urllib2 2 | import sys 3 | 4 | try: 5 | # Test the accessibility of Internet by visiting baidu.com 6 | ret = urllib2.urlopen('http://baidu.com').read() 7 | if not 'http://www.baidu.com/' in ret: 8 | sys.exit(1) 9 | except: 10 | sys.exit(1) 11 | 12 | sys.exit(0) 13 | -------------------------------------------------------------------------------- /usr/bin/dog_drcom: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | while true 4 | do 5 | if [ -f /var/run/jludrcom.pid ] ; then 6 | JLUDRCOM=1 7 | PID=`cat /var/run/jludrcom.pid` 8 | RUNNING_STR=`grep python /proc/$PID/cmdline 2> /dev/null` 9 | if [ -n "$RUNNING_STR" ] ; then 10 | JLUDRCOM=0 11 | fi 12 | if [ $JLUDRCOM == 1 ]; then 13 | python /usr/bin/wired.py & > /dev/null 14 | fi 15 | sleep 10 16 | else 17 | python /usr/bin/wired.py & > /dev/null 18 | sleep 10 19 | fi 20 | done 21 | -------------------------------------------------------------------------------- /usr/bin/drcom_get_account.py: -------------------------------------------------------------------------------- 1 | execfile('/etc/drcom.conf',globals()) 2 | print username -------------------------------------------------------------------------------- /usr/lib/lua/luci/controller/admin_mobile/index.lua: -------------------------------------------------------------------------------- 1 | module("luci.controller.admin_mobile.index", package.seeall) 2 | function index() 3 | local root = node() 4 | if not root.target then 5 | root.target = alias("admin_mobile") 6 | root.index = true 7 | end 8 | local page = node("admin_mobile") 9 | page.target = firstchild() 10 | page.title = _("") 11 | page.order = 110 12 | page.sysauth = "admin" 13 | page.mediaurlbase = "/turbo-static/turbo/mobile" 14 | local superkey = (luci.http.getcookie("superkey")) 15 | if superkey ~= nil then 16 | page.sysauth_authenticator = "appauth" 17 | else 18 | page.sysauth_authenticator = "htmlauth_moblie" 19 | end 20 | page.index = true 21 | entry({"admin_mobile"}, template("admin_mobile/index"), _(""), 111) 22 | entry({"admin_mobile","info"}, template("admin_mobile/sysinfo"), _(""), 112) 23 | entry({"admin_mobile","wifi"}, template("admin_mobile/wifi/wifi_setup"), _(""), 113) 24 | entry({"admin_mobile","network"}, template("admin_mobile/network/net_setup"), _(""), 114) 25 | entry({"admin_mobile","clinet_bind"}, template("admin_mobile/system/clinet_bind"), _(""), 115) 26 | entry({"admin_mobile","net_detect_1"}, template("admin_mobile/system/net_detect_1"), _("网络监测手机版1.1"), 116,true) 27 | entry({"admin_mobile","backup"}, template("admin_mobile/system/backup"), _(""), 124) 28 | entry({"admin_mobile","guide_start"}, template("admin_mobile/system/guide_start"), _(""), 117,true) 29 | entry({"admin_mobile","guide_net"}, template("admin_mobile/system/guide_net"), _(""), 118) 30 | entry({"admin_mobile","guide_offline_pppoe"}, template("admin_mobile/system/guide_offline_pppoe"), _(""), 119) 31 | entry({"admin_mobile","guide_offline_static"}, template("admin_mobile/system/guide_offline_static"), _(""), 120) 32 | entry({"admin_mobile","guide_password"}, template("admin_mobile/system/guide_password"), _(""), 121) 33 | entry({"admin_mobile","guide_wifi"}, template("admin_mobile/system/guide_wifi"), _(""), 122) 34 | entry({"admin_mobile","guide_finish"}, template("admin_mobile/system/guide_finish"), _(""), 123) 35 | end 36 | function action_logout() 37 | local dsp = require "luci.dispatcher" 38 | local sauth = require "luci.sauth" 39 | if dsp.context.authsession then 40 | sauth.kill(dsp.context.authsession) 41 | dsp.context.urltoken.stok = nil 42 | end 43 | luci.http.header("Set-Cookie", "sysauth=; path=" .. dsp.build_url()) 44 | luci.http.redirect(luci.dispatcher.build_url()) 45 | end 46 | -------------------------------------------------------------------------------- /usr/lib/lua/luci/controller/admin_web/guide.lua: -------------------------------------------------------------------------------- 1 | module("luci.controller.admin_web.guide", package.seeall) 2 | function index() 3 | local page = node("admin_web","guide") 4 | page.target = firstchild() 5 | page.title = _("") 6 | page.order = 10 7 | page.sysauth = "admin" 8 | page.mediaurlbase = "/turbo-static/turbo/web" 9 | local superkey = (luci.http.getcookie("superkey")) 10 | if superkey ~= nil then 11 | page.sysauth_authenticator = "appauth" 12 | else 13 | page.sysauth_authenticator = "htmlauth_web" 14 | end 15 | page.index = true 16 | local guide_access_tag 17 | local HAVEBEENSET_V = luci.util.get_agreement("HAVEBEENSET") 18 | if HAVEBEENSET_V == 0 or HAVEBEENSET_V == "0" then 19 | guide_access_tag = true 20 | else 21 | guide_access_tag = false 22 | end 23 | entry({"admin_web", "guide"}, firstchild(), _("新版首次安装"), 200) 24 | entry({"admin_web", "guide", "index"}, template("admin_web/guide/index"), _("首页"), 200, guide_access_tag) 25 | entry({"admin_web", "guide", "agreement"}, template("admin_web/guide/agreement"), _("agreement"), 200, guide_access_tag) 26 | entry({"admin_web", "guide", "internet_check"}, template("admin_web/guide/internet_check"), _("检查上网方式"), 200) 27 | entry({"admin_web", "guide", "dhcp"}, template("admin_web/guide/internet_DHCP"), _("dhcp"), 200, guide_access_tag) 28 | entry({"admin_web", "guide", "pppoe"}, template("admin_web/guide/internet_PPPoE"), _("pppoe"), 200, guide_access_tag) 29 | entry({"admin_web", "guide", "pppoe_find"}, template("admin_web/guide/find1"), _("pppoe find"), 200, guide_access_tag) 30 | entry({"admin_web", "guide", "wisp"}, template("admin_web/guide/internet_relay"), _("wisp"), 200, guide_access_tag) 31 | entry({"admin_web", "guide", "static"}, template("admin_web/guide/internet_static"), _("static"), 200, guide_access_tag) 32 | entry({"admin_web", "guide", "unlink"}, template("admin_web/guide/insert"), _("static"), 200, guide_access_tag) 33 | entry({"admin_web", "guide", "ssid"}, template("admin_web/guide/ssid"), _("ssid"), 200, guide_access_tag) 34 | entry({"admin_web", "guide", "admin"}, template("admin_web/guide/admin"), _("admin"), 200, guide_access_tag) 35 | entry({"admin_web", "guide", "internet_success"}, template("admin_web/guide/internet_success"), _("internet_success"), 200, guide_access_tag) 36 | entry({"admin_web", "guide", "contact"}, template("admin_web/guide/contact"), _("contact"), 200, guide_access_tag) 37 | entry({"admin_web", "guide", "guide_online"}, template("admin_web/guide/guide_online"), _("guide_online"), 200, guide_access_tag) 38 | entry({"admin_web", "guide", "setsafe"}, template("admin_web/guide/setsafe"), _("setsafe"), 200, guide_access_tag) 39 | entry({"admin_web", "guide", "open_app"}, template("admin_web/guide/open_app"), _("open_app"), 200, guide_access_tag) 40 | end 41 | -------------------------------------------------------------------------------- /usr/lib/lua/luci/controller/admin_web/index.lua: -------------------------------------------------------------------------------- 1 | module("luci.controller.admin_web.index", package.seeall) 2 | function index() 3 | local root = node() 4 | if not root.target then 5 | root.target = alias("admin_web") 6 | root.index = true 7 | end 8 | local page = node("admin_web") 9 | page.target = firstchild() 10 | page.title = _("") 11 | page.order = 10 12 | page.sysauth = "admin" 13 | page.mediaurlbase = "/turbo-static/turbo/web" 14 | local superkey = (luci.http.getcookie("superkey")) 15 | if superkey ~= nil then 16 | page.sysauth_authenticator = "appauth" 17 | else 18 | page.sysauth_authenticator = "htmlauth_web" 19 | end 20 | page.index = true 21 | local guide_access_tag 22 | local HAVEBEENSET_V = luci.util.get_agreement("HAVEBEENSET") 23 | if HAVEBEENSET_V == 0 or HAVEBEENSET_V == "0" then 24 | guide_access_tag = true 25 | else 26 | guide_access_tag = false 27 | end 28 | entry({"admin_web"}, template("admin_web/home"), _("运行状态"), 10) 29 | entry({"admin_web", "home"}, template("admin_web/home"), _("运行状态"), 10) 30 | entry({"admin_web", "logout"}, call("action_logout"), 11, true) 31 | entry({"admin_web", "info"}, template("admin_web/sysinfo"), _("运行状态"), 13) 32 | entry({"admin_web", "network"}, template("admin_web/network/net_setup"), _("网络设置"), 20) 33 | entry({"admin_web", "network","setup"}, template("admin_web/network/net_setup"), _("网络设置"), 20) 34 | entry({"admin_web", "network","setup","autowantype"}, template("admin_web/network/net_setup_autowantype"), _("网络设置"), 20) 35 | entry({"admin_web", "network","setup","lan"}, template("admin_web/network/net_setup_lan"), _("网络设置"), 30) 36 | entry({"admin_web", "network", "setup","lan_proc"}, call("lan_proc"), nil) 37 | entry({"admin_web", "network", "setup","dhcp"}, template("admin_web/network/net_setup_dhcp"), _("DHCP 服务器"), 40) 38 | entry({"admin_web", "network", "setup","mtu"}, template("admin_web/network/net_setup_mtu"), _("mtu 设置"), 40) 39 | entry({"admin_web", "network", "setup","mac"}, template("admin_web/network/net_setup_mac"), _("mac 设置"), 40) 40 | entry({"admin_web", "network", "setup","ppp_adv"}, template("admin_web/network/ppp_adv_setup"), "PPP 高级设置", 40) 41 | entry({"admin_web", "network","devices_list"}, template("admin_web/network/devices_list"), _("链接设备列表"), 200) 42 | entry({"admin_web", "network","upnp"}, template("admin_web/network/upnp"), _("upnp 状态"), 200) 43 | entry({"admin_web", "network","l2tp"}, template("admin_web/network/l2tp"), _("l2tp 状态"), 210) 44 | entry({"admin_web", "passport"}, template("admin_web/passport/bind"), _("个人中心"), 30) 45 | entry({"admin_web", "passport", "bind"}, template("admin_web/passport/bind"), _("个人中心"), 30) 46 | entry({"admin_web", "passport", "bind", "callback"}, template("admin_web/passport/bind"), _("绑定路由器回调"), 97) 47 | entry({"admin_web", "passport", "apps"}, template("admin_web/passport/apps"), _("精彩应用"), 30) 48 | entry({"admin_web", "system"}, firstchild(), _("系统管理"), 190) 49 | entry({"admin_web", "system", "guide1"}, template("admin_web/system/guide1"), _("引导模式1"), 191, guide_access_tag) 50 | entry({"admin_web", "system", "guide2"}, template("admin_web/system/guide2"), _("引导模式2"), 192, guide_access_tag) 51 | entry({"admin_web", "system", "guide3"}, template("admin_web/system/guide3"), _("引导模式3"), 193, guide_access_tag) 52 | entry({"admin_web", "system", "guide_online"}, template("admin_web/system/guide_online"), _("引导模式_上网"), 193, true) 53 | entry({"admin_web", "system"}, template("admin_web/system/setup"), _("系统管理"), 198) 54 | entry({"admin_web", "system","setup"}, template("admin_web/system/setup"), _("系统管理"), 198) 55 | entry({"admin_web", "system","systime"}, template("admin_web/system/systime"), _("系统时间"), 199) 56 | entry({"admin_web", "system","upgrade"}, template("admin_web/system/upgrade"), _("路由器固件升级"), 198,true) 57 | entry({"admin_web", "system","upgrade_user"}, template("admin_web/system/upgrade_user"), _("路由器固件升级"), 198,true) --不需要登录 58 | entry({"admin_web", "system","backNrestore"}, template("admin_web/system/backNrestore"), _("备份/载入配置"), 198) 59 | entry({"admin_web", "system","reboot_reset"}, template("admin_web/system/reboot_reset"), _("重启/恢复出厂设置"), 198) 60 | entry({"admin_web", "system","agreement"}, template("admin_web/system/agreement"), _("用户协议"), 198,true) --不需要登录 61 | entry({"admin_web", "system","net_detect"}, template("admin_web/system/net_detect"), _("网络监测"), 192,true).leaf = true 62 | entry({"admin_web", "system","net_detect_1"}, template("admin_web/system/net_detect_1"), _("网络监测1.1"), 199,true).leaf = true 63 | entry({"admin_web", "system","disk"}, template("admin_web/system/disk"), _("存储诊断"), 192,true).leaf = true 64 | entry({"admin_web", "system","phone_app_open"}, template("admin_web/system/phone_app_open"), _("引导安装或打开 APP"), 199,true).leaf = true 65 | entry({"admin_web", "wifi"}, firstchild(), _("无线设置"), 50) 66 | entry({"admin_web", "wifi", "setup"}, template("admin_web/wifi/wifi_setup"), _("无线设置"), 30) 67 | entry({"admin_web", "wifi", "setup","channel"}, template("admin_web/wifi/wifi_setup_channel"), _("无线频道/信号强度"), 60) 68 | entry({"admin_web", "wifi","devices_list"}, template("admin_web/wifi/wifi_devices_list"), _("wifi链接设备列表"), 60) 69 | entry({"admin_web", "wifi", "setup","mac_filter"}, template("admin_web/wifi/wifi_mac_filter"), _("网络设置"),30) 70 | entry({"admin_web", "plugin"}, firstchild(), _("插件"), 50) 71 | entry({"admin_web", "plugin", "mentohust"}, template("admin_web/plugin/mentohust"), _("锐捷认证"), 30) 72 | entry({"admin_web", "plugin", "x3c"}, template("admin_web/plugin/x3c"), _("华3认证"), 30) 73 | entry({"admin_web", "plugin", "logs"}, template("admin_web/plugin/logs"), _("logs"), 30) 74 | end 75 | function action_logout() 76 | local dsp = require "luci.dispatcher" 77 | local sauth = require "luci.sauth" 78 | if dsp.context.authsession then 79 | sauth.kill(dsp.context.authsession) 80 | dsp.context.urltoken.stok = nil 81 | end 82 | luci.http.header("Set-Cookie", "sysauth=; path=" .. dsp.build_url()) 83 | luci.http.redirect(luci.dispatcher.build_url()) 84 | end 85 | function lan_proc() 86 | local lan_ipReq = luci.http.formvalue("lan_ip") 87 | local lan_maskReq = luci.http.formvalue("lan_mask") 88 | local old_lan_ipReq = luci.http.formvalue("old_lan_ip") 89 | local old_lan_maskReq= luci.http.formvalue("old_lan_mask") 90 | local netmd = require "luci.model.network".init() 91 | local iface = "lan" 92 | local net = netmd:get_network(iface) 93 | net:set("ipaddr",lan_ipReq) 94 | net:set("netmask",lan_maskReq) 95 | netmd:commit("network") 96 | netmd:save("network") 97 | luci.http.prepare_content("application/json") 98 | luci.http.write_json("[{lan_ip:'" .. lan_ipReq .. "',lan_mask:'" .. lan_maskReq .. "'}]") 99 | luci.sys.call("env -i /sbin/reboot & >/dev/null 2>/dev/null") 100 | end 101 | -------------------------------------------------------------------------------- /usr/lib/lua/luci/controller/admin_web/traffic.lua: -------------------------------------------------------------------------------- 1 | module("luci.controller.admin_web.traffic", package.seeall) 2 | function index() 3 | local page = node("admin_web","traffic") 4 | page.target = firstchild() 5 | page.title = _("") 6 | page.order = 10 7 | page.sysauth = "admin" 8 | page.mediaurlbase = "/turbo-static/turbo/web" 9 | page.sysauth_authenticator = "htmlauth_web" 10 | page.index = true 11 | entry({"admin_web", "traffic", "index"}, template("admin_web/trafficinfo"), _(""), 120) 12 | entry({"admin_web", "traffic", "update"}, call("get_traffic"), _(""), 120,true) 13 | end 14 | function get_traffic() 15 | local http = require "luci.http" 16 | local uci = require "luci.model.uci" 17 | local fs = require "nixio.fs" 18 | local wlanif = luci.util.fliter_unsafe(luci.http.formvalue("wlanif")) 19 | local wanif = luci.util.fliter_unsafe(luci.http.formvalue("wanif")) 20 | local vpnif = luci.util.fliter_unsafe(luci.http.formvalue("vpnif")) 21 | local lanif = luci.util.fliter_unsafe(luci.http.formvalue("lanif")) 22 | local wanul, wandl, lanul, landl 23 | local waninfo,laninfo,wlaninfo,vpninfo 24 | local devstats = fs.readfile("/proc/net/dev") 25 | if lanif then 26 | local tmp = lanif:gsub("%-", "%%-") 27 | local rx, tx = devstats:match("%s*"..tmp.. 28 | ":%s*([0-9]+)%s+[0-9]+%s+[0-9]+%s+[0-9]+%s+".. 29 | "[0-9]+%s+[0-9]+%s+[0-9]+%s+[0-9]+%s+([0-9]+)") 30 | lanul = tx and (tonumber(tx) ) 31 | landl = rx and (tonumber(rx) ) 32 | if lanul==nil then lanul = 0 end 33 | if landl==nil then landl = 0 end 34 | laninfo = "'" .. lanif .. "':{'rx':".. lanul ..",'tx':" .. landl .. "}" 35 | end 36 | if wanif then 37 | local tmp = wanif:gsub("%-", "%%-") 38 | local rx, tx = devstats:match("%s*"..tmp.. 39 | ":%s*([0-9]+)%s+[0-9]+%s+[0-9]+%s+[0-9]+%s+".. 40 | "[0-9]+%s+[0-9]+%s+[0-9]+%s+[0-9]+%s+([0-9]+)") 41 | wanul = tx and tonumber(tx) --/ 1000000000 42 | wandl = rx and tonumber(rx) --/ 1000000000 43 | if wanul==nil then wanul = 0 end 44 | if wandl==nil then wandl = 0 end 45 | waninfo = "'" .. wanif .. "':{'rx':".. wandl ..",'tx':" .. wanul .. "}" 46 | end 47 | if vpnif then 48 | local rx, tx = devstats:match("%s*" .. vpnif .. 49 | ":%s*([0-9]+)%s+[0-9]+%s+[0-9]+%s+[0-9]+%s+".. 50 | "[0-9]+%s+[0-9]+%s+[0-9]+%s+[0-9]+%s+([0-9]+)") 51 | wanul = tx and tonumber(tx) 52 | wandl = rx and tonumber(rx) -- / 1000000000 53 | if wanul==nil then wanul = 0 end 54 | if wandl==nil then wandl = 0 end 55 | if wandl>0 or wanul>0 then 56 | vpninfo = "'" .. vpnif .. "':{'rx':".. wandl ..",'tx':" .. wanul .. "}" 57 | end 58 | end 59 | if wlanif then 60 | local rx, tx = devstats:match("%s*" .. wlanif .. 61 | ":%s*([0-9]+)%s+[0-9]+%s+[0-9]+%s+[0-9]+%s+".. 62 | "[0-9]+%s+[0-9]+%s+[0-9]+%s+[0-9]+%s+([0-9]+)") 63 | wanul = tx and tonumber(tx) 64 | wandl = rx and tonumber(rx) -- / 1000000000 65 | if wanul==nil then wanul = 0 end 66 | if wandl==nil then wandl = 0 end 67 | if wandl>0 or wanul>0 then 68 | wlaninfo = "'" .. wlanif .. "':{'rx':".. wanul ..",'tx':" .. wandl .. "}" 69 | end 70 | end 71 | local arr_out_put={} 72 | local netdev = "netdev={" 73 | local temp = "" 74 | if laninfo then 75 | temp = temp .. "," .. laninfo 76 | end 77 | if waninfo then 78 | temp = temp .. "," .. waninfo 79 | end 80 | if vpninfo then 81 | temp = temp .. "," .. vpninfo 82 | end 83 | if wlaninfo then 84 | temp = temp .. "," .. wlaninfo 85 | end 86 | if temp~="" and string.sub(temp,1,1)=="," then 87 | netdev = netdev .. string.sub(temp,2) 88 | end 89 | netdev = netdev .. "}" 90 | luci.http.prepare_content("application/json") 91 | http.write(netdev) 92 | end 93 | -------------------------------------------------------------------------------- /usr/lib/lua/luci/controller/api/exam.lua: -------------------------------------------------------------------------------- 1 | module("luci.controller.api.exam", package.seeall) 2 | function index() 3 | local page = node("api","exam") 4 | page.target = firstchild() 5 | page.title = _("") 6 | page.order = 180 7 | page.sysauth = "admin" 8 | page.sysauth_authenticator = "jsonauth" 9 | page.index = true 10 | entry({"api", "exam"}, firstchild(), _(""), 180) 11 | entry({"api", "exam", "do_exam"}, call("do_exam"), _(""), 181) 12 | entry({"api", "exam", "do_st"}, call("do_st"), _(""), 182) 13 | entry({"api", "exam", "do_exam_optimize"}, call("do_exam_optimize"), _(""), 182) 14 | end 15 | local mobile_base = require("hiwifi.mobileapp.base") 16 | function do_exam() 17 | local http = require "luci.http" 18 | local codeResp = 0 19 | local msgResp = "" 20 | local actidResp 21 | local exam_item_listResp 22 | local item_idResp 23 | local infoResp 24 | local weightResp 25 | local arr_out_put={} 26 | local mobile_base = require("hiwifi.mobileapp.base") 27 | local json = require("luci.tools.json") 28 | local exam=require("hiwifi.mobileapp.exam"); 29 | local result,code=exam.do_exam() 30 | if (codeResp == 0) then 31 | arr_out_put = result; 32 | else 33 | msgResp = luci.util.get_api_error(codeResp) 34 | end 35 | arr_out_put["code"] = codeResp 36 | arr_out_put["msg"] = msgResp 37 | http.write_json(arr_out_put) 38 | luci.http.close() 39 | luci.util.set_exam_act_cache(result) 40 | luci.util.delay_exec_exam_act(0) 41 | end 42 | function do_st() 43 | local http = require "luci.http" 44 | local codeResp = 0 45 | local msgResp = "" 46 | local actidResp 47 | local arr_out_put={} 48 | local st=require("hiwifi.mobileapp.st"); 49 | actid_lastResp = luci.http.formvalue("actid_last") 50 | local actidResp,code=st.do_st(actid_lastResp) 51 | if (codeResp == 0) then 52 | arr_out_put["actid"] = actidResp 53 | else 54 | msgResp = luci.util.get_api_error(codeResp) 55 | end 56 | arr_out_put["code"] = codeResp 57 | arr_out_put["msg"] = msgResp 58 | http.write_json(arr_out_put) 59 | http.close() 60 | end 61 | function do_exam_optimize() 62 | local http = require "luci.http" 63 | local codeResp = 0 64 | local msgResp = "" 65 | local item_idResp 66 | local actidResp 67 | local arr_out_put={} 68 | local score_after_optimize=0 69 | local remark_after_optimize="正常" 70 | local status=0 71 | local mobile_base = require("hiwifi.mobileapp.base") 72 | local json = require("luci.tools.json") 73 | local optimize_data 74 | local delay_time_min = luci.http.formvalue("delay_time_min") 75 | item_idResp = tonumber(luci.http.formvalue("item_id")) 76 | actidResp = luci.http.formvalue("actid") 77 | if actidResp ~= nil and item_idResp ~=nil then 78 | local result_json = mobile_base.mobile_app_curl("Exam/doOptimize", 79 | { 80 | actid=actidResp, 81 | item_id=item_idResp, 82 | delay_time_min=delay_time_min 83 | }) 84 | local result_data = json.Decode(result_json) 85 | score_after_optimize = result_data['score_after_optimize'] 86 | remark_after_optimize = result_data['remark_after_optimize'] 87 | optimize_data = result_data['optimize_data'] 88 | if item_idResp == 102 then -- DNS 状态 89 | elseif item_idResp == 103 then -- 固件版本 90 | status=-1 91 | remark_after_optimize = "有更新" 92 | if delay_time_min then 93 | if tonumber(delay_time_min) == 5 then 94 | score_after_optimize = 10 95 | luci.util.delay_exec_update(300) 96 | status=1 97 | remark_after_optimize = "更新中" 98 | elseif tonumber(delay_time_min) == 0 then 99 | luci.util.delay_exec_update(0) 100 | score_after_optimize = 10 101 | status=1 102 | remark_after_optimize = "更新中" 103 | end 104 | end 105 | elseif item_idResp == 201 then -- WiFi 信道拥挤度 106 | if optimize_data then 107 | if optimize_data['channel'] then 108 | local netmd = require "luci.model.network".init() 109 | local wifidevice = netmd:get_wifidev("radio0") 110 | local net = require "hiwifi.net" 111 | if wifidevice then 112 | if tonumber(optimize_data['channel'])>=0 and tonumber(optimize_data['channel'])<=13 then 113 | wifidevice:set("channel",optimize_data['channel']); 114 | netmd:commit("wireless") 115 | netmd:save("wireless") 116 | local net = require "hiwifi.net" 117 | if not net.get_wifi_bridge() then --桥接状态下 ifup wan 包含 wifi 命令 118 | luci.util.delay_exec_wifi(5) 119 | else 120 | luci.util.delay_exec_ifwanup(5) 121 | end 122 | remark_after_optimize = "" 123 | status=1 124 | end 125 | end 126 | end 127 | end 128 | elseif item_idResp == 203 then -- wifi 信号强度 129 | if optimize_data then 130 | if optimize_data['pwr'] then 131 | local netmd = require "luci.model.network".init() 132 | local wifidevice = netmd:get_wifidev("radio0") 133 | local net = require "hiwifi.net" 134 | if wifidevice then 135 | wifidevice:set("txpwr",optimize_data['pwr']); 136 | netmd:commit("wireless") 137 | netmd:save("wireless") 138 | local net = require "hiwifi.net" 139 | if not net.get_wifi_bridge() then --桥接状态下 ifup wan 包含 wifi 命令 140 | luci.util.delay_exec_wifi(5) 141 | else 142 | luci.util.delay_exec_ifwanup(5) 143 | end 144 | score_after_optimize = 10 145 | remark_after_optimize = "强" 146 | status=1 147 | end 148 | end 149 | end 150 | end 151 | end 152 | if (codeResp == 0) then 153 | else 154 | msgResp = luci.util.get_api_error(codeResp) 155 | end 156 | arr_out_put["score_after_optimize"] = score_after_optimize 157 | arr_out_put["remark_after_optimize"] = remark_after_optimize 158 | arr_out_put["status"] = status 159 | arr_out_put["code"] = codeResp 160 | arr_out_put["msg"] = msgResp 161 | http.write_json(arr_out_put) 162 | end 163 | -------------------------------------------------------------------------------- /usr/lib/lua/luci/controller/api/index.lua: -------------------------------------------------------------------------------- 1 | module("luci.controller.api.index", package.seeall) 2 | function index() 3 | local page = node("api") 4 | page.target = firstchild() 5 | page.title = _("") 6 | page.order = 10 7 | page.sysauth = "admin" 8 | page.sysauth_authenticator = "jsonauth" 9 | page.index = true 10 | local var_remote_addr = (luci.http.getenv('REMOTE_ADDR')) 11 | local noauthall 12 | if var_remote_addr == "127.0.0.1" then 13 | noauthall = true 14 | else 15 | noauthall = false 16 | end 17 | entry({"api"}, firstchild(), _(""), 100,noauthall) 18 | entry({"api","index"}, call("api_error"), _(""), 91) 19 | end 20 | function api_error() 21 | local arr_out_put = {} 22 | local codeResp 23 | local msgResp 24 | codeResp = 80 25 | msgResp = luci.util.get_api_error(codeResp) 26 | arr_out_put["code"] = codeResp 27 | arr_out_put["msg"] = msgResp 28 | luci.http.write_json(arr_out_put,true) 29 | end 30 | -------------------------------------------------------------------------------- /usr/lib/lua/luci/controller/api/turbo.lua: -------------------------------------------------------------------------------- 1 | module("luci.controller.api.turbo", package.seeall) 2 | function index() 3 | local page = node("api","turbo") 4 | page.target = firstchild() 5 | page.title = _("") 6 | page.order = 160 7 | page.sysauth = "admin" 8 | page.sysauth_authenticator = "jsonauth" 9 | page.index = true 10 | entry({"api", "turbo"}, firstchild(), _(""), 160) 11 | entry({"api", "turbo", "get_yicitong_status"}, call("get_yicitong_status"), _(""), 161) 12 | entry({"api", "turbo", "set_yicitong_status"}, call("set_yicitong_status"), _(""), 162) 13 | entry({"api", "turbo", "get_apple_accelerate_status"}, call("get_apple_accelerate_status"), _(""), 163) 14 | entry({"api", "turbo", "set_apple_accelerate_status"}, call("set_apple_accelerate_status"), _(""), 164) 15 | end 16 | function get_yicitong_status() 17 | local http = require "luci.http" 18 | local statusResp 19 | local codeResp = 0 20 | local msgResp = "" 21 | local arr_out_put={} 22 | if luci.sys.process.runing("nginx")==0 then 23 | statusResp = 1 -- 运行 24 | else 25 | statusResp = 0 -- 停止 26 | end 27 | if (codeResp == 0) then 28 | arr_out_put["status"] = statusResp 29 | else 30 | msgResp = luci.util.get_api_error(codeResp) 31 | end 32 | arr_out_put["code"] = codeResp 33 | arr_out_put["msg"] = msgResp 34 | http.write_json(arr_out_put,true) 35 | end 36 | function set_yicitong_status() 37 | local http = require "luci.http" 38 | local statusReq = luci.http.formvalue("status") 39 | local codeResp = 0 40 | local msgResp = "" 41 | local arr_out_put={} 42 | if statusReq == "1" then 43 | os.execute("/etc/init.d/nginx start >/dev/null") 44 | os.execute("/etc/init.d/haproxy start >/dev/null") 45 | elseif statusReq == "0" then 46 | os.execute("/etc/init.d/nginx stop >/dev/null") 47 | elseif statusReq == "2" then 48 | os.execute("/etc/init.d/nginx restart >/dev/null") 49 | else 50 | codeResp = 1000 51 | end 52 | if (codeResp == 0) then 53 | else 54 | msgResp = luci.util.get_api_error(codeResp) 55 | end 56 | arr_out_put["code"] = codeResp 57 | arr_out_put["msg"] = msgResp 58 | http.write_json(arr_out_put,true) 59 | end 60 | function get_apple_accelerate_status() 61 | local http = require "luci.http" 62 | local statusResp 63 | local codeResp = 0 64 | local msgResp = "" 65 | local arr_out_put={} 66 | if luci.sys.process.runing("nginx")==0 and luci.sys.isapplecdn()==0 then 67 | statusResp = 1 -- 运行 68 | else 69 | if luci.sys.process.runing("nginx")==0 then 70 | statusResp = 0 --停止 71 | else 72 | codeResp = 510 -- App Store下载加速需要一词通同时启动 73 | end 74 | end 75 | if (codeResp == 0) then 76 | arr_out_put["status"] = statusResp 77 | else 78 | msgResp = luci.util.get_api_error(codeResp) 79 | end 80 | arr_out_put["code"] = codeResp 81 | arr_out_put["msg"] = msgResp 82 | http.write_json(arr_out_put,true) 83 | end 84 | function set_apple_accelerate_status() 85 | local http = require "luci.http" 86 | local statusReq = luci.http.formvalue("status") 87 | local codeResp = 0 88 | local msgResp = "" 89 | local arr_out_put={} 90 | if statusReq == "1" then 91 | os.execute("cp /etc/nginx/vh.phobos_apple_com.conf.default /etc/nginx/vh.phobos_apple_com.conf") 92 | os.execute("/usr/sbin/nginx -s reload >/dev/null") 93 | elseif statusReq == "0" then 94 | os.execute("rm -f /etc/nginx/vh.phobos_apple_com.conf") 95 | os.execute("/usr/sbin/nginx -s reload >/dev/null") 96 | else 97 | codeResp = 1000 98 | end 99 | if (codeResp == 0) then 100 | else 101 | msgResp = luci.util.get_api_error(codeResp) 102 | end 103 | arr_out_put["code"] = codeResp 104 | arr_out_put["msg"] = msgResp 105 | http.write_json(arr_out_put,true) 106 | end 107 | -------------------------------------------------------------------------------- /usr/lib/lua/luci/view/admin_mobile/footer.htm: -------------------------------------------------------------------------------- 1 | <% include("themes/" .. theme .. "/footer") %> -------------------------------------------------------------------------------- /usr/lib/lua/luci/view/admin_mobile/header.htm: -------------------------------------------------------------------------------- 1 | <% 2 | if not luci.dispatcher.context.template_header_sent then 3 | include("themes/" .. theme .. "/header") 4 | luci.dispatcher.context.template_header_sent = true 5 | end 6 | %> 7 | -------------------------------------------------------------------------------- /usr/lib/lua/luci/view/admin_mobile/sysauth.htm: -------------------------------------------------------------------------------- 1 | <% 2 | local urlbackReq = luci.util.fliter_unsafe(luci.http.formvalue("urlback")) 3 | if urlbackReq == nil or urlbackReq=="" then 4 | urlbackReq = luci.http.getenv("HTTP_REFERER") 5 | end 6 | local clinet_bind = luci.http.formvalue("clinet_bind") 7 | local guide_mode = luci.http.formvalue("guide_mode") 8 | local auto_login = luci.http.formvalue("auto_login") 9 | 10 | --是否弹出协议 11 | local agreementfile = "/etc/agreement" 12 | local rv = { } 13 | local nfs = require "nixio.fs" 14 | local io = require "io" 15 | local fd = io.open(agreementfile, "r") 16 | local agree_status 17 | 18 | if fd then 19 | while true do 20 | local ln = fd:read("*l") 21 | if not ln then 22 | break 23 | else 24 | local name,status = ln:match("^(%S+):(%S+)") 25 | if name and status then 26 | if name == "ACCEPTED" then 27 | agree_status = status 28 | break 29 | end 30 | end 31 | end 32 | end 33 | fd:close() 34 | end 35 | 36 | if agree_status == "0" then 37 | luci.http.redirect(luci.dispatcher.build_url("admin_web", "system","agreement").."?from=back") 38 | end 39 | 40 | math.randomseed(os.time()) 41 | local random = math.random() 42 | 43 | local loginfail = false 44 | if fuser then 45 | -- lock 数+1 46 | luci.util.up_loginlock() 47 | loginfail = true 48 | end 49 | 50 | --是否显示初始 密码 51 | local showpasswordfile = "/etc/app/showpassword_cache" 52 | local fd = io.open(showpasswordfile, "r") 53 | local showpassword_ln = fd:read("*l") 54 | 55 | local is_defult_password = luci.sys.user.checkpasswd("root", "admin") 56 | 57 | %> 58 | <% 59 | if (clinet_bind == "1" or clinet_bind == 1) and is_defult_password then 60 | %> 61 | 66 | 69 | <% 70 | luci.http.close(); 71 | end 72 | %> 73 | <%+header%> 74 | 85 | 91 |
<%if clinet_bind == "1" or clinet_bind == 1 then%>?clinet_bind=1<%end%><%if guide_mode == "1" then%>?guide_mode=1<%if auto_login == "1" then%>&auto_login=1<%end%><%end%>" onsubmit="return check_form(this)"> 92 | <% if not luci.util.is_loginlock() then %> 93 | 94 |
95 |
96 | 97 | value="<%=luci.version.default_password%>"<% end %> name="password" id="input_password_login" /> 98 |
99 |
100 | <%- if loginfail then %> 101 |
102 |
103 |
104 | 密码错误!请重试 105 | <% if tonumber(luci.util.get_loginlock()) > 0 then 106 | local resttime = 10 - luci.util.get_loginlock() 107 | %> 108 | 已经错误 <%=luci.util.get_loginlock()%> 次 , 还可以尝试 <%=resttime%> 次 109 | <% end %> 110 |
111 | 112 |
113 | <% end -%> 114 | <% if showpassword_ln ~= '0' then %> 115 |
初始密码为 admin,登录后点击右上 "修改密码",修改后会使路由器更安全
116 | <% else %> 117 | <%if is_defult_password then %> 118 |
密码是admin不安全,登录后点击右上"修改密码"

119 | <%end%> 120 | <% end %> 121 | 122 | 123 | <%if clinet_bind == "1" or clinet_bind == 1 then%> 124 |

(登录后将自动绑定)
125 | 当前路由器 - MAC <%luci.http.write(tw.get_mac())%>
126 | <%end%> 127 | <% else %> 128 | <% if tonumber(luci.util.get_loginlock()) > 0 then %> 129 |
130 | 密码输入错误次数过多,请拔出电源,5秒后接通。重启路由 131 |
132 | <% end %> 133 | <% end %> 134 |
135 | 153 | <%if clinet_bind == "1" or clinet_bind == 1 then luci.http.close() end%> 154 | <%+footer%> 155 | -------------------------------------------------------------------------------- /usr/lib/lua/luci/view/admin_mobile/system/backup.htm: -------------------------------------------------------------------------------- 1 | <% 2 | local ver = require "luci.version" 3 | local util = require "luci.util" 4 | local http = require "luci.http" 5 | math.randomseed(os.time()) 6 | local random = math.random() 7 | %> 8 | <%+header%> 9 |
10 |
11 | 可备份或还原设备名称、限速设备、可疑设备及信任设备 12 |
13 |
14 |

15 | 16 |

17 |

18 | 19 |

20 |
21 | 22 | 69 | <%+footer%> -------------------------------------------------------------------------------- /usr/lib/lua/luci/view/admin_mobile/system/clinet_bind.htm: -------------------------------------------------------------------------------- 1 | <% 2 | --[[ 3 | Info 手机自动绑定 4 | Author Wangchao 5 | Copyright 2012 6 | ]]-- 7 | 8 | local ver = require "luci.version" 9 | local redirect = luci.http.formvalue("redirect") 10 | local code = luci.http.formvalue("code") 11 | local msg = luci.http.formvalue("msg") 12 | local parm_other = "" 13 | if redirect == 1 or redirect == "1" then 14 | local protocol = require "luci.http.protocol" 15 | local urlencode = protocol.urlencode 16 | msg = urlencode(msg) 17 | if tonumber(code) == 0 then 18 | local tw = require "tw" 19 | parm_other = "&mac="..tw.get_mac() 20 | end 21 | luci.http.redirect("app://callback?action=client_bind&code="..code.."&msg="..msg..parm_other) 22 | end 23 | -%> 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | HiWiFi 路由器 32 | 33 | 34 | 35 | 36 | 37 | 38 | 43 |
44 |
45 | 46 |


47 | 48 | 自动绑定中


49 |
50 | 操作中... 51 |

52 |
53 |
54 | 55 | 90 | 91 | -------------------------------------------------------------------------------- /usr/lib/lua/luci/view/admin_mobile/system/guide_finish.htm: -------------------------------------------------------------------------------- 1 | <% 2 | local ver = require "luci.version" 3 | local protocol = require "luci.http.protocol" 4 | 5 | local ssid_req = protocol.urldecode(luci.http.formvalue("ssid")) 6 | local net_type = protocol.urldecode(luci.http.formvalue("net_type")) 7 | 8 | if ssid_req == nil or ssid_req == "" then 9 | _,_,_,ssid_req = luci.util.get_wifi_device_status() 10 | end 11 | 12 | local tw = require "tw" 13 | local http = require "luci.http" 14 | 15 | %> 16 | 17 | 18 | 19 | 20 | 21 | 22 | 欢迎使用 hiwifi 23 | 24 | 25 |
26 | 29 | 30 |
31 |

您的无线网络名称为 <%=ssid_req%>

32 |

如果断开请重新连接

33 |
34 | 立即上网 35 |
36 | 37 | 40 |
41 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /usr/lib/lua/luci/view/admin_mobile/system/guide_password.htm: -------------------------------------------------------------------------------- 1 | <% 2 | local ver = require "luci.version" 3 | local http = require "luci.http" 4 | local is_defult_password = luci.sys.user.checkpasswd("root", "admin") 5 | if not is_defult_password then 6 | luci.http.redirect(luci.dispatcher.build_url("admin_mobile","guide_wifi")) 7 | end 8 | 9 | %> 10 | 11 | 12 | 13 | 14 | 15 | 欢迎使用极路由 16 | 17 | 18 | 19 |
20 | 24 | 25 |
26 | <%if is_defult_password then %> 27 |
28 | 您的极路由后台初始密码为“admin”,存在安全隐患,请设置新密码。 29 |
30 | <%end%> 31 |
32 | 33 |
34 | 35 |
36 |
37 | 38 |
39 |

40 | 41 |
42 | 43 |
44 | 45 | 48 |
49 | 50 | 106 | 107 | 108 | -------------------------------------------------------------------------------- /usr/lib/lua/luci/view/admin_mobile/system/guide_start.htm: -------------------------------------------------------------------------------- 1 | <% 2 | local url = luci.util.fliter_unsafe(luci.http.urlencode(luci.http.formvalue("url"))) 3 | local accept = luci.http.formvalue("accept") 4 | local agreementfile = "/etc/agreement" 5 | local ver = require "luci.version" 6 | local util = require "luci.util" 7 | local http = require "luci.http" 8 | local tw = require "tw" 9 | 10 | --没经过协议页时自动登陆 () 11 | local accepted_now = luci.util.get_agreement("ACCEPTED") 12 | 13 | if accepted_now == "1" then 14 | --TODO: 如果未登录则强制登陆 15 | end 16 | 17 | if accept == "1" then 18 | local rv = { } 19 | local nfs = require "nixio.fs" 20 | local io = require "io" 21 | local fd = io.open(agreementfile, "r") 22 | local file_ok = false 23 | 24 | if fd then 25 | while true do 26 | local ln = fd:read("*l") 27 | if not ln then 28 | break 29 | else 30 | local name,status = ln:match("^(%S+):(%S+)") 31 | if name and status then 32 | if name == "ACCEPTED" then 33 | file_ok = true 34 | break 35 | end 36 | end 37 | end 38 | end 39 | fd:close() 40 | end 41 | 42 | if not file_ok then 43 | luci.http.write("没有找到授权配置文件或文件内容错误!") 44 | else 45 | --接受设为1 46 | luci.util.set_agreement_switch("ACCEPTED",1) 47 | luci.util.set_agreement_switch("HAVEBEENSET",1) 48 | 49 | luci.http.redirect(luci.dispatcher.build_url("admin_mobile").."?guide_mode=1") 50 | 51 | --暂时屏蔽 TODO 向设置页传递url 52 | --[[ 53 | if url == nil or url == "" then 54 | luci.http.redirect("/") 55 | else 56 | local http_t = url:match('^http([^%s]+)') 57 | if http_t == nil or http_t == "" then 58 | url = "http://"..url 59 | end 60 | luci.http.redirect(luci.http.urldecode(url)) 61 | end 62 | ]]-- 63 | end 64 | luci.http.close() 65 | end 66 | 67 | local _,_,_,wifi_ssid = util.get_wifi_device_status() 68 | 69 | %> 70 | 71 | 72 | 73 | 74 | 75 | 欢迎使用极路由 76 | 77 | 78 | 83 | 84 | 85 |
86 | 90 |
91 | 快捷设置上网 92 | 我同意《极路由上网协议》 93 |
94 | 114 |
115 | 116 |
117 | 118 | 121 |
122 | 130 | 131 | 132 | 133 | 134 | -------------------------------------------------------------------------------- /usr/lib/lua/luci/view/admin_mobile/system/guide_wifi.htm: -------------------------------------------------------------------------------- 1 | <% 2 | local ver = require "luci.version" 3 | local s = require "luci.tools.status" 4 | local util = require "luci.util" 5 | local deviceReq = "radio0.network1" 6 | local http = require "luci.http" 7 | local protocol = require "luci.http.protocol" 8 | local tw = require "tw" 9 | local n = require "luci.controller.api.network" 10 | 11 | local sub_action = luci.http.formvalue("sub_action") 12 | 13 | local codeResp_set 14 | local msgResp_set 15 | local codeResp_set_wifi 16 | local msgResp_set_wifi 17 | 18 | local ssidResp 19 | local encryptionResp 20 | local wifi_keyResp 21 | 22 | local codeResp = 0 23 | local msgResp = "" 24 | local codeResp_wifi = 0 25 | local msgResp_wifi = "" 26 | 27 | if sub_action == "1" then 28 | -------------- 29 | -- wifi 设置 (wifi set_base) 30 | -------------- 31 | 32 | local ssidReq = luci.http.formvalue("ssid") 33 | local keyReq = luci.http.formvalue("key") 34 | local encryptionReq = luci.http.formvalue("encryption") 35 | local hiddenReq = luci.http.formvalue("hidden") 36 | ssidResp = ssidReq 37 | encryptionResp = encryptionReq 38 | wifi_keyResp = keyReq 39 | 40 | -- 返回值 41 | codeResp_set_wifi = 0 42 | msgResp_set_wifi = "" 43 | 44 | -- TODO 45 | -- wep-open 必须为 13位 46 | -- psk psk2 形式需要 8位 到 63 位 47 | 48 | --插入运算代码 49 | local netmd = require "luci.model.network".init() 50 | local net = netmd:get_wifinet(deviceReq) 51 | local req_ok = true 52 | 53 | if net then 54 | 55 | -- 关闭 wifi 56 | 57 | -- 判断参数是否正常 58 | if (ssidReq == nil or ssidReq == "") then 59 | req_ok = false 60 | codeResp_set_wifi = 311 61 | end 62 | 63 | if (ssidReq:len()>32) then 64 | req_ok = false 65 | codeResp_set_wifi = 312 66 | end 67 | 68 | -- 判断参数是否正常 69 | if (ssidReq == nil or ssidReq == "") and (encryptionReq == nil or encryptionReq == "") and (keyReq == nil or keyReq == "") then 70 | req_ok = false 71 | codeResp_set_wifi = 310 72 | end 73 | 74 | -- 判断 encryption 参数是否合法 75 | --if encryptionReq ~= nil and encryptionReq ~= "none" and encryptionReq ~= "psk" and encryptionReq ~= "psk2" and encryptionReq ~= "wep-open" then 76 | if encryptionReq ~= nil and encryptionReq ~= "none" and encryptionReq ~= "mixed-psk" then 77 | req_ok = false 78 | codeResp_set_wifi = 402 79 | end 80 | 81 | -- 判断 key 参数是否合法 82 | if encryptionReq ~= nil then 83 | 84 | if encryptionReq == "psk" or encryptionReq == "psk2" then 85 | if keyReq:len()<8 then 86 | req_ok = false 87 | codeResp_set_wifi = 403 88 | end 89 | 90 | elseif encryptionReq == "mixed-psk" then 91 | if keyReq:len()<8 or keyReq:len()>63 then 92 | req_ok = false 93 | codeResp_set_wifi = 405 94 | end 95 | elseif encryptionReq == "wep-open" then 96 | if keyReq:len()~=5 and keyReq:len()~=13 then 97 | req_ok = false 98 | codeResp_set_wifi = 404 99 | end 100 | end 101 | end 102 | 103 | if keyReq:len()>0 and encryptionReq == "none" then 104 | req_ok = false 105 | codeResp_set_wifi = 406 106 | end 107 | 108 | if req_ok==true then --请求正常 109 | 110 | msgResp_set_wifi = ssidReq 111 | 112 | -- 开始 set 动作 113 | if ssidReq~=nil and ssidReq~="" then 114 | net:set("ssid",ssidReq) 115 | end 116 | 117 | if keyReq~=nil then 118 | net:set("encryption",encryptionReq) 119 | net:set("key",keyReq) 120 | if encryptionReq=="none" then 121 | net:set("key","") 122 | elseif encryptionReq=="wep-open" then 123 | net:set("key1","s:"..keyReq) 124 | net:set("key",1) 125 | end 126 | end 127 | 128 | if hiddenReq == "1" then 129 | net:set("hidden","enable") 130 | else 131 | net:set("hidden",nil) 132 | end 133 | 134 | netmd:commit("wireless") 135 | netmd:save("wireless") 136 | 137 | end 138 | else 139 | codeResp_set_wifi = 401 140 | end 141 | 142 | -- 返回值及错误处理 143 | if (codeResp_set_wifi == 0) then 144 | -- 重启放在下一页 145 | else 146 | msgResp_set_wifi = luci.util.get_api_error(codeResp_set_wifi) 147 | end 148 | else 149 | _,_,_,ssidResp = util.get_wifi_device_status() 150 | end 151 | 152 | local wifi_ssid_parts = ssidResp.split( ssidResp, "HiWiFi_" ) 153 | local wifi_ssid_pre,wifi_ssid_real 154 | if table.getn(wifi_ssid_parts)>1 then 155 | wifi_ssid_pre = "HiWiFi_" 156 | wifi_ssid_real = wifi_ssid_parts[2] 157 | else 158 | wifi_ssid_pre = "" 159 | wifi_ssid_real = wifi_ssid_parts[1] 160 | end 161 | 162 | -------------- 163 | -- 可选项 164 | -------------- 165 | local option_wifi_encryption = { 166 | {k="none",v="无加密"}, 167 | {k="mixed-psk",v="强加密(WPA/WPA2个人版)"} 168 | } 169 | 170 | 171 | -- step go 172 | if codeResp_set_wifi == 0 then 173 | local msgResp_set_wifi_encode = protocol.urlencode(msgResp_set_wifi) 174 | local wifi_key_show 175 | if keyReq ~="" and keyReq then 176 | wifi_key_show = keyReq 177 | else 178 | wifi_key_show = "无" 179 | end 180 | luci.http.redirect(luci.dispatcher.build_url("admin_mobile","guide_finish").."?ssid="..msgResp_set_wifi_encode) 181 | end 182 | %> 183 | 184 | 185 | 186 | 187 | 188 | 欢迎使用极路由 189 | 190 | 191 | 192 | 193 |
194 | 198 | 199 |
200 |
201 | 为有效防止蹭网等不安全行为,请您及时修改无线密码。 202 |
203 |
" method="post"> 204 | 205 |
206 |
207 | 208 |
209 |
210 | 211 |
212 |
213 | 214 | 215 |
216 | 217 |
218 |
219 | 222 |
223 | 227 |

228 | 229 | 230 | '" value="跳过"/> 231 |
232 | 233 |
234 | 235 | 238 |
239 | 259 | 260 | 261 | -------------------------------------------------------------------------------- /usr/lib/lua/luci/view/admin_mobile/wifi/wifi_setup.htm: -------------------------------------------------------------------------------- 1 | <% 2 | local wifi_status,wifi_device,wifi_ifname,wifi_ssid,wifi_encryption,wifi_channel,wifi_mode = luci.util.get_wifi_device_status() 3 | local ver = require "luci.version" 4 | %> 5 | <%+header%> 6 | 7 |
8 |
9 |
10 |
11 | 12 | 13 |
14 |
15 |
16 | 17 | 21 |
22 | 33 | 51 | 52 |
53 |
54 |
55 |
56 | 57 | 58 | 59 | 60 |
61 |
62 |
63 | 64 | 65 | 66 | 67 | 189 | <%+footer%> 190 | -------------------------------------------------------------------------------- /usr/lib/lua/luci/view/admin_web/guide/admin.htm: -------------------------------------------------------------------------------- 1 | <% 2 | local ver = require "luci.version" 3 | local http = require "luci.http" 4 | %> 5 | 6 | 7 | 8 | 9 | 10 | 极路由|首次安装-修改后台密码 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 22 | 23 |
24 |
25 |

设置极路由后台密码

26 |

防止DNS劫持,保障网上财产安全

27 |

访问http://hiwifi.com 进入路由器后台进行管理

28 |
29 | 30 | 31 |

32 | 保存密码 33 |
34 | 35 |
36 |
37 | 38 | 40 |
41 | 42 | 43 | 155 | 156 | -------------------------------------------------------------------------------- /usr/lib/lua/luci/view/admin_web/guide/agreement.htm: -------------------------------------------------------------------------------- 1 | <% 2 | local ver = require "luci.version" 3 | %> 4 | 5 | 6 | 7 | 8 | 9 | 极路由|首次安装 10 | 11 | 12 | 13 | 14 |
15 | 18 | 19 |
20 |

极路由用户使用协议

21 |
22 |

北京极科极客科技有限公司(以下简称"极路由")提醒您:在使用极路由等相关应用前,请您务必仔细阅读并透彻理解本声明。您可以选择不使用"极路由",但如果您使用"极路由",您的使用行为将被视为对本声明全部内容的认可。

23 |

1. 您明确同意,您需独自承担使用许可应用产生的全部风险。

24 |

2. 除法律法规有明确规定外,"极路由"对许可应用不作任何明示或暗示的保证,包括但不限于许可应用的适用性、没有错误或疏漏、持续性、准确性、可靠性、适用于某一特定用途。同时,"极路由"也不对许可应用所涉及的技术及信息的有效性、准确性、正确性、可靠性、质量、稳定、完整和及时性作出任何承诺和保证。

25 |

3. "极路由"不就网络的中断或无法运作、技术故障、计算机错误或病毒、信息损坏或丢失或其它在"极路由"合理控制范围之外的原因而产生的其他任何性质的破坏而向您或任何第三方承担赔偿责任。

26 |

4. 使用许可应用会受到各个网络环节不稳定因素的影响,包括但不限于因不可抗力、黑客攻击、系统不稳定、您所处位置、您的苹果终端处于关闭状态、信息内容非法以及其他任何网络、技术、通信线路、信息安全管理措施等原因造成许可应用无法正常使用,您同意自行承担以上风险,"极路由"不承担任何责任。

27 |

5. 在任何情况下,由于您因下述任一情况所引起或与此有关的任何人身伤害或任何附带的、特别的、间接的或后果性的损害赔偿,包括但不限于利润损失、资料损失、业务中断的损害赔偿或任何其它商业损害赔偿或损失,无论因何原因产生,也无论"极路由"是否知悉该等损失可能发生,"极路由"均无须为此承担任何责任:
28 | 1) 使用或未能使用许可应用;
29 | 2) 第三方未经批准的使用许可应用或更改您的数据;
30 | 3) 使用许可应用进行的行为产生的费用及损失;
31 | 4) 您对许可应用的误解;
32 | 5) 任何非因"极路由"的原因而引起的与许可应用有关的其它损失。

33 |

6. 非经"极路由"或"极路由"授权开发并正式发布的其它任何由许可应用衍生的应用均属非法,使用此类应用,可能导致不可预知的风险,由此产生的一切法律责任与纠纷与"极路由"无关,"极路由"并有权中止、终止使用许可和/或其他一切服务。

34 |

7. 您与其他使用许可应用的用户之间通过许可应用进行时,因您受误导或欺骗而导致或可能导致的任何心理、生理上的伤害以及经济上的损失,应由过错方依法承担所有责任,一概与"极路由"无关。

35 |
36 | " class="btn radius J_btn">我同意 37 |
38 | 39 | 41 |
42 | 43 | 44 | -------------------------------------------------------------------------------- /usr/lib/lua/luci/view/admin_web/guide/common.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 极路由|首次安装 7 | 8 | 9 | 10 | 11 |
12 | 15 | 16 |
17 |
18 |
19 | 20 | 按钮 21 | 22 | 25 | 26 | 33 | 34 | 41 | 42 | 43 |
44 | 45 | 47 |
48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /usr/lib/lua/luci/view/admin_web/guide/contact.htm: -------------------------------------------------------------------------------- 1 | <% 2 | local ver = require "luci.version" 3 | local http = require "luci.http" 4 | local util = require "luci.util" 5 | 6 | local autotype = util.fliter_unsafe(http.formvalue("autotype")) 7 | 8 | %> 9 | 10 | 11 | 12 | 13 | 14 | 极路由|首次安装-联系宽带服务商 15 | 16 | 17 | 18 | 19 | 20 |
21 | 24 | 25 |
26 |
27 |

找回宽带上网账号

28 |

联系宽带服务商

29 |
30 |
    31 |
  • 10000中国电信宽带客服
  • 32 |
  • 10010中国联通宽带客服
  • 33 |
  • 10086中国移动铁通宽带客服
  • 34 |
  • 96196歌华有线带客服
  • 35 |
  • 95079长城宽带客服1
  • 36 |
  • 96090090长城宽带客服2
  • 37 |
  • 01082529990方正宽带客服
  • 38 |
  • 96877有线通客服
  • 39 |
  • 057196171华数宽带客服
  • 40 |
  • 96007宽带通客服
  • 41 |
42 | 43 |
44 | ?autotype=<%=autotype%>" class="btn radius">去拨号 45 |
46 |
47 | 48 | 50 |
51 | 52 | 53 | 68 | 69 | -------------------------------------------------------------------------------- /usr/lib/lua/luci/view/admin_web/guide/find2.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 极路由|首次安装-找回宽带上网账号 7 | 8 | 9 | 10 |
11 | 14 | 15 |
16 |
17 |

检测中

18 |
19 | 正在检测,请稍候 20 | 联系宽带服务商 21 |
22 |
23 | 24 | 26 |
27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /usr/lib/lua/luci/view/admin_web/guide/find3.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 极路由|首次安装-请插入网线 7 | 8 | 9 | 10 |
11 | 14 | 15 |
16 |
17 |

账号获取成功

18 |

将宽带网线插入极路由WAN接口

19 |
20 | 已连接,接入互联网 21 | 22 |
23 |
24 | 25 | 27 |
28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /usr/lib/lua/luci/view/admin_web/guide/guide_online.htm: -------------------------------------------------------------------------------- 1 | <% 2 | local ver = require "luci.version" 3 | local util = require "luci.util" 4 | local deviceReq = "radio0.network1" 5 | local http = require "luci.http" 6 | local protocol = require "luci.http.protocol" 7 | local tw = require "tw" 8 | local util = require "luci.util" 9 | 10 | local srcurl = luci.util.exec("cat /tmp/firstsrcurl 2>/dev/null") 11 | if srcurl ~= nil then 12 | srcurl = luci.util.fliter_unsafe(luci.http.urlencode(srcurl)) 13 | end 14 | 15 | %> 16 | 17 | 18 | 19 | 20 | 21 | 极路由-设置完成 22 | 23 | 24 | 25 | 26 | 27 | 28 | 34 | 35 | -------------------------------------------------------------------------------- /usr/lib/lua/luci/view/admin_web/guide/index.htm: -------------------------------------------------------------------------------- 1 | <% 2 | local url = luci.util.fliter_unsafe(luci.http.urlencode(luci.http.formvalue("url"))) 3 | local accept = luci.http.formvalue("accept") 4 | local ver = require "luci.version" 5 | local util = require "luci.util" 6 | local http = require "luci.http" 7 | 8 | local guide_net = luci.util.exec("cat /tmp/guide_net 2>/dev/null") 9 | 10 | local srcurl = luci.http.formvalue("url"); 11 | if srcurl ~= nil then 12 | luci.util.exec("echo -n '"..srcurl.."' >/tmp/firstsrcurl 2>/dev/null") 13 | end 14 | 15 | local tologin = 0 16 | 17 | if guide_net == 1 or guide_net == "1" then 18 | tologin = 1 19 | end 20 | 21 | if accept == "1" then 22 | local file_ok = false 23 | 24 | local accepted_now = luci.util.get_agreement("ACCEPTED") 25 | if accepted_now ~= nil then 26 | file_ok = true 27 | end 28 | 29 | if not file_ok then 30 | luci.http.write("没有找到授权配置文件或文件内容错误!") 31 | luci.http.close() 32 | else 33 | tologin = 1 34 | end 35 | --luci.http.close() 36 | end 37 | 38 | %> 39 | 40 | 41 | 42 | 43 | 44 | 极路由|首次安装 45 | 46 | 47 | 48 | 49 | 50 |
51 | 54 | <% 55 | if tologin == 0 then 56 | %> 57 |
58 |

全球独创宽带密码找回专利

59 | 开启神奇之旅 60 | 63 |
64 | 65 | 67 | 82 | <% 83 | elseif tologin == 1 then 84 | %> 85 |
86 |

请稍候...

87 |

88 |
" style="display:none;"> 89 | 90 | 91 | " /> 92 |
93 | <% 94 | end 95 | %> 96 |
97 | 98 | 116 | 117 | -------------------------------------------------------------------------------- /usr/lib/lua/luci/view/admin_web/guide/insert.htm: -------------------------------------------------------------------------------- 1 | <% 2 | local ver = require "luci.version" 3 | local nettype = luci.util.fliter_unsafe(luci.http.urlencode(luci.http.formvalue("nettype"))) 4 | %> 5 | 6 | 7 | 8 | 9 | 10 | 极路由|首次安装-请插入网线 11 | 12 | 13 | 14 | 15 | 16 |
17 | 20 | 21 |
22 |
23 |

请插入网线

24 |

将宽带网线插入极路由WAN接口

25 |
26 | 网线未连接 27 | 28 |
29 |
30 | 31 | 33 |
34 | 35 | 90 | 91 | -------------------------------------------------------------------------------- /usr/lib/lua/luci/view/admin_web/guide/insert_yes.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 极路由|首次安装-网线已连接 7 | 8 | 9 | 10 |
11 | 14 | 15 |
16 |
17 |

请插入网线

18 |

将宽带网线插入极路由WAN接口

19 |
20 | 已连接,下一步 21 | 22 |
23 |
24 | 25 | 27 |
28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /usr/lib/lua/luci/view/admin_web/guide/internet.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 极路由|首次安装-上网方式 7 | 8 | 9 | 10 |
11 | 14 | 15 |
16 |
17 |

智能探测出您的上网方式为

18 |

宽带拨号修改

19 |
20 |

请输入宽带上网账号

21 |
22 | 23 | 24 |
25 | 忘记密码?用极路由找回吧~ 26 | 拨号上网 27 | 28 |
29 |
30 | 31 | 33 |
34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /usr/lib/lua/luci/view/admin_web/guide/internet_DHCP.htm: -------------------------------------------------------------------------------- 1 | <% 2 | local ver = require "luci.version" 3 | local util = require "luci.util" 4 | local http = require "luci.http" 5 | 6 | local autotype = util.fliter_unsafe(http.formvalue("autotype")) 7 | local peerdnsReq = http.formvalue("peerdns") 8 | local override_dnsReq = http.formvalue("override_dns") 9 | local override_dns2Req = http.formvalue("override_dns2") 10 | 11 | %> 12 | 13 | 14 | 15 | 16 | 17 | 极路由|首次安装-上网方式 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 29 | 30 |
31 |
32 |

33 |
34 | 41 |
42 | 45 |
<% else %>style="display: none"<% end %> style="display:none"> 46 | 47 | 48 |
49 |
50 |

51 | 连接上网 52 |
53 |
54 | 55 | 57 |
58 | 59 | 74 | 75 | 76 | 212 | 213 | -------------------------------------------------------------------------------- /usr/lib/lua/luci/view/admin_web/guide/internet_check.htm: -------------------------------------------------------------------------------- 1 | <% 2 | local ver = require "luci.version" 3 | local s = require "luci.tools.status" 4 | local util = require "luci.util" 5 | local deviceReq = "radio0.network1" 6 | local http = require "luci.http" 7 | local protocol = require "luci.http.protocol" 8 | local tw = require "tw" 9 | local n = require "luci.controller.api.network" 10 | local net = require "hiwifi.net" 11 | 12 | local autowantypeResp 13 | local uciwantypeResp 14 | local is_eth_linkResp 15 | 16 | if n.is_bridge() then 17 | autowantypeResp = 4 18 | uciwantypeResp = "wisp" 19 | is_eth_linkResp = net.get_wifi_bridge_connect(); 20 | is_eth_linkResp = is_eth_linkResp or 0; 21 | else 22 | autowantypeResp = luci.util.get_auto_wan_type_code() 23 | local interface = "wan" 24 | local resultResp = luci.util.get_lan_wan_info(interface) 25 | if resultResp ~= false then 26 | uciwantypeResp = luci.util.get_wan_contact_info() 27 | end 28 | -- Wan 口是否连通 29 | is_eth_linkResp = luci.util.is_eth_link(); 30 | end 31 | 32 | --是否显示过 密码 33 | local showpassword_tag = "0" 34 | local showpasswordfile = "/etc/app/showpassword_cache" 35 | local fd = io.open(showpasswordfile, "r") 36 | local showpassword_ln = fd:read("*l") 37 | 38 | if showpassword_ln ~= "0" then 39 | fd = io.open(showpasswordfile, "w") 40 | fd:write(showpassword_tag) 41 | fd:close() 42 | end 43 | 44 | -- 打开一次 45 | local guide_tag= ver.guide_tag 46 | local appguidefile = "/etc/app/guide_cache" 47 | fd = io.open(appguidefile, "w") 48 | fd:write(guide_tag) 49 | fd:close() 50 | 51 | local guide_net = luci.util.exec("cat /tmp/guide_net 2>/dev/null") 52 | 53 | local to_url = ''; 54 | if guide_net == 1 or guide_net == "1" then 55 | to_url = luci.dispatcher.build_url("admin_web", "guide", "internet_success") 56 | else 57 | if autowantypeResp == 1 then 58 | to_url = luci.dispatcher.build_url("admin_web", "guide", "pppoe").."?autotype=pppoe" 59 | elseif autowantypeResp == 2 then 60 | to_url = luci.dispatcher.build_url("admin_web", "guide", "dhcp").."?autotype=dhcp" 61 | elseif autowantypeResp == 3 then 62 | --to_url = luci.dispatcher.build_url("admin_web", "guide", "static").."?autotype=static" 63 | to_url = luci.dispatcher.build_url("admin_web", "guide", "pppoe").."?from=static" 64 | elseif autowantypeResp == 4 then 65 | to_url = luci.dispatcher.build_url("admin_web", "guide", "wisp").."?autotype=wisp" 66 | elseif autowantypeResp == 99 then 67 | if is_eth_linkResp == 0 or is_eth_linkResp == "0" then 68 | to_url = luci.dispatcher.build_url("admin_web", "guide", "unlink") 69 | else 70 | to_url = luci.dispatcher.build_url("admin_web", "guide", "dhcp") 71 | end 72 | elseif autowantypeResp == 100 then 73 | to_url = luci.dispatcher.build_url("admin_web", "guide", "dhcp") 74 | else 75 | to_url = luci.dispatcher.build_url("admin_web", "guide", "pppoe") 76 | end 77 | end 78 | %> 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 欢迎使用极路由 88 | 89 | 90 | 91 | 95 | -------------------------------------------------------------------------------- /usr/lib/lua/luci/view/admin_web/guide/internet_static.htm: -------------------------------------------------------------------------------- 1 | <% 2 | local ver = require "luci.version" 3 | local util = require "luci.util" 4 | local http = require "luci.http" 5 | 6 | local autotype = util.fliter_unsafe(http.formvalue("autotype")) 7 | 8 | %> 9 | 10 | 11 | 12 | 13 | 14 | 极路由|首次安装-上网方式 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 26 | 27 |
28 |
29 |

30 | 37 |
38 |
39 |

40 | 连接上网 41 |
42 | 43 |
44 | 45 | 47 |
48 | 49 | 50 | 192 | 193 | -------------------------------------------------------------------------------- /usr/lib/lua/luci/view/admin_web/guide/internet_success.htm: -------------------------------------------------------------------------------- 1 | <% 2 | local ver = require "luci.version" 3 | local http = require "luci.http" 4 | 5 | os.execute("rm /tmp/guide_net 2>/dev/null") 6 | --luci.util.set_agreement_switch("ACCEPTED",1) 7 | --luci.util.set_agreement_switch("HAVEBEENSET",1) 8 | 9 | local is_internet_connect = luci.util.is_internet_connect() 10 | %> 11 | 12 | 13 | 14 | 15 | 16 | 极路由|首次安装-上网方式 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 28 | 29 |
30 |

<%if is_internet_connect == 1 or is_internet_connect == "1" then%><%else%>未连接<%end%>

31 | 36 | 42 | 43 |
44 | 45 | 47 |
48 | 49 | 129 | 130 | -------------------------------------------------------------------------------- /usr/lib/lua/luci/view/admin_web/guide/open_app.htm: -------------------------------------------------------------------------------- 1 | <% 2 | local ver = require "luci.version" 3 | local http = require "luci.http" 4 | 5 | luci.util.set_agreement_switch("ACCEPTED",1) 6 | luci.util.set_agreement_switch("HAVEBEENSET",1) 7 | 8 | local is_internet_connect = luci.util.is_internet_connect() 9 | %> 10 | 11 | 12 | 13 | 14 | 15 | 极路由|首次安装 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 27 | 28 |
29 |

<%if is_internet_connect == 1 or is_internet_connect == "1" then%><%else%>未连接<%end%>

30 |
31 |
手机远程控制
32 |
33 |
34 | 36 | 37 |
38 | 39 | 41 |
42 | 43 | 144 | 145 | -------------------------------------------------------------------------------- /usr/lib/lua/luci/view/admin_web/guide/setsafe.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 欢迎使用极路由 10 | 11 | 12 | 13 | 16 | 17 | -------------------------------------------------------------------------------- /usr/lib/lua/luci/view/admin_web/network/l2tp.htm: -------------------------------------------------------------------------------- 1 | <% 2 | --[[ 3 | Info lan 口设置 4 | Author Wangchao 5 | Copyright 2012 6 | ]]-- 7 | 8 | local ver = require "luci.version" 9 | local adv_menu = luci.util.get_adv_menu() 10 | local request_uri = luci.http.getenv("REQUEST_URI") 11 | %> 12 | 13 | 14 | 15 | 16 | 17 | HiWiFi 路由器 18 | 19 | 20 | 21 | 22 | 23 | 24 | 34 | 35 |
36 |

高级设置设置路由器安全 , 及其他高级设置

37 |
38 | 41 | 42 |
43 |
44 | 45 |
    46 |
  • 47 |
    48 |
    49 |

    50 | 51 | 52 | 56 | 57 |

    58 |
    59 | 60 |

    61 |

    62 |

    63 | 64 |
    65 |

    66 | 67 | 71 | 72 |

    73 |
    74 |
    75 |

    76 | 77 | 78 | 79 |

    80 |
    81 |
    82 |

                            83 | 读取中...           84 | 启动 85 | 停止 86 | 刷新 87 |

    88 |
    89 |
    90 |
  • 91 |
  • 92 |
    93 | 94 | 95 |
    96 |
  • 97 |
98 |
99 |
100 | 197 | 198 | 199 | -------------------------------------------------------------------------------- /usr/lib/lua/luci/view/admin_web/network/net_setup_autowantype.htm: -------------------------------------------------------------------------------- 1 | <% 2 | --[[ 3 | Info 网络连接设置 4 | Author Wangchao 5 | Copyright 2012 6 | ]]-- 7 | 8 | local guide_mode = luci.http.formvalue("guide_mode") 9 | local is_conn = luci.util.is_internet_connect() 10 | local ver = require "luci.version" 11 | %> 12 | 13 | 14 | 15 | 16 | 17 | HiWiFi 路由器 18 | 19 | 22 | 23 | 24 | 25 | 26 | 36 | 37 | 38 | 44 |
45 |
46 |

上网设置将自动检测您的上网方式 , 或手动设置

47 |
48 |
49 |

50 | 自动检测上网方式为 :

    51 |

52 |

53 |

54 |
55 | <% 56 | if (guide_mode == "1") then 57 | %> 58 | 61 | <% 62 | end 63 | %> 64 |
65 | 66 | 123 | 124 | -------------------------------------------------------------------------------- /usr/lib/lua/luci/view/admin_web/network/net_setup_lan.htm: -------------------------------------------------------------------------------- 1 | <% 2 | --[[ 3 | Info lan 口设置 4 | Author Wangchao 5 | Copyright 2012 6 | ]]-- 7 | 8 | local ver = require "luci.version" 9 | local adv_menu = luci.util.get_adv_menu() 10 | local request_uri = luci.http.getenv("REQUEST_URI") 11 | %> 12 | 13 | 14 | 15 | 16 | 17 | HiWiFi 路由器 18 | 19 | 20 | 21 | 22 | 23 | 24 | 31 | 32 |
33 |

高级设置设置路由器安全 , 及其他高级设置

34 |
35 | 38 | 39 |
40 |
41 | 82 | 83 |
84 |
85 | 168 | 169 | 170 | -------------------------------------------------------------------------------- /usr/lib/lua/luci/view/admin_web/network/net_setup_mac.htm: -------------------------------------------------------------------------------- 1 | <% 2 | --[[ 3 | Info MAC 地址绑定 4 | Author Wangchao 5 | Copyright 2012 6 | ]]-- 7 | 8 | local remote_addr = luci.http.getenv("REMOTE_ADDR") 9 | local mac = string.upper(luci.sys.net.ip4mac(remote_addr) or "") 10 | local ver = require "luci.version" 11 | 12 | local adv_menu = luci.util.get_adv_menu() 13 | local request_uri = luci.http.getenv("REQUEST_URI") 14 | 15 | local tnetwork = require "luci.model.tnetwork".init() 16 | local tnetwork_defaults = tnetwork:get_defaults() 17 | local or_mac = tnetwork_defaults:get("wan_mac") 18 | 19 | %> 20 | 21 | 22 | 23 | 24 | 25 | 26 | HiWiFi 路由器 27 | 28 | 29 | 30 | 31 | 32 | 33 | 40 |
41 |

高级设置设置路由器安全 , 及其他高级设置

42 |
43 | 46 | 47 |
48 |
49 |
    50 |
  • 51 |
    52 |

    53 | 60 |

    61 | 65 | 66 |
    67 |
  • 68 | 69 |
  • 70 |
    71 | 72 | 73 | 74 | 75 |
    76 |
  • 77 |
78 |
79 |
80 | 163 | 164 | 165 | -------------------------------------------------------------------------------- /usr/lib/lua/luci/view/admin_web/network/net_setup_mtu.htm: -------------------------------------------------------------------------------- 1 | <% 2 | --[[ 3 | Info 设置 WAN MTU 4 | Author Wangchao 5 | Copyright 2012 6 | ]]-- 7 | 8 | local ver = require "luci.version" 9 | local adv_menu = luci.util.get_adv_menu() 10 | local request_uri = luci.http.getenv("REQUEST_URI") 11 | %> 12 | 13 | 14 | 15 | 16 | 17 | 18 | HiWiFi 路由器 19 | 20 | 21 | 22 | 23 | 24 | 25 | 32 |
33 |

高级设置设置路由器安全 , 及其他高级设置

34 |
35 | 38 |
39 |
40 |
    41 |
  • 42 |
    43 |

    默认值

    44 | 45 |
    46 |
  • 47 | 48 |
  • 49 |
    50 | 51 | 52 |
    53 |
  • 54 |
55 |
56 |
57 | 115 | 116 | 117 | -------------------------------------------------------------------------------- /usr/lib/lua/luci/view/admin_web/network/ppp_adv_setup.htm: -------------------------------------------------------------------------------- 1 | <% 2 | --[[ 3 | Info LCP请求发送间隔 4 | Author Wangchao 5 | Copyright 2012 6 | ]]-- 7 | 8 | local ver = require "luci.version" 9 | local wan_typeResp = luci.util.get_wan_contact_info() 10 | local adv_menu = luci.util.get_adv_menu() 11 | local request_uri = luci.http.getenv("REQUEST_URI") 12 | %> 13 | 14 | 15 | 16 | 17 | 18 | 19 | HiWiFi 路由器 20 | 21 | 22 | 23 | 24 | 25 | 26 | 33 |
34 |

高级设置设置路由器安全 , 及其他高级设置

35 |
36 | 39 |
40 |
41 |
    42 |
  • 43 |
    44 | <%if "pppoe" ~= wan_typeResp then%> 45 | <%end%> 46 |

    秒(s) 设为默认值

    47 |
    48 | (默认值为 0, 表示不发送请求)
    49 | 当前WAN口连接方式不是 "PPPoE" 不能设置此项,你可以 外网设置 50 |
    51 |
    52 |

    53 |

    54 |
    55 |
  • 56 | 57 |
  • 58 |
    59 | 60 | 61 |
    62 |
  • 63 |
64 |
65 |
66 | 138 | 139 | 140 | -------------------------------------------------------------------------------- /usr/lib/lua/luci/view/admin_web/network/upnp.htm: -------------------------------------------------------------------------------- 1 | <% 2 | --[[ 3 | Info upnp 状态 4 | Author Wangchao 5 | Copyright 2012 6 | ]]-- 7 | 8 | local ver = require "luci.version" 9 | local adv_menu = luci.util.get_adv_menu() 10 | local request_uri = luci.http.getenv("REQUEST_URI") 11 | 12 | local upnp_file = "/var/upnp.leases" 13 | local nixio = require "nixio" 14 | 15 | %> 16 | 17 | 18 | 19 | 20 | 21 | 22 | HiWiFi 路由器 23 | 24 | 25 | 26 | 27 | 28 | 29 | 36 |
37 |

高级设置设置路由器安全 , 及其他高级设置

38 |
39 | 42 |
43 |
44 |
    45 |
  • 46 |
    47 |



    48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | <% 57 | local strings = require "hiwifi.strings" 58 | if nixio.fs.access(upnp_file) then 59 | local fd = io.open(upnp_file, "r") 60 | if fd then 61 | while true do 62 | ln = fd:read("*l") 63 | if not ln then 64 | break 65 | else 66 | local data = strings.split(ln, ":", 999, true) 67 | 68 | %> 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | <% 77 | end 78 | end 79 | end 80 | end 81 | %> 82 | 83 |
    应用描述外部端口协议类型内部端口IP 地址
    <%luci.http.write(data[6])%><%luci.http.write(data[2])%><%luci.http.write(data[1])%><%luci.http.write(data[4])%><%luci.http.write(data[3])%>
    84 |

    85 |
  • 86 |
87 |
88 |
89 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /usr/lib/lua/luci/view/admin_web/passport/apps.htm: -------------------------------------------------------------------------------- 1 | <% 2 | --[[ 3 | Info 应用中心 4 | Author Wangchao 5 | Copyright 2012 6 | ]]-- 7 | 8 | local ver = require "luci.version" 9 | local sid = luci.http.formvalue("sid") 10 | 11 | local sys_time_all = os.date("%Y-%m-%d %X", os.time()) 12 | 13 | -%> 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | HiWiFi 路由器 22 | 23 | 24 | 25 | 26 | 27 | 28 | 33 |
34 |
35 | 36 |


37 | 38 | 进入云平台


39 |
40 | 连接中... 41 |

42 |
43 |
44 | 45 | 131 | 132 | 133 | -------------------------------------------------------------------------------- /usr/lib/lua/luci/view/admin_web/passport/bind.htm: -------------------------------------------------------------------------------- 1 | <% 2 | --[[ 3 | Info 用户中心 4 | Author Wangchao 5 | Copyright 2012 6 | ]]-- 7 | 8 | local path = luci.dispatcher.context.requestpath 9 | local action = path[#path] 10 | local code_bk = luci.http.formvalue("code") 11 | 12 | local guide_mode = luci.http.formvalue("guide_mode") 13 | 14 | local protocol = require "luci.http.protocol" 15 | local http_host = luci.http.getenv("HTTP_HOST") 16 | local callback_url = "http://"..http_host..luci.dispatcher.build_url("admin_web", "passport","bind","callback").."/?tmp" 17 | --local callback_url = "http://"..http_host.."/cgi-bin/turbo/admin_web/passport/bind/callback/?tmp"; 18 | local callback_url_encode = protocol.urlencode(callback_url) 19 | local mac_nospace = string.upper(string.gsub(luci.util.get_mac(),":","")); 20 | local ver = require "luci.version" 21 | 22 | -%> 23 | 24 | 25 | 26 | 27 | 28 | 29 | HiWiFi 路由器 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 102 | 107 |
108 |

云服务绑定路由器 设置云功能

109 |
110 |
111 |
112 |

状态:绑定中

113 |

114 | 115 | <% 116 | if (guide_mode == "1") then 117 | %> 118 | 119 | <% 120 | end 121 | %> 122 |

123 | 124 |
125 |
126 | 127 |

状态:绑定中 - <%:解除绑定%>

128 |

openid:

129 |

<%:用户名%>:

130 |

131 | 132 | <% 133 | if (guide_mode == "1") then 134 | %> 135 | 136 | <% 137 | end 138 | %> 139 |

140 | 141 |

- 未连接互联网请检查 网络设置

142 |

- 提示2

143 |
144 |
145 | 146 | 207 | 208 | 209 | -------------------------------------------------------------------------------- /usr/lib/lua/luci/view/admin_web/plugin/drcom.htm: -------------------------------------------------------------------------------- 1 | <% 2 | local ver = require "luci.version" 3 | local sys = require "luci.sys" 4 | local fs = require "nixio.fs" 5 | %> 6 | 7 | 8 | 9 | 10 | 11 | DrCOM for JLU 12 | 13 | 14 | 15 | 16 | 17 | 18 | 36 | 37 |
38 |

DrCOM for JLU

39 |
40 | 43 | 44 |
45 |
46 |
    47 |
    48 | drcom.conf 49 |
  • 50 |
    51 |

    52 | 53 |

    54 |
    55 |
  • 56 |
    57 |
  • 58 |
    59 | 60 | 61 |
    62 |
  • 63 |
64 |
65 |
66 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /usr/lib/lua/luci/view/admin_web/plugin/logs.htm: -------------------------------------------------------------------------------- 1 | <% 2 | local type = luci.http.formvalue("type") 3 | local log_path = "" 4 | if type == "mentohust" then 5 | log_path = "/tmp/mentohust.log" 6 | elseif type == "x3c" then 7 | log_path = "/var/log/x3c8021x.log" 8 | else 9 | 10 | end 11 | 12 | local c="" 13 | if nixio.fs.access(log_path) then 14 | local io = require "io" 15 | local fd = io.open(log_path, "r") 16 | while true do 17 | local ln = fd:read("*l") 18 | if not ln then 19 | break 20 | else 21 | c = c..ln 22 | end 23 | end 24 | end 25 | %> 26 | 27 | 28 | 29 | 30 | 31 | 32 | HiWiFi 路由器 33 | 34 | 35 |
36 |

<%=type%> LOG

37 |
38 |
39 | 51 |
52 | 53 | 54 | -------------------------------------------------------------------------------- /usr/lib/lua/luci/view/admin_web/plugin/x3c.htm: -------------------------------------------------------------------------------- 1 | <% 2 | --[[ 3 | Info 锐捷 4 | Author Wangchao 5 | Copyright 2013 6 | ]]-- 7 | 8 | local ver = require "luci.version" 9 | %> 10 | 11 | 12 | 13 | 14 | 15 | HiWiFi 路由器 16 | 17 | 18 | 19 | 20 | 21 | 22 | 40 | 41 |
42 |

本地插件更多扩展功能

43 |
44 | 48 | 49 |
50 |
51 |
    52 |
    53 | 基本参数 54 |
  • 55 |
    56 |

    57 | 58 |                          59 |                          60 | <%local data = luci.util.exec('/etc/init.d/x3c8021x status');luci.http.write(data)%> 61 |

    62 |

    63 | 64 |

    65 |

    66 |

    67 |
    68 |
  • 69 |
    70 |
    71 | 高级设置 72 |
  • 73 |
    74 |

    75 | 79 |

    80 | 84 |

    85 | 89 |

    90 | 94 |

    95 | 99 |

    100 | 104 |

    105 |

    106 | 107 |                         ?type=x3c" target="_blank"> 查看日志 108 |

    109 |
    110 |
  • 111 |
    112 |
  • 113 |
    114 | 115 | 116 |
    117 |
  • 118 |
119 |
120 |
121 | 173 | 174 | 175 | -------------------------------------------------------------------------------- /usr/lib/lua/luci/view/admin_web/system/agreement.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 欢迎使用极路由 10 | 11 | 12 | 13 | 16 | 17 | -------------------------------------------------------------------------------- /usr/lib/lua/luci/view/admin_web/system/guide3.htm: -------------------------------------------------------------------------------- 1 | <% 2 | local ver = require "luci.version" 3 | local util = require "luci.util" 4 | local deviceReq = "radio0.network1" 5 | local http = require "luci.http" 6 | local protocol = require "luci.http.protocol" 7 | local tw = require "tw" 8 | local util = require "luci.util" 9 | 10 | luci.util.set_agreement_switch("HAVEBEENSET",1) 11 | 12 | local ssid_req = protocol.urldecode(luci.http.formvalue("ssid")) 13 | local net_type = protocol.urldecode(luci.http.formvalue("net_type")) 14 | local ssid_pass = protocol.urldecode(luci.http.formvalue("ssid_pass")) 15 | 16 | local option_type= { 17 | {k="pppoe",v="宽带拨号(PPPoE)"}, 18 | {k="dhcp",v="自动方式 (DHCP)"}, 19 | {k="static",v="手动方式 (静态IP)"} 20 | } 21 | 22 | 23 | for i,v in ipairs(option_type) do 24 | if v['k']==net_type then 25 | net_type = v['v'] 26 | end 27 | end 28 | 29 | %> 30 | 31 | 32 | 33 | 34 | 极路由-设置成功 35 | 36 | 37 | 38 | 39 | 40 |
41 | 44 |
45 |
46 |

设置成功

47 |
48 | 49 | 50 | 51 | <% 52 | if ssid_req then 53 | luci.http.write("
无线设置成功,无线网重启 ,请重新连接 "..ssid_req.."
"); 54 | end 55 | %> 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 |
连网方式无线名称
<%=net_type%><%=ssid_req%>
66 |

" class="btn" style="padding: 5px 20px;">立刻上网 67 |

68 |
69 |
70 |
71 | 75 |
76 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /usr/lib/lua/luci/view/admin_web/system/guide_online.htm: -------------------------------------------------------------------------------- 1 | <% 2 | local ver = require "luci.version" 3 | local util = require "luci.util" 4 | local deviceReq = "radio0.network1" 5 | local http = require "luci.http" 6 | local protocol = require "luci.http.protocol" 7 | local tw = require "tw" 8 | local util = require "luci.util" 9 | 10 | luci.util.set_agreement_switch("HAVEBEENSET",1) 11 | %> 12 | 13 | 14 | 15 | 16 | 17 | 极路由-设置完成 18 | 19 | 20 | 21 | 22 | 23 | 24 | 48 |
49 | 50 | 61 | 62 | -------------------------------------------------------------------------------- /usr/lib/lua/luci/view/admin_web/system/net_detect.htm: -------------------------------------------------------------------------------- 1 | <% 2 | --[[ 3 | Info 网络诊断页 4 | Author Wangchao 5 | Copyright 2012 6 | ]]-- 7 | local ver = require "luci.version" 8 | local urlReq = luci.util.fliter_unsafe(luci.http.formvalue("url")) 9 | if urlReq == nil then 10 | urlReq = "" 11 | end 12 | %> 13 | 14 | 15 | 16 | 17 | 18 | 19 | 路由器网络诊断 20 | 21 | 22 | 23 | 24 | 25 | 26 | 42 | -------------------------------------------------------------------------------- /usr/lib/lua/luci/view/admin_web/system/phone_app_open.htm: -------------------------------------------------------------------------------- 1 | <% 2 | --[[ 3 | Info 引导安装或打开 APP 4 | Author Wangchao 5 | Copyright 2012 6 | ]]-- 7 | 8 | local ver = require "luci.version" 9 | 10 | %> 11 | 12 | 13 | 14 | 15 | 16 | HiWiFi 路由器 17 | 18 | 19 | 20 | 21 | 27 | 28 | 29 | 30 | 34 | 35 | 39 | 40 | 44 | 45 | 84 | 85 | -------------------------------------------------------------------------------- /usr/lib/lua/luci/view/admin_web/system/reboot_reset.htm: -------------------------------------------------------------------------------- 1 | <% 2 | --[[ 3 | Info 重启/恢复出厂设置 4 | Author Wangchao 5 | Copyright 2012 6 | ]]-- 7 | 8 | local ver = require "luci.version" 9 | local adv_menu = luci.util.get_adv_menu() 10 | local request_uri = luci.http.getenv("REQUEST_URI") 11 | %> 12 | 13 | 14 | 15 | 16 | 17 | HiWiFi 路由器 18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 |

高级设置设置路由器安全 , 及其他高级设置

26 |
27 | 30 | 31 |
32 |
33 |

34 | 35 |
36 |
37 | 46 | 47 | -------------------------------------------------------------------------------- /usr/lib/lua/luci/view/admin_web/system/setup.htm: -------------------------------------------------------------------------------- 1 | <% 2 | --[[ 3 | Info 系统设置 4 | Author Wangchao 5 | Copyright 2012 6 | ]]-- 7 | 8 | local ver = require "luci.version" 9 | local is_defult_password = luci.sys.user.checkpasswd("root", "admin") 10 | %> 11 | 12 | 13 | 14 | 15 | 16 | 17 | HiWiFi 路由器 18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 |

修改密码路由器后台登录密码

26 |
27 |
28 | 29 |
30 |
31 |
style="display:none;"<%end%>> 32 | 33 |
34 |
35 | 36 |
37 |
38 | 39 |
40 | <%if is_defult_password then %> 41 |
42 | 密码为 admin, 不安全,请修改 43 |
44 | <%end%> 45 |
46 |
47 | 48 | 49 |
50 |
51 |
 
52 |
53 | 111 | 112 | -------------------------------------------------------------------------------- /usr/lib/lua/luci/view/admin_web/system/upgrade.htm: -------------------------------------------------------------------------------- 1 | <% 2 | --[[ 3 | Info 路由器固件升级 4 | Author Wangchao 5 | Copyright 2012 6 | ]]-- 7 | 8 | local mode = luci.http.formvalue("mode") 9 | local ver = require "luci.version" 10 | local adv_menu = luci.util.get_adv_menu() 11 | local request_uri = luci.http.getenv("REQUEST_URI") 12 | local board_type = luci.util.get_sys_board() 13 | %> 14 | 15 | 16 | 17 | 18 | 19 | HiWiFi 路由器 20 | 21 | 22 | 23 | 24 | 29 | 30 | 31 | <% 32 | if mode ~= "out" then 33 | %> 34 |
35 |

高级设置设置路由器安全 , 及其他高级设置

36 |
37 | <% 38 | end 39 | %> 40 | 41 | <% 42 | if mode ~= "out" then 43 | %> 44 | 47 | <% 48 | end 49 | %> 50 |
setup_box<%end%>" style="text-align: center;"> 51 |
52 | <% 53 | if mode == "out" then 54 | %> 55 |


56 | <% 57 | end 58 | %> 59 | 60 | 路由器固件自助升级


61 | 70 |
71 | 72 |
73 | 78 |
79 | 82 | 86 | 90 |
91 | HiWiFi 路由器 检查更新... 92 |
93 |
94 | 95 |
96 | 97 | 235 | 236 | -------------------------------------------------------------------------------- /usr/lib/lua/luci/view/admin_web/system/upgrade_user.htm: -------------------------------------------------------------------------------- 1 | <% 2 | --[[ 3 | Info 路由器固件升级 4 | Author Wangchao 5 | Copyright 2012 6 | ]]-- 7 | 8 | local ver = require "luci.version" 9 | %> 10 | 11 | 12 | 13 | 14 | 15 | HiWiFi 路由器 16 | 17 | 18 | 19 | 20 | 25 | 26 | 27 |
28 |



路由器固件自助升级


29 |
30 |
31 | 32 | 有新版本需要更新,请用管理账号登录,并进行更新 33 | 34 |

35 |
36 |
37 |
38 | 45 | 46 | -------------------------------------------------------------------------------- /usr/lib/lua/luci/view/admin_web/wifi/wifi_devices_list.htm: -------------------------------------------------------------------------------- 1 | <% 2 | --[[ 3 | Info wifi 已经连接设备列表 4 | Author Wangchao 5 | Copyright 2012 6 | ]]-- 7 | 8 | local ver = require "luci.version" 9 | %> 10 | 11 | 12 | 13 | 14 | 15 | HiWiFi 路由器 16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 |

无线网络已连接设备列表随时掌控联网设备,预防被蹭网

24 |
25 |
26 |

安装手机远程管理应用可以轻松踢除可疑设备!HiWiFi 远程控制 App | 设置无线密码 | 设置 MAC 限制

27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 |
MAC地址IP名称信号强度
获取中...
38 |
39 | 135 | 136 | 137 | -------------------------------------------------------------------------------- /usr/lib/lua/luci/view/error404.htm: -------------------------------------------------------------------------------- 1 | <%+header%> 2 |

404 Not Found

3 |

Sorry, the object you requested was not found.

4 | Unable to dispatch: <%=luci.http.request.env.PATH_INFO%> 5 | <%+footer%> -------------------------------------------------------------------------------- /usr/lib/lua/luci/view/error500.htm: -------------------------------------------------------------------------------- 1 | <%+header%> 2 |

500 Internal Server Error

3 |

Sorry, the server encountered an unexpected error.

4 |
<%=message%>
5 | <%+footer%> 6 | -------------------------------------------------------------------------------- /usr/lib/lua/luci/view/footer.htm: -------------------------------------------------------------------------------- 1 | <% include("themes/" .. theme .. "/footer") %> -------------------------------------------------------------------------------- /usr/lib/lua/luci/view/header.htm: -------------------------------------------------------------------------------- 1 | <% 2 | if not luci.dispatcher.context.template_header_sent then 3 | include("themes/" .. theme .. "/header") 4 | luci.dispatcher.context.template_header_sent = true 5 | end 6 | %> 7 | -------------------------------------------------------------------------------- /usr/lib/lua/luci/view/indexer.htm: -------------------------------------------------------------------------------- 1 | <% include("themes/" .. theme .. "/indexer") %> -------------------------------------------------------------------------------- /usr/lib/lua/luci/view/themes/mobile/footer.htm: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 6 |
7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /usr/lib/lua/luci/view/themes/mobile/header.htm: -------------------------------------------------------------------------------- 1 | <% 2 | local sys = require "luci.sys" 3 | local http = require "luci.http" 4 | local disp = require "luci.dispatcher" 5 | 6 | local request = disp.context.path 7 | local request2 = disp.context.request 8 | 9 | local leaf = request2[#request2] 10 | 11 | 12 | http.prepare_content("text/html; charset=UTF-8") 13 | 14 | local ver = require "luci.version" 15 | math.randomseed(os.time()) 16 | local random = math.random() 17 | -%> 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 垃圾路由器的后台 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 48 | 49 | 50 | 51 | 52 | 58 | 59 | 60 |
61 |
62 | 63 |

64 | <% 65 | if leaf == "info" or leaf == "network" or leaf == "wifi" then 66 | %> 67 | style="display:none;"<%end%> > 68 | <%:首页%> 69 | 70 | <% 71 | end 72 | %> 73 |
74 |
75 |
76 |
-------------------------------------------------------------------------------- /usr/lib/lua/luci/view/themes/turbo/footer.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcoms/drcom-HC5661-1s-patch/9196076dc9f15287417e89f2bb982380c4fa3cdd/usr/lib/lua/luci/view/themes/turbo/footer.htm -------------------------------------------------------------------------------- /usr/lib/lua/luci/view/themes/turbo/header.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcoms/drcom-HC5661-1s-patch/9196076dc9f15287417e89f2bb982380c4fa3cdd/usr/lib/lua/luci/view/themes/turbo/header.htm -------------------------------------------------------------------------------- /www/turbo-static/turbo/mobile/image/cloud.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcoms/drcom-HC5661-1s-patch/9196076dc9f15287417e89f2bb982380c4fa3cdd/www/turbo-static/turbo/mobile/image/cloud.png -------------------------------------------------------------------------------- /www/turbo-static/turbo/mobile/image/cloud2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcoms/drcom-HC5661-1s-patch/9196076dc9f15287417e89f2bb982380c4fa3cdd/www/turbo-static/turbo/mobile/image/cloud2.png -------------------------------------------------------------------------------- /www/turbo-static/turbo/web/images/bg_131206.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcoms/drcom-HC5661-1s-patch/9196076dc9f15287417e89f2bb982380c4fa3cdd/www/turbo-static/turbo/web/images/bg_131206.png -------------------------------------------------------------------------------- /www/turbo-static/turbo/web/images/bg_131206@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcoms/drcom-HC5661-1s-patch/9196076dc9f15287417e89f2bb982380c4fa3cdd/www/turbo-static/turbo/web/images/bg_131206@2x.png -------------------------------------------------------------------------------- /www/turbo-static/turbo/web/images/cloud.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcoms/drcom-HC5661-1s-patch/9196076dc9f15287417e89f2bb982380c4fa3cdd/www/turbo-static/turbo/web/images/cloud.png -------------------------------------------------------------------------------- /www/turbo-static/turbo/web/images/cloud2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcoms/drcom-HC5661-1s-patch/9196076dc9f15287417e89f2bb982380c4fa3cdd/www/turbo-static/turbo/web/images/cloud2.png -------------------------------------------------------------------------------- /www/turbo-static/turbo/web/images/cloud3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drcoms/drcom-HC5661-1s-patch/9196076dc9f15287417e89f2bb982380c4fa3cdd/www/turbo-static/turbo/web/images/cloud3.png --------------------------------------------------------------------------------