Merge Mainline

This commit is contained in:
CN_SZTL 2020-08-28 01:59:52 +08:00
commit cce3094319
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
52 changed files with 3578 additions and 192 deletions

View File

@ -34,7 +34,7 @@ NanoPi R1s(h5) support: [jerrykuku/openwrt-nanopi-r1s-h5](https://github.com/jer
NanoPi support: [speedyworldclub/nlede](https://github.com/speedyworldclub/nlede).<br/>
luci-theme-opentomato source: [Leo-Jo-My/luci-theme-opentomato](https://github.com/Leo-Jo-My/luci-theme-opentomato).<br/>
luci-theme-opentomcat source: [Leo-Jo-My/luci-theme-opentomcat](https://github.com/Leo-Jo-My/luci-theme-opentomcat).<br/>
qntfs-driver source: [lbbboy/qntfs-driver](https://github.com/lbbboy/qntfs-driver).<br/>
luci-theme-atmaterial source: [yangsongli/luci-theme-atmaterial](https://github.com/yangsongli/luci-theme-atmaterial).<br/>
luci-theme-Butterfly source: [Leo-Jo-My/luci-theme-Butterfly](https://github.com/Leo-Jo-My/luci-theme-Butterfly).<br/>
lua-maxminddb source: [jerrykuku/lua-maxminddb](https://github.com/jerrykuku/lua-maxminddb).<br/>
package openwrt-mwol: [Mleaf/openwrt-mwol](https://github.com/Mleaf/openwrt-mwol).<br/>
@ -56,7 +56,8 @@ luci-app-jd-dailybonus source: [jerrykuku/luci-app-jd-dailybonus](https://github
luci-app-oled source: [NateLol/luci-app-oled](https://github.com/NateLol/luci-app-oled).<br/>
luci-theme-edge source: [garypang13/luci-theme-edge](https://github.com//garypang13/luci-theme-edge).<br/>
luci-app-beardropper source: [NateLol/natelol](https://github.com/NateLol/natelol).<br/>
luci-app-vssr source: [jerrykuku/luci-app-vssr](https://github.com/jerrykuku/luci-app-vssr).
luci-app-vssr source: [jerrykuku/luci-app-vssr](https://github.com/jerrykuku/luci-app-vssr).<br/>
luci-theme-infinityfreedom source: [xiaoqingfengATGH/luci-theme-infinityfreedom](https://github.com/xiaoqingfengATGH/luci-theme-infinityfreedom).
## License
### Depend on their own License.

View File

@ -11,7 +11,7 @@ PKG_VERSION:=10.32.01
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/jpcre2/jpcre2/tar.gz/$(PKG_VERSION)?
PKG_HASH:=e8c69a6a6f77ed8d5c35dcdfa767b155f5230a83f55d35cab837b6f0a1266ca8
PKG_HASH:=668cbc6d2c0a065bb6abe8494d5a1bb3549a14cd956a44a2df9095045623ea47
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=BSD 3-Clause

View File

@ -1,8 +1,8 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-vssr
PKG_VERSION:=1.16-1
PKG_RELEASE:=20200826
PKG_VERSION:=1.17
PKG_RELEASE:=20200827
include $(INCLUDE_DIR)/package.mk

View File

@ -104,20 +104,12 @@ function change_node()
local uci = luci.model.uci.cursor()
local sid = luci.http.formvalue("set")
local server = luci.http.formvalue("server")
local flow_table = {
"youtube", "tw_video", "netflix", "disney", "prime", "tvb", "custom"
}
e.status = false
e.sid = sid
if sid ~= "" and server ~= "" then
uci:set("vssr", '@global[0]', server .. '_server', sid)
if (server ~= "global" and server ~= "udp_relay") then
uci:set("vssr", '@global[0]', 'v2ray_flow', "1")
for i, v in pairs(flow_table) do
if (v ~= server) then
uci:set("vssr", '@global[0]', v .. '_server', 'nil')
end
end
end
uci:commit("vssr")
luci.sys.call("/etc/init.d/vssr restart >/www/restartlog.htm 2>&1")

View File

@ -13,6 +13,9 @@ function _M.get_flag(remark, host)
local ip = require "luci.ip"
local iso_table = {
"US", "US", "US", "US", "US", "HK", "HK", "TW", "TW", "TW", "TW", "TW",
"JP", "JP", "JP", "GB", "GB", "DE", "DE", "FR", "IN", "TR", "SG", "SG",
"KR", "KR", "KR", "KR", "RU", "IE", "CA", "CA", "AU", "CH", "AU", "AR","RU",
"AC", "AD", "AE", "AF", "AG", "AI", "AL", "AM", "AO", "AQ", "AR", "AS",
"AT", "AU", "AW", "AX", "AZ", "BA", "BB", "BD", "BE", "BF", "BG", "BH",
"BI", "BJ", "BL", "BM", "BN", "BO", "BQ", "BR", "BS", "BT", "BV", "BW",
@ -34,11 +37,14 @@ function _M.get_flag(remark, host)
"SX", "SY", "SZ", "TA", "TC", "TD", "TF", "TG", "TH", "TJ", "TK", "TL",
"TM", "TN", "TO", "TR", "TT", "TV", "TW", "TZ", "UA", "UG", "UM", "UN",
"US", "UY", "UZ", "VA", "VC", "VE", "VG", "VI", "VN", "VU", "WF", "WS",
"XK", "YE", "YT", "ZA", "ZM", "ZW", "US", "HK", "TW", "JP", "GB", "GB",
"DE", "FR", "IN", "TR", "SG", "KR", "RU", "IE"
"XK", "YE", "YT", "ZA", "ZM", "ZW"
}
local emoji_table = {
"美国", "US", "洛杉矶","芝加哥","达拉斯", "香港","HK", "台湾", "TW", "TAIWAN","彰化","台北",
"日本", "JP", "JAPAN", "英国", "UK", "德国", "DE", "法国", "印度", "土耳其", "新加坡", "SG",
"韩国", "首尔", "KR", "KOREA", "俄罗斯", "爱尔兰", "CANADA", "加拿大","SYDNEY", "瑞士", "澳大利亚", "阿根廷","RU",
"🇦🇨", "🇦🇩", "🇦🇪", "🇦🇫", "🇦🇬", "🇦🇮",
"🇦🇱", "🇦🇲", "🇦🇴", "🇦🇶", "🇦🇷", "🇦🇸",
"🇦🇹", "🇦🇺", "🇦🇼", "🇦🇽", "🇦🇿", "🇧🇦",
@ -81,16 +87,13 @@ function _M.get_flag(remark, host)
"🇹🇼", "🇹🇿", "🇺🇦", "🇺🇬", "🇺🇲", "🇺🇳",
"🇺🇸", "🇺🇾", "🇺🇿", "🇻🇦", "🇻🇨", "🇻🇪",
"🇻🇬", "🇻🇮", "🇻🇳", "🇻🇺", "🇼🇫", "🇼🇸",
"🇽🇰", "🇾🇪", "🇾🇹", "🇿🇦", "🇿🇲", "🇿🇼",
"美国", "香港", "台湾", "日本", "英国", "UK", "德国",
"法国", "印度", "土耳其", "新加坡", "韩国", "俄罗斯",
"爱尔兰"
"🇽🇰", "🇾🇪", "🇾🇹", "🇿🇦", "🇿🇲", "🇿🇼"
}
local iso_code = nil
if (remark ~= nil) then
for i, v in pairs(emoji_table) do
if (string.find(remark, v)) then
if (string.find(string.lower(remark), string.lower(v))) then
iso_code = string.lower(iso_table[i])
break
end

View File

@ -7,20 +7,105 @@ local local_port = arg[3]
local host = arg[4]
local main_port = arg[5]
local outbounds_table = {}
local rules_table = {}
local v2ray_flow = ucursor:get_first(name, 'global', 'v2ray_flow', '0')
local youtube_server = ucursor:get_first(name, 'global', 'youtube_server')
local tw_video_server = ucursor:get_first(name, 'global', 'tw_video_server')
local netflix_server = ucursor:get_first(name, 'global', 'netflix_server')
local disney_server = ucursor:get_first(name, 'global', 'disney_server')
local prime_server = ucursor:get_first(name, 'global', 'prime_server')
local tvb_server = ucursor:get_first(name, 'global', 'tvb_server')
local custom_server = ucursor:get_first(name, 'global', 'custom_server')
local proxy_domain_name = ucursor:get_list(name, "@access_control[0]",
"proxy_domain_name")
local flow_table = {
yotube = {
name = "youtube",
port = 2081,
rules = {
type = "field",
domain = {
"youtube", "ggpht.com", "googlevideo.com", "withyoutube.com",
"youtu.be", "youtube-nocookie.com", "youtube.com",
"youtubeeducation.com", "youtubegaming.com",
"youtubei.googleapis.com", "youtubekids.com",
"youtubemobilesupport.com", "yt.be", "ytimg.com"
},
outboundTag = "youtube"
}
},
tw_video = {
name = "tw_video",
port = 2082,
rules = {
type = "field",
domain = {
"vidol.tv", "hinet.net", "books.com", "litv.tv", "pstatic.net",
"app-measurement.com", "kktv.com.tw", "gamer.com.tw", "wetv.vip"
},
outboundTag = "twvideo"
}
},
netflix = {
name = "netflix",
port = 2083,
rules = {
type = "field",
domain = {
"fast.com", "netflix.ca", "netflix.com", "netflix.net",
"netflixinvestor.com", "netflixtechblog.com", "nflxext.com",
"nflximg.com", "nflximg.net", "nflxsearch.net", "nflxso.net",
"nflxvideo.net"
},
outboundTag = "netflix"
}
},
disney = {
name = "disney",
port = 2084,
rules = {
type = "field",
domain = {
"cdn.registerdisney.go.com", "disneyplus.com",
"disney-plus.net", "dssott.com", "bamgrid.com",
"execute-api.us-east-1.amazonaws.com"
},
outboundTag = "disney"
}
},
prime = {
name = "prime",
port = 2085,
rules = {
type = "field",
domain = {
"aiv-cdn.net", "amazonaws.com", "amazonvideo.com", "llnwd.net",
"amazonprimevideos.com", "amazonvideo.cc", "prime-video.com",
"primevideo.cc", "primevideo.com", "primevideo.info",
"primevideo.org", "primevideo.tv"
},
outboundTag = "prime"
}
},
tvb = {
name = "tvb",
port = 2086,
rules = {
type = "field",
domain = {"tvsuper.com", "tvb.com"},
outboundTag = "tvb"
}
},
custom = {
name = "custom",
port = 2087,
rules = {
type = "field",
domain = proxy_domain_name,
outboundTag = "custom"
}
}
}
function gen_outbound(server_node, tags, local_ports)
local bound = {}
if server_node == "nil" then
if server_node == nil or server_node == "nil" then
bound = nil
else
@ -98,117 +183,17 @@ function gen_outbound(server_node, tags, local_ports)
return bound
end
local outbounds_table = {}
if v2ray_flow == "1" then
table.insert(outbounds_table, gen_outbound(server_section, "global", 2080))
table.insert(outbounds_table, gen_outbound(youtube_server, "youtube", 2081))
table.insert(outbounds_table, gen_outbound(tw_video_server, "twvideo", 2082))
table.insert(outbounds_table, gen_outbound(netflix_server, "netflix", 2083))
table.insert(outbounds_table, gen_outbound(disney_server, "disney", 2084))
table.insert(outbounds_table, gen_outbound(prime_server, "prime", 2085))
table.insert(outbounds_table, gen_outbound(tvb_server, "tvb", 2086))
table.insert(outbounds_table, gen_outbound(custom_server, "custom", 2087))
for i, v in pairs(flow_table) do
local server = ucursor:get_first(name, 'global', v.name..'_server')
table.insert(outbounds_table, gen_outbound(server, v.name,v.port))
table.insert(rules_table, (server ~=nil and server ~= "nil") and v.rules or nil)
end
else
table.insert(outbounds_table,
gen_outbound(server_section, "main", local_port))
table.insert(outbounds_table,gen_outbound(server_section, "main", local_port))
end
-- rules gen
local youtube_rule = {
type = "field",
domain = {
"youtube", "ggpht.com", "googlevideo.com", "withyoutube.com",
"youtu.be", "youtube-nocookie.com", "youtube.com",
"youtubeeducation.com", "youtubegaming.com", "youtubei.googleapis.com",
"youtubekids.com", "youtubemobilesupport.com", "yt.be", "ytimg.com"
},
outboundTag = "youtube"
}
local tw_video_rule = {
type = "field",
domain = {
"vidol.tv", "hinet.net", "books.com", "litv.tv", "pstatic.net",
"app-measurement.com", "kktv.com.tw", "gamer.com.tw", "wetv.vip"
},
outboundTag = "twvideo"
}
local netflix_rule = {
type = "field",
domain = {
"fast.com", "netflix.ca", "netflix.com", "netflix.net",
"netflixinvestor.com", "netflixtechblog.com", "nflxext.com",
"nflximg.com", "nflximg.net", "nflxsearch.net", "nflxso.net",
"nflxvideo.net"
},
outboundTag = "netflix"
}
local disney_rule = {
type = "field",
domain = {
"cdn.registerdisney.go.com", "disneyplus.com", "disney-plus.net",
"dssott.com", "bamgrid.com", "execute-api.us-east-1.amazonaws.com"
},
outboundTag = "disney"
}
local prime_rule = {
type = "field",
domain = {
"aiv-cdn.net", "amazonaws.com", "amazonvideo.com", "llnwd.net",
"amazonprimevideos.com", "amazonvideo.cc", "prime-video.com",
"primevideo.cc", "primevideo.com", "primevideo.info", "primevideo.org",
"rimevideo.tv"
},
outboundTag = "prime"
}
local tvb_rule = {
type = "field",
domain = {"tvsuper.com", "tvb.com"},
outboundTag = "tvb"
}
local custom_rule = {
type = "field",
domain = proxy_domain_name,
outboundTag = "custom"
}
local rules_table = {}
if (youtube_server ~= "nil" and v2ray_flow == "1") then
table.insert(rules_table, youtube_rule)
end
if (tw_video_server ~= "nil" and v2ray_flow == "1") then
table.insert(rules_table, tw_video_rule)
end
if (netflix_server ~= "nil" and v2ray_flow == "1") then
table.insert(rules_table, netflix_rule)
end
if (disney_server ~= "nil" and v2ray_flow == "1") then
table.insert(rules_table, disney_rule)
end
if (prime_server ~= "nil" and v2ray_flow == "1") then
table.insert(rules_table, prime_rule)
end
if (tvb_server ~= "nil" and v2ray_flow == "1") then
table.insert(rules_table, tvb_rule)
end
if (custom_server ~= "nil" and v2ray_flow == "1") then
table.insert(rules_table, custom_rule)
end
local v2ray = {
log = {

View File

@ -335,6 +335,7 @@ local execute = function()
if result.alias:find("过期时间") or
result.alias:find("剩余流量") or
result.alias:find("QQ群") or
result.alias:find("不支持") or
result.alias:find("官网") or not result.server then
log('丢弃无效节点: ' .. result.type ..
' 节点, ' .. result.alias)

View File

@ -1,4 +1,4 @@
/**
/**
* Material is a clean HTML5 theme for LuCI. It is based on luci-theme-bootstrap and MUI
*
* luci-theme-material
@ -476,38 +476,57 @@ header > .container > a[class="brand"]:after {
.main > .main-left > .nav > .slide > a[data-title="Status"]:before {
content: "\e026";
color: #5e72e4!important;
}
.main > .main-left > .nav > .slide > a[data-title="System"]:before {
content: "\e00a";
color: #fb6340!important;
}
.main > .main-left > .nav > .slide > a[data-title="Network"]:before {
content: "\e00e";
color: #8965e0!important;
}
.main > .main-left > .nav > .slide > a[data-title="VPN"]:before {
content: "\e029";
color: #5F9EA0!important;
}
.main > .main-left > .nav > .slide > a[data-title="Services"]:before {
content: "\e01b";
color: #11cdef!important;
}
.main > .main-left > .nav > .slide > a[data-title="Docker"]:before {
content: "\e02c";
color: #00b2ee!important;
}
.main > .main-left > .nav > .slide > a[data-title="NAS"]:before {
content: "\e00b";
color: #f3a4b5!important;
}
.main > .main-left > .nav > .slide > a[data-title="Control"]:before {
content: "\e023";
content: "\e021";
color: #FFD700!important;
}
.main > .main-left > .nav > .slide > a[data-title="Statistics"]:before {
content: "\e023";
color: #1E90FF!important;
}
.main > .main-left > .nav > .slide > a[data-title="Bandwidth Monitor"]:before {
content: "\e00f";
color: #2dce89!important;
}
.main > .main-left > .nav > li > a[data-title="Logout"] {
padding-left:36px;
line-height:40px;
color: #9400D3!important;
}
.main > .main-left > .nav > li > a[data-title="Logout"]:before {
content: "\e005";

View File

@ -45,7 +45,6 @@
// thanks for Jo-Philipp Wich <jow@openwrt.org>
var luciLocation = <%= luci.http.write_json(luci.dispatcher.context.path) %>;
</script>
<script src="<%=media%>/js/jquery.min.js"></script>
<script src="<%=media%>/js/script.js"></script>
</body>
</html>

View File

@ -215,6 +215,7 @@
<style title="text/css"><%= css %></style>
<% end -%>
<script src="<%=resource%>/xhr.js"></script>
<script src="<%=media%>/js/jquery.min.js"></script>
</head>
<body class="lang_<%=luci.i18n.context.lang%> <%- if node then %><%= striptags( node.title ) %><%- end %> <% if luci.dispatcher.context.authsession then %>logged-in<% end %>">
<header>

View File

@ -0,0 +1,18 @@
# LuCI Theme Infinity Freedom
# Copyright 2020 Richard Yu <xiaoqingfengatgm@gmail.com>
#
# Licensed under the Apache License v2.0
# http://www.apache.org/licenses/LICENSE-2.0
include $(TOPDIR)/rules.mk
LUCI_TITLE:=Infinity Freedom Theme
LUCI_DEPENDS:=+libc
PKG_NAME:=luci-theme-infinityfreedom
PKG_VERSION:=1.4.20200613
PKG_RELEASE:=1
include $(TOPDIR)/feeds/luci/luci.mk
# call BuildPackage - OpenWrt buildroot signature

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

View File

@ -0,0 +1,16 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>Generated by IcoMoon</metadata>
<defs>
<font id="icomoon" horiz-adv-x="1024">
<font-face units-per-em="1024" ascent="960" descent="-64" />
<missing-glyph horiz-adv-x="1024" />
<glyph unicode="&#x20;" horiz-adv-x="512" d="" />
<glyph unicode="&#xe20a;" glyph-name="expand_less" d="M512 596.667l256-256-60-60-196 196-196-196-60 60z" />
<glyph unicode="&#xe20b;" glyph-name="expand_more" d="M708 572.667l60-60-256-256-256 256 60 60 196-196z" />
<glyph unicode="&#xe20e;" glyph-name="menu" d="M128 682.667h768v-86h-768v86zM128 384.667v84h768v-84h-768zM128 170.667v86h768v-86h-768z" />
<glyph unicode="&#xe291;" glyph-name="favorite" d="M512 28.667l-62 56q-106 96-154 142t-107 114-81 123-22 113q0 98 67 166t167 68q116 0 192-90 76 90 192 90 100 0 167-68t67-166q0-78-52-162t-113-146-199-186z" />
<glyph unicode="&#xe603;" glyph-name="spinner9" d="M512 960c-278.748 0-505.458-222.762-511.848-499.974 5.92 241.864 189.832 435.974 415.848 435.974 229.75 0 416-200.576 416-448 0-53.020 42.98-96 96-96s96 42.98 96 96c0 282.77-229.23 512-512 512zM512-64c278.748 0 505.458 222.762 511.848 499.974-5.92-241.864-189.832-435.974-415.848-435.974-229.75 0-416 200.576-416 448 0 53.020-42.98 96-96 96s-96-42.98-96-96c0-282.77 229.23-512 512-512z" />
<glyph unicode="&#xf059;" glyph-name="question-circle" horiz-adv-x="878" d="M512 164.571v109.714q0 8-5.143 13.143t-13.143 5.143h-109.714q-8 0-13.143-5.143t-5.143-13.143v-109.714q0-8 5.143-13.143t13.143-5.143h109.714q8 0 13.143 5.143t5.143 13.143zM658.286 548.571q0 50.286-31.714 93.143t-79.143 66.286-97.143 23.429q-138.857 0-212-121.714-8.571-13.714 4.571-24l75.429-57.143q4-3.429 10.857-3.429 9.143 0 14.286 6.857 30.286 38.857 49.143 52.571 19.429 13.714 49.143 13.714 27.429 0 48.857-14.857t21.429-33.714q0-21.714-11.429-34.857t-38.857-25.714q-36-16-66-49.429t-30-71.714v-20.571q0-8 5.143-13.143t13.143-5.143h109.714q8 0 13.143 5.143t5.143 13.143q0 10.857 12.286 28.286t31.143 28.286q18.286 10.286 28 16.286t26.286 20 25.429 27.429 16 34.571 7.143 46.286zM877.714 438.857q0-119.429-58.857-220.286t-159.714-159.714-220.286-58.857-220.286 58.857-159.714 159.714-58.857 220.286 58.857 220.286 159.714 159.714 220.286 58.857 220.286-58.857 159.714-159.714 58.857-220.286z" />
</font></defs></svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 523 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,238 @@
/**
* InfinityFreedom is a clean HTML5 theme for LuCI. It is based on luci-theme-material.
*
* luci-theme-infinityfreedom
* Copyright 2020 Richard Yu <xiaoqingfengatgm@gmail.com>
*
* Have a bug? Please create an issue here on GitHub!
* https://github.com/xiaoqingfengATGH/luci-theme-infinityfreedom/issues
*
* luci-theme-material:
* Copyright 2015 Lutty Yang
*
* luci-theme-bootstrap:
* Copyright 2008 Steven Barth <steven@midlink.org>
* Copyright 2008-2016 Jo-Philipp Wich <jow@openwrt.org>
* Copyright 2012 David Menting <david@nut-bolt.nl>
* MUI:
* https://github.com/muicss/mui
*
* Licensed to the public under the Apache License 2.0
*/
(function ($) {
$(".main > .loading").fadeOut();
/**
* trim text, Remove spaces, wrap
* @param text
* @returns {string}
*/
function trimText(text) {
return text.replace(/[ \t\n\r]+/g, " ");
}
var lastNode = undefined;
var mainNodeName = undefined;
var nodeUrl = "";
(function(node){
if (node[0] == "admin"){
luciLocation = [node[1], node[2]];
}else{
luciLocation = node;
}
for(var i in luciLocation){
nodeUrl += luciLocation[i];
if (i != luciLocation.length - 1){
nodeUrl += "/";
}
}
})(luciLocation);
/**
* get the current node by Burl (primary)
* @returns {boolean} success?
*/
function getCurrentNodeByUrl() {
var ret = false;
if (!$('body').hasClass('logged-in')) {
luciLocation = ["Main", "Login"];
return true;
}
$(".main > .main-left > .nav > .slide > .menu").each(function () {
var ulNode = $(this);
ulNode.next().find("a").each(function () {
var that = $(this);
var href = that.attr("href");
if (href.indexOf(nodeUrl) != -1) {
ulNode.click();
ulNode.next(".slide-menu").stop(true, true);
lastNode = that.parent();
lastNode.addClass("active");
ret = true;
return true;
}
});
});
return ret;
}
/**
* menu click
*/
$(".main > .main-left > .nav > .slide > .menu").click(function () {
var ul = $(this).next(".slide-menu");
var menu = $(this);
if (!ul.is(":visible")) {
menu.addClass("active");
ul.addClass("active");
ul.stop(true).slideDown("fast");
} else {
ul.stop(true).slideUp("fast", function () {
menu.removeClass("active");
ul.removeClass("active");
});
}
return false;
});
/**
* hook menu click and add the hash
*/
$(".main > .main-left > .nav > .slide > .slide-menu > li > a").click(function () {
if (lastNode != undefined) lastNode.removeClass("active");
$(this).parent().addClass("active");
$(".main > .loading").fadeIn("fast");
return true;
});
/**
* fix menu click
*/
$(".main > .main-left > .nav > .slide > .slide-menu > li").click(function () {
if (lastNode != undefined) lastNode.removeClass("active");
$(this).addClass("active");
$(".main > .loading").fadeIn("fast");
window.location = $($(this).find("a")[0]).attr("href");
return false;
});
/**
* get current node and open it
*/
if (getCurrentNodeByUrl()) {
mainNodeName = "node-" + luciLocation[0] + "-" + luciLocation[1];
mainNodeName = mainNodeName.replace(/[ \t\n\r\/]+/g, "_").toLowerCase();
$("body").addClass(mainNodeName);
}
$(".cbi-button-up").val("");
$(".cbi-button-down").val("");
/**
* hook other "A Label" and add hash to it.
*/
$("#maincontent > .container").find("a").each(function () {
var that = $(this);
var onclick = that.attr("onclick");
if (onclick == undefined || onclick == "") {
that.click(function () {
var href = that.attr("href");
if (href.indexOf("#") == -1) {
$(".main > .loading").fadeIn("fast");
return true;
}
});
}
});
/**
* Sidebar expand
*/
var showSide = false;
$(".showSide").click(function () {
if (showSide) {
$(".darkMask").stop(true).fadeOut("fast");
$(".main-left").stop(true).animate({
width: "0"
}, "fast");
$(".main-right").css("overflow-y", "auto");
showSide = false;
} else {
$(".darkMask").stop(true).fadeIn("fast");
$(".main-left").stop(true).animate({
width: "15rem"
}, "fast");
$(".main-right").css("overflow-y", "hidden");
showSide = true;
}
});
$(".darkMask").click(function () {
if (showSide) {
showSide = false;
$(".darkMask").stop(true).fadeOut("fast");
$(".main-left").stop(true).animate({
width: "0"
}, "fast");
$(".main-right").css("overflow-y", "auto");
}
});
$(window).resize(function () {
if ($(window).width() > 921) {
$(".main-left").css("width", "");
$(".darkMask").stop(true);
$(".darkMask").css("display", "none");
showSide = false;
}
});
/**
* fix legend position
*/
$("legend").each(function () {
var that = $(this);
that.after("<span class='panel-title'>" + that.text() + "</span>");
});
/*fix vlan prot*/
/*$(".cbi-section-table-titles, .cbi-section-table-descr, .cbi-section-descr").each(function () {
var that = $(this);
if (that.text().trim() == ""){
that.css("display", "none");
}
});*/
$(".main-right").focus();
$(".main-right").blur();
$("input").attr("size", "0");
if (mainNodeName != undefined) {
console.log(mainNodeName);
switch (mainNodeName) {
case "node-status-system_log":
case "node-status-kernel_log":
$("#syslog").focus(function () {
$("#syslog").blur();
$(".main-right").focus();
$(".main-right").blur();
});
break;
case "node-status-firewall":
var button = $(".node-status-firewall > .main fieldset li > a");
button.addClass("cbi-button cbi-button-reset a-to-btn");
break;
case "node-system-reboot":
var button = $(".node-system-reboot > .main > .main-right p > a");
button.addClass("cbi-button cbi-input-reset a-to-btn");
break;
}
}
})(jQuery);

Binary file not shown.

After

Width:  |  Height:  |  Size: 217 KiB

View File

@ -0,0 +1,53 @@
<%#
InfinityFreedom is a clean HTML5 theme for LuCI. It is based on luci-theme-material.
luci-theme-infinityfreedom
Copyright 2020 Richard Yu <xiaoqingfengatgm@gmail.com>
Have a bug? Please create an issue here on GitHub!
https://github.com/xiaoqingfengATGH/luci-theme-infinityfreedom/issues
luci-theme-material:
Copyright 2015 Lutty Yang
luci-theme-bootstrap:
Copyright 2008 Steven Barth <steven@midlink.org>
Copyright 2008-2016 Jo-Philipp Wich <jow@openwrt.org>
Copyright 2012 David Menting <david@nut-bolt.nl>
MUI:
https://github.com/muicss/mui
Licensed to the public under the Apache License 2.0
-%>
<%
local ver = require "luci.version"
local disp = require "luci.dispatcher"
local request = disp.context.path
local category = request[1]
local tree = disp.node()
local categories = disp.node_childs(tree)
%>
</div>
<footer class="mobile-hide">
<a href="https://github.com/openwrt/luci">Powered by <%= ver.luciname %> (<%= ver.luciversion %>)</a> /
<%= ver.distversion %>
<% if #categories > 1 then %>
<ul class="breadcrumb pull-right" id="modemenu">
<% for i, r in ipairs(categories) do %>
<li<% if request[1] == r then %> class="active"<%end%>><a href="<%=controller%>/<%=r%>/"><%=striptags(translate(tree.nodes[r].title))%></a> <span class="divider">|</span></li>
<% end %>
</ul>
<% end %>
</footer>
</div>
</div>
<script>
// thanks for Jo-Philipp Wich <jow@openwrt.org>
var luciLocation = <%= luci.http.write_json(luci.dispatcher.context.path) %>;
</script>
<script src="<%=media%>/js/script.js"></script>
</body>
</html>

View File

@ -0,0 +1,278 @@
<%#
InfinityFreedom is a clean HTML5 theme for LuCI. It is based on luci-theme-material.
luci-theme-infinityfreedom
Copyright 2020 Richard Yu <xiaoqingfengatgm@gmail.com>
Have a bug? Please create an issue here on GitHub!
https://github.com/xiaoqingfengATGH/luci-theme-infinityfreedom/issues
luci-theme-material:
Copyright 2015 Lutty Yang
luci-theme-bootstrap:
Copyright 2008 Steven Barth <steven@midlink.org>
Copyright 2008-2016 Jo-Philipp Wich <jow@openwrt.org>
Copyright 2012 David Menting <david@nut-bolt.nl>
MUI:
https://github.com/muicss/mui
Licensed to the public under the Apache License 2.0
-%>
<%
local ver = require "luci.version"
local sys = require "luci.sys"
local util = require "luci.util"
local http = require "luci.http"
local disp = require "luci.dispatcher"
local boardinfo = util.ubus("system", "board")
local boardinfo={}
boardinfo.hostname=sys.hostname()
local request = disp.context.path
local request2 = disp.context.request
local category = request[1]
local cattree = category and disp.node(category)
local leaf = request2[#request2]
local tree = disp.node()
local node = disp.context.dispatched
local categories = disp.node_childs(tree)
local c = tree
local i, r
-- tag all nodes leading to this page
for i, r in ipairs(request) do
if c.nodes and c.nodes[r] then
c = c.nodes[r]
c._menu_selected = true
end
end
-- send as HTML5
http.prepare_content("text/html")
local function nodeurl(prefix, name, query)
local u = url(prefix, name)
if query then
u = u .. http.build_querystring(query)
end
return pcdata(u)
end
local function render_tabmenu(prefix, node, level)
if not level then
level = 1
end
local childs = disp.node_childs(node)
if #childs > 0 then
if level > 2 then
write('<ul class="tabs">')
end
local selected_node
local selected_name
local i, v
for i, v in ipairs(childs) do
local nnode = node.nodes[v]
if nnode._menu_selected then
selected_node = nnode
selected_name = v
end
if level > 2 then
write('<li class="tabmenu-item-%s %s"><a href="%s">%s</a></li>' %{
v, (nnode._menu_selected or (node.leaf and v == leaf)) and 'active' or '',
nodeurl(prefix, v, nnode.query),
striptags(translate(nnode.title))
})
end
end
if level > 2 then
write('</ul>')
end
if selected_node then
render_tabmenu(prefix .. "/" .. selected_name, selected_node, level + 1)
end
end
end
local function render_submenu(prefix, node)
local childs = disp.node_childs(node)
if #childs > 0 then
write('<ul class="slide-menu">')
for i, r in ipairs(childs) do
local nnode = node.nodes[r]
local title = pcdata(striptags(translate(nnode.title)))
write('<li><a data-title="%s" href="%s">%s</a></li>' %{
title,
nodeurl(prefix, r, nnode.query),
title
})
end
write('</ul>')
end
end
local function render_topmenu()
local childs = disp.node_childs(cattree)
if #childs > 0 then
write('<ul class="nav">')
for i, r in ipairs(childs) do
local nnode = cattree.nodes[r]
local grandchildren = disp.node_childs(nnode)
if #grandchildren > 0 then
local title = pcdata(striptags(translate(nnode.title)))
write('<li class="slide"><a class="menu" data-title="%s" href="#">%s</a>' %{
pcdata(striptags(nnode.title)),
title
})
render_submenu(category .. "/" .. r, nnode)
write('</li>')
else
local title = pcdata(striptags(translate(nnode.title)))
write('<li><a data-title="%s" href="%s">%s</a></li>' %{
pcdata(striptags(nnode.title)),
nodeurl(category, r, nnode.query),
title
})
end
end
write('</ul>')
end
end
local function render_changes()
-- calculate the number of unsaved changes
if tree.nodes[category] and tree.nodes[category].ucidata then
local ucichanges = 0
for i, j in pairs(require("luci.model.uci").cursor():changes()) do
for k, l in pairs(j) do
for m, n in pairs(l) do
ucichanges = ucichanges + 1;
end
end
end
if ucichanges > 0 then
write('<a class="uci_change_indicator label notice" href="%s?redir=%s">%s: %d</a>' %{
url(category, 'uci/changes'),
http.urlencode(http.formvalue('redir') or table.concat(disp.context.request, "/")),
translate('Unsaved Changes'),
ucichanges
})
end
end
end
-%>
<!DOCTYPE html>
<html lang="<%=luci.i18n.context.lang%>">
<head>
<meta charset="utf-8">
<title><%=striptags( (boardinfo.hostname or "?") .. ( (node and node.title) and ' - ' .. translate(node.title) or '')) %> - LuCI</title>
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport"/>
<meta name="format-detection" content="telephone=no, email=no"/>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="mobile-web-app-capable" content="yes">
<meta name="x5-fullscreen" content="true">
<meta name="full-screen" content="yes">
<meta name="x5-page-mode" content="app">
<meta name="browsermode" content="application">
<meta name="theme-color" content="#0099CC">
<meta name="msapplication-tap-highlight" content="no">
<meta name="msapplication-TileColor" content="#0099CC">
<meta name="application-name" content="<%=striptags( (boardinfo.hostname or "?") ) %> - LuCI">
<meta name="apple-mobile-web-app-title" content="<%=striptags( (boardinfo.hostname or "?") ) %> - LuCI">
<meta name="msapplication-TileImage" content="<%=media%>/logo.png"/>
<link rel="icon" href="<%=media%>/logo.png" sizes="144x144">
<link rel="apple-touch-icon-precomposed" href="<%=media%>/logo.png" sizes="144x144">
<link rel="stylesheet" href="<%=media%>/css/style.css">
<link rel="shortcut icon" href="<%=media%>/favicon.ico">
<% if node and node.css then %>
<link rel="stylesheet" href="<%=resource%>/<%=node.css%>">
<% end -%>
<% if css then %>
<style title="text/css"><%= css %></style>
<% end -%>
<script src="<%=resource%>/xhr.js"></script>
<script src="<%=media%>/js/jquery.min.js"></script>
</head>
<body class="lang_<%=luci.i18n.context.lang%> <%- if node then %><%= striptags( node.title ) %><%- end %> <% if luci.dispatcher.context.authsession then %>logged-in<% end %>">
<header>
<div class="container">
<span class="showSide"></span>
<a class="brand" href="#"><%="OpenWrt"%></a>
<div class="pull-right">
<% render_changes() %>
<span id="xhr_poll_status" style="display:none" onclick="XHR.running() ? XHR.halt() : XHR.run()">
<span class="label success" id="xhr_poll_status_on"><span class="mobile-hide"><%:Auto Refresh%></span> <%:on%></span>
<span class="label" id="xhr_poll_status_off" style="display:none"><span class="mobile-hide"><%:Auto Refresh%></span> <%:off%></span>
</span>
</div>
</div>
</header>
<script>
var brandurl = '/luci-static/infinityfreedom/images/brand.png';
$.ajax({
url : brandurl,
type : 'HEAD',
error : function() {
var brand = $("body > header > div > a.brand");
brand.addClass('brandMark');
},
success : function() {
var brandContainer = $("header > .container > .brand");
brandContainer.addClass("brandWithBackground");
var brand = $("body > header > div > a.brand");
brand.html('');
}
});
</script>
<div class="main">
<div style="" class="loading"><span><div class="loading-img"></div>Loading...</span></div>
<div class="main-left">
<% render_topmenu() %>
</div>
<div class="main-right">
<div class="darkMask"></div>
<div id="maincontent">
<div class="container">
<%- if luci.sys.process.info("uid") == 0 and luci.sys.user.getuser("root") and not luci.sys.user.getpasswd("root") then -%>
<div class="alert-message warning">
<h4><%:No password set!%></h4>
<p><%:There is no password set on this router. Please configure a root password to protect the web interface and enable SSH.%></p>
<div class="right"><a class="btn" href="<%=url("admin/system/admin")%>"><%:Go to password configuration...%></a></div>
</div>
<%- end -%>
<noscript>
<div class="alert-message warning">
<h4><%:JavaScript required!%></h4>
<p><%:You must enable JavaScript in your browser or LuCI will not work properly.%></p>
</div>
</noscript>
<% if category then render_tabmenu(category, cattree) end %>

View File

@ -0,0 +1,7 @@
#!/bin/sh
uci batch <<-EOF
set luci.themes.infinityfreedom=/luci-static/infinityfreedom
set luci.main.mediaurlbase=/luci-static/infinityfreedom
commit luci
EOF
exit 0

View File

@ -37,10 +37,6 @@ sed -i "s/# //g" /etc/opkg/distfeeds.conf
sed -i 's/root::0:0:99999:7:::/root:$1$V4UetPzk$CYXluq4wUazHjmCDBCqXF.:0:0:99999:7:::/g' /etc/shadow
sed -i 's|root:x:0:0:root:/root:/bin/ash|root:x:0:0:root:/root:/bin/bash|g' /etc/passwd
sed -i '/REDIRECT --to-ports 53/d' /etc/firewall.user
echo "iptables -t nat -A PREROUTING -p udp --dport 53 -j REDIRECT --to-ports 53" >> /etc/firewall.user
echo "iptables -t nat -A PREROUTING -p tcp --dport 53 -j REDIRECT --to-ports 53" >> /etc/firewall.user
sed -i '/option disabled/d' /etc/config/wireless
sed -i '/set wireless.radio${devidx}.disabled/d' /lib/wifi/mac80211.sh

View File

@ -97,7 +97,7 @@ function refresh_data()
if file2 then luci.sys.exec("cp -f /tmp/ssr-update." .. type .. " " .. file2) end
retstring = tostring(tonumber(icount)/Num)
if type == "gfw_data" or type == "ad_data" then
luci.sys.exec("/usr/share/shadowsocksr/gfw2ipset.sh gfw_data")
luci.sys.exec("/usr/share/shadowsocksr/gfw2ipset.sh")
else
luci.sys.exec("/etc/init.d/shadowsocksr restart &")
end

View File

@ -749,10 +749,20 @@ start() {
cp -rf /etc/ssr/gfw_list.conf /tmp/dnsmasq.ssr/
cp -rf /etc/ssr/gfw_base.conf /tmp/dnsmasq.ssr/
fi
/usr/share/shadowsocksr/gfw2ipset.sh
/usr/share/shadowsocksr/gfw2ipset.sh $switch_server
else
/usr/bin/ssr-rules -f
fi
else
awk '!/^$/&&!/^#/{printf("address=/%s/''\n",$0)}' /etc/ssr/deny.list >/tmp/dnsmasq.ssr/denylist.conf
if [ "$(uci_get_by_type global adblock 0)" == "1" ]; then
[ "$1" == "" ] && cp -f /etc/ssr/ad.conf /tmp/dnsmasq.ssr/
if [ -f "/tmp/dnsmasq.ssr/ad.conf" ]; then
for line in $(cat /etc/ssr/black.list); do sed -i "/$line/d" /tmp/dnsmasq.ssr/ad.conf; done
for line in $(cat /etc/ssr/white.list); do sed -i "/$line/d" /tmp/dnsmasq.ssr/ad.conf; done
for line in $(cat /etc/ssr/deny.list); do sed -i "/$line/d" /tmp/dnsmasq.ssr/ad.conf; done
fi
fi
fi
/etc/init.d/dnsmasq restart >/dev/null 2>&1
start_server

View File

@ -1,10 +1,15 @@
#!/bin/sh
NAME=shadowsocksr
switch_server=$1
uci_get_by_type() {
local ret=$(uci get $NAME.@$1[0].$2 2>/dev/null)
echo ${ret:=$3}
}
GLOBAL_SERVER=$(uci_get_by_type global global_server)
if [ -z "$switch_server" ]; then
GLOBAL_SERVER=$(uci_get_by_type global global_server nil)
else
GLOBAL_SERVER=$switch_server
fi
NETFLIX_SERVER=$(uci_get_by_type global netflix_server nil)
[ "$NETFLIX_SERVER" == "same" ] && NETFLIX_SERVER=$GLOBAL_SERVER
if [ "$NETFLIX_SERVER" != "nil" ]; then

View File

@ -1,26 +0,0 @@
#!/bin/sh /etc/rc.common
START=99
SERVICE_WRITE_PID=1
SERVICE_DAEMONIZE=1
start() {
logger -t TTYD 'Starting ttyd service'
service_start /usr/bin/ttyd -i br-lan /bin/login
return 0
}
stop() {
if [ -n "`pidof ttyd`" ]; then
logger -t TTYD 'Shutting down ttyd service'
service_stop /usr/bin/ttyd
fi
return 0
}
restart() {
logger -t TTYD 'Restarting ttyd service'
stop
sleep 2
start
}

View File

@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=wolfssl
PKG_VERSION:=4.4.0-stable
PKG_RELEASE:=2
PKG_VERSION:=4.5.0-stable
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/wolfSSL/wolfssl/archive/v$(PKG_VERSION)
PKG_HASH:=7f854804c8ae0ca49cc77809e38e9a3b5a8c91ba7855ea928e6d6651b0d35f18
PKG_HASH:=7de62300ce14daa0051bfefc7c4d6302f96cabc768b6ae49eda77523b118250c
PKG_FIXUP:=libtool
PKG_INSTALL:=1

View File

@ -1,6 +1,6 @@
--- a/wolfssl/wolfcrypt/settings.h
+++ b/wolfssl/wolfcrypt/settings.h
@@ -1930,7 +1930,7 @@ extern void uITRON4_free(void *p) ;
@@ -2128,7 +2128,7 @@ extern void uITRON4_free(void *p) ;
#endif
/* warning for not using harden build options (default with ./configure) */

View File

@ -0,0 +1,27 @@
From b90acc91d0cd276befe7f08f87ba2dc5ee7122ff Mon Sep 17 00:00:00 2001
From: Tesfa Mael <tesfa@wolfssl.com>
Date: Wed, 26 Aug 2020 10:13:06 -0700
Subject: [PATCH] Make ByteReverseWords available for big and little endian
---
wolfcrypt/src/misc.c | 2 --
1 file changed, 2 deletions(-)
--- a/wolfcrypt/src/misc.c
+++ b/wolfcrypt/src/misc.c
@@ -120,7 +120,6 @@ WC_STATIC WC_INLINE word32 ByteReverseWo
return rotlFixed(value, 16U);
#endif
}
-#if defined(LITTLE_ENDIAN_ORDER)
/* This routine performs a byte swap of words array of a given count. */
WC_STATIC WC_INLINE void ByteReverseWords(word32* out, const word32* in,
word32 byteCount)
@@ -131,7 +130,6 @@ WC_STATIC WC_INLINE void ByteReverseWord
out[i] = ByteReverseWord32(in[i]);
}
-#endif /* LITTLE_ENDIAN_ORDER */
#if defined(WORD64_AVAILABLE) && !defined(WOLFSSL_NO_WORD64_OPS)

View File

@ -21,6 +21,7 @@ config dnsmasq
#list bogusnxdomain '64.94.110.11'
option localservice 1 # disable to allow DNS requests from non-local subnets
option filter_aaaa 0
option dns_redirect 1
config dhcp lan
option interface lan

View File

@ -1084,6 +1084,10 @@ dnsmasq_start()
procd_add_jail_mount_rw /var/run/dnsmasq/ $leasefile
procd_close_instance
config_get_bool dns_redirect "$cfg" dns_redirect 0
config_get dns_port "$cfg" port 53
[ "$dns_redirect" = 1 ] && iptables -t nat -A PREROUTING -m comment --comment "DNSMASQ" -p udp --dport 53 -j REDIRECT --to-ports $dns_port
}
dnsmasq_stop()
@ -1101,6 +1105,23 @@ dnsmasq_stop()
rm -f ${BASEDHCPSTAMPFILE}.${cfg}.*.dhcp
}
iptables_clear()
{
nums=$(iptables -t nat -n -L PREROUTING 2>/dev/null | grep -c "DNSMASQ")
if [ -n "$nums" ]; then
until [ "$nums" = 0 ]
do
rules=$(iptables -t nat -n -L PREROUTING --line-num 2>/dev/null | grep "DNSMASQ" | awk '{print $1}')
for rule in $rules
do
iptables -t nat -D PREROUTING $rule 2> /dev/null
break
done
nums=$(expr $nums - 1)
done
fi
}
add_interface_trigger()
{
local interface ignore
@ -1153,6 +1174,7 @@ start_service() {
}
reload_service() {
iptables_clear
rc_procd start_service "$@"
procd_send_signal dnsmasq "$@"
}
@ -1179,4 +1201,5 @@ stop_service() {
else
config_foreach dnsmasq_stop dnsmasq
fi
iptables_clear
}

View File

@ -0,0 +1,31 @@
From 510d98157f21dee5793c4e975fde3317b6139267 Mon Sep 17 00:00:00 2001
From: Daniel Stenberg <daniel@haxx.se>
Date: Mon, 24 Aug 2020 16:28:34 +0200
Subject: [PATCH] configure: fix pkg-config detecting wolfssl
When amending the include path with "/wolfssl", this now properly strips
off all whitespace from the path variable! Previously this would lead to
pkg-config builds creating bad command lines.
Closes #5848
---
configure.ac | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
--- a/configure.ac
+++ b/configure.ac
@@ -2474,8 +2474,12 @@ if test -z "$ssl_backends" -o "x$OPT_WOL
AC_DEFINE(HAVE_WOLFSSL_DES_ECB_ENCRYPT, 1,
[if you have wolfSSL_DES_ecb_encrypt])
if test -n "$addcflags"; then
- CPPFLAGS="$addcflags/wolfssl $CPPFLAGS"
- AC_MSG_NOTICE([Add $addcflags/wolfssl to CPPFLAGS])
+ dnl use a for loop to strip off whitespace
+ for f in $addcflags; do
+ CPPFLAGS="$f/wolfssl $CPPFLAGS"
+ AC_MSG_NOTICE([Add $f/wolfssl to CPPFLAGS])
+ break
+ done
else
dnl user didn't give a path, so guess/hope they installed wolfssl
dnl headers to system default location

View File

@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=mtd-utils
PKG_VERSION:=2.1.1
PKG_VERSION:=2.1.2
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=ftp://ftp.infradead.org/pub/mtd-utils/
PKG_HASH:=8d15e8b70f036d6af1a66011f8ca0e048e9675fa7983d33bea92c24313a232d2
PKG_HASH:=8ad4c5f34716d40646aa28724a2f5616d325a6f119254f914e26976f1f76e9d6
PKG_INSTALL:=1
PKG_FIXUP:=autoreconf

View File

@ -5015,7 +5015,7 @@
+}
--- a/jffsX-utils/mkfs.jffs2.c
+++ b/jffsX-utils/mkfs.jffs2.c
@@ -1666,11 +1666,11 @@ int main(int argc, char **argv)
@@ -1667,11 +1667,11 @@ int main(int argc, char **argv)
}
erase_block_size *= units;

View File

@ -7,11 +7,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=mtd-utils
PKG_VERSION:=2.1.1
PKG_VERSION:=2.1.2
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=ftp://ftp.infradead.org/pub/mtd-utils/
PKG_HASH:=8d15e8b70f036d6af1a66011f8ca0e048e9675fa7983d33bea92c24313a232d2
PKG_HASH:=8ad4c5f34716d40646aa28724a2f5616d325a6f119254f914e26976f1f76e9d6
PKG_FIXUP:=autoreconf

View File

@ -1,6 +1,6 @@
--- a/jffsX-utils/mkfs.jffs2.c
+++ b/jffsX-utils/mkfs.jffs2.c
@@ -427,7 +427,7 @@ static int interpret_table_entry(struct
@@ -428,7 +428,7 @@ static int interpret_table_entry(struct
if (sscanf (line, "%" SCANF_PREFIX "s %c %lo %lu %lu %lu %lu %lu %lu %lu",
SCANF_STRING(name), &type, &mode, &uid, &gid, &major, &minor,

View File

@ -70,7 +70,7 @@
#include <sys/types.h>
--- a/ubifs-utils/mkfs.ubifs/mkfs.ubifs.c
+++ b/ubifs-utils/mkfs.ubifs/mkfs.ubifs.c
@@ -1503,6 +1503,7 @@ static int add_inode(struct stat *st, in
@@ -1549,6 +1549,7 @@ static int add_inode(struct stat *st, in
if (c->default_compr != UBIFS_COMPR_NONE)
use_flags |= UBIFS_COMPR_FL;
@ -78,7 +78,7 @@
if (flags & FS_COMPR_FL)
use_flags |= UBIFS_COMPR_FL;
if (flags & FS_SYNC_FL)
@@ -1515,6 +1516,7 @@ static int add_inode(struct stat *st, in
@@ -1561,6 +1562,7 @@ static int add_inode(struct stat *st, in
use_flags |= UBIFS_DIRSYNC_FL;
if (fctx)
use_flags |= UBIFS_CRYPT_FL;
@ -86,7 +86,7 @@
memset(ino, 0, UBIFS_INO_NODE_SZ);
ino_key_init(&key, inum);
@@ -1600,7 +1602,9 @@ static int add_dir_inode(const char *pat
@@ -1646,7 +1648,9 @@ static int add_dir_inode(const char *pat
fd = dirfd(dir);
if (fd == -1)
return sys_err_msg("dirfd failed");
@ -96,7 +96,7 @@
flags = 0;
}
@@ -1811,6 +1815,7 @@ static int add_file(const char *path_nam
@@ -1857,6 +1861,7 @@ static int add_file(const char *path_nam
dn->ch.node_type = UBIFS_DATA_NODE;
key_write(&key, &dn->key);
out_len = NODE_BUFFER_SIZE - UBIFS_DATA_NODE_SZ;
@ -104,7 +104,7 @@
if (c->default_compr == UBIFS_COMPR_NONE &&
!c->encrypted && (flags & FS_COMPR_FL))
#ifdef WITHOUT_LZO
@@ -1819,6 +1824,7 @@ static int add_file(const char *path_nam
@@ -1865,6 +1870,7 @@ static int add_file(const char *path_nam
use_compr = UBIFS_COMPR_LZO;
#endif
else
@ -112,7 +112,7 @@
use_compr = c->default_compr;
compr_type = compress_data(buf, bytes_read, &dn->data,
&out_len, use_compr);
@@ -1876,7 +1882,9 @@ static int add_non_dir(const char *path_
@@ -1924,7 +1930,9 @@ static int add_non_dir(const char *path_
if (fd == -1)
return sys_err_msg("failed to open file '%s'",
path_name);

View File

@ -5015,7 +5015,7 @@
+}
--- a/jffsX-utils/mkfs.jffs2.c
+++ b/jffsX-utils/mkfs.jffs2.c
@@ -1666,11 +1666,11 @@ int main(int argc, char **argv)
@@ -1667,11 +1667,11 @@ int main(int argc, char **argv)
}
erase_block_size *= units;

View File

@ -77,7 +77,7 @@
out_free:
--- a/include/libubigen.h
+++ b/include/libubigen.h
@@ -188,6 +188,9 @@ int ubigen_write_layout_vol(const struct
@@ -187,6 +187,9 @@ int ubigen_write_layout_vol(const struct
long long ec1, long long ec2,
struct ubi_vtbl_record *vtbl, int fd);

View File

@ -9,7 +9,7 @@
int target_endian = __BYTE_ORDER;
static uint32_t find_hardlink(struct filesystem_entry *e)
@@ -250,8 +250,8 @@ static struct filesystem_entry *add_host
@@ -251,8 +251,8 @@ static struct filesystem_entry *add_host
mode &= ~(S_ISUID | S_ISGID);
}
}
@ -20,7 +20,7 @@
}
entry = xcalloc(1, sizeof(struct filesystem_entry));
@@ -1557,6 +1557,20 @@ static void parse_image(void){
@@ -1558,6 +1558,20 @@ static void parse_image(void){
close(in_fd);
}
@ -41,7 +41,7 @@
int main(int argc, char **argv)
{
int c, opt;
@@ -1575,6 +1589,7 @@ int main(int argc, char **argv)
@@ -1576,6 +1590,7 @@ int main(int argc, char **argv)
warn_page_size = 1; /* warn user if page size not 4096 */
jffs2_compressors_init();
@ -49,7 +49,7 @@
while ((opt = getopt_long(argc, argv,
"D:d:r:s:o:qUPfh?vVe:lbp::nc:m:x:X:Lty:i:", long_options, &c)) >= 0)
@@ -1625,7 +1640,7 @@ int main(int argc, char **argv)
@@ -1626,7 +1641,7 @@ int main(int argc, char **argv)
break;
case 'f':