找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 8773|回复: 46

号外!!! Tomato Phoenix 不死鸟系统成功移植到OpenWRT 更新固件下载地址

[复制链接]
本帖最后由 佐须之男 于 2017-9-18 13:35 编辑

   花了大概有两个月时间,完成了Tomato Phoenix不死鸟UI部分的移植,系统采用的是lede,httpd采用的是uhttpd,cgi的语言采用的是lua,并没有基于luci而是从零开始编写的一套自由框架,文章后面有部分cgi的代码实现供网友研究。测试版系统会在近期发布。

固件下载地址:

https://pan.baidu.com/s/1dFq3elb












BusyBox v1.25.1 () built-in shell (ash)

     _________
    /        /\      _    ___ ___  ___
   /  LE    /  \    | |  | __|   \| __|
  /    DE  /    \   | |__| _|| |) | _|
/________/  LE  \  |____|___|___/|___|                      lede-project.org
\        \   DE /
  \    LE  \    /  -----------------------------------------------------------
   \  DE    \  /    Reboot (17.01-SNAPSHOT, r3473-a5822db)
    \________\/    -----------------------------------------------------------

=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------
root@LEDE:~#



很多网友对lua底层实现代码感兴趣,所以我公布几个cgi的代码片段,供大家学习.

config-mac.lua -> 用户获取wan和lan的mac地址


  1. #!/usr/bin/lua

  2. local webio = require("webio")
  3. local header = require("header")
  4. local uci = require("uci")

  5. local x = uci.cursor()

  6. header.send_header(200, nil, "text/javascript", 0)

  7. webio.puts("\nnvram = {\n")

  8. webio.printf("\tmac_lan:'%s'", x:get("network", "wan_dev", "macaddr"))
  9. webio.printf(",\n\tmac_wan:'%s'", x:get("network", "lan_dev", "macaddr"))

  10. webio.puts("};\n");

复制代码





apply-mac.lua -> 用户保存wan,lan的mac地址并生效

  1. #!/usr/bin/lua

  2. local cgi = require("cgi")
  3. local webio = require("webio")
  4. local header = require("header")
  5. local uci = require("uci")

  6. local x = uci.cursor()
  7. local args = cgi.get_uri_args()

  8. header.send_header(200, nil, "text/javascript", 0)
  9. webio.printf("@msg:重启过程中,网络会中断")

  10. local mac_lan = string.match(args["mac_lan"], "([a-fA-F0-9:]+)")

  11. if mac_lan then
  12.         x:set("network", "lan_dev", "macaddr", mac_lan)
  13. end

  14. mac_wan = string.match(args["mac_wan"], "([a-fA-F0-9:]+)")
  15. if mac_wan then
  16.         x:set("network", "wan_dev", "macaddr", mac_wan)
  17. end

  18. x:save("network")
  19. x:commit("network")

  20. os.execute("/etc/init.d/network restart&")
复制代码

评分

参与人数 2恩山币 +2 收起 理由
55*** + 1 当心我用iPhone X 砸死你
善良*** + 1 我对你的敬仰犹如江水滔滔,我上朝鲜战场后一定写信给你!!!

查看全部评分

我的恩山、我的无线 The best wifi forum is right here.
很好很强大
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

期待佐大的固件内测!
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

大佐强,紫薯布丁
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

厉害,必须要顶一下
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

恭喜版主啦
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

大神
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

虽然我听不太懂,还是很期待的
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

有什么用
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| | 显示全部楼层
春暖花开 发表于 2017-9-14 19:12
有什么用

其实就是玩
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

来自手机 | 显示全部楼层
佐大v5  支持佐大。。。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

来自手机 | 显示全部楼层
万年没中继
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

来自手机 | 显示全部楼层
厉害支持一下
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

珍藏太久了点吧,感觉有点像诺基亚的塞班,会不会步他的后尘呢。。。。。。。。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| | 显示全部楼层
hanxiao007 发表于 2017-9-14 19:51
珍藏太久了点吧,感觉有点像诺基亚的塞班,会不会步他的后尘呢。。。。。。。。

也是刚刚完成呢
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

欢迎大家光临恩山无线论坛上一条 /1 下一条

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-4-29 01:56

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表