From a8c4037fe8a97515ca9aa8776e247022d75e0068 Mon Sep 17 00:00:00 2001 From: chinky Date: Mon, 23 Oct 2023 12:12:36 +0000 Subject: [PATCH] init --- LICENSE | 201 ++++++++++++++++++ README.md | 44 ++++ ddns-go/Makefile | 62 ++++++ ddns-go/file/ddns-go.init | 46 ++++ ddns-go/file/luci-ddns-go.uci-default | 7 + luci-app-ddns-go/Makefile | 23 ++ luci-app-ddns-go/README.md | 118 ++++++++++ .../luasrc/controller/ddns-go.lua | 23 ++ luci-app-ddns-go/luasrc/model/cbi/ddns-go.lua | 30 +++ luci-app-ddns-go/luasrc/view/ddns-go.htm | 22 ++ .../luasrc/view/ddns-go_status.htm | 27 +++ luci-app-ddns-go/po/zh-cn/ddns-go.po | 40 ++++ luci-app-ddns-go/po/zh_Hans | 1 + luci-app-ddns-go/root/etc/config/ddns-go | 5 + .../root/etc/ddns-go/ddns-go-config.yaml | 27 +++ luci-app-ddns-go/root/etc/ddns-go/localtime | Bin 0 -> 561 bytes .../usr/share/ddns-go/ddns-go-default.yaml | 27 +++ .../share/rpcd/acl.d/luci-app-ddns-go.json | 11 + sms-tool/Makefile | 30 +++ 19 files changed, 744 insertions(+) create mode 100644 LICENSE create mode 100644 README.md create mode 100644 ddns-go/Makefile create mode 100644 ddns-go/file/ddns-go.init create mode 100644 ddns-go/file/luci-ddns-go.uci-default create mode 100644 luci-app-ddns-go/Makefile create mode 100644 luci-app-ddns-go/README.md create mode 100644 luci-app-ddns-go/luasrc/controller/ddns-go.lua create mode 100644 luci-app-ddns-go/luasrc/model/cbi/ddns-go.lua create mode 100644 luci-app-ddns-go/luasrc/view/ddns-go.htm create mode 100644 luci-app-ddns-go/luasrc/view/ddns-go_status.htm create mode 100644 luci-app-ddns-go/po/zh-cn/ddns-go.po create mode 100644 luci-app-ddns-go/po/zh_Hans create mode 100644 luci-app-ddns-go/root/etc/config/ddns-go create mode 100644 luci-app-ddns-go/root/etc/ddns-go/ddns-go-config.yaml create mode 100644 luci-app-ddns-go/root/etc/ddns-go/localtime create mode 100644 luci-app-ddns-go/root/usr/share/ddns-go/ddns-go-default.yaml create mode 100644 luci-app-ddns-go/root/usr/share/rpcd/acl.d/luci-app-ddns-go.json create mode 100644 sms-tool/Makefile diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/README.md b/README.md new file mode 100644 index 0000000..8574b97 --- /dev/null +++ b/README.md @@ -0,0 +1,44 @@ +![kenzo github stats](https://github-readme-stats.vercel.app/api?username=kenzok8&show_icons=true&theme=merko) +
+

同步上游分支代码

+ + + + + +
+ + +#### small-package + +* 常用OpenWrt软件包源码合集,同步上游更新! + +* 关于有好的插件请在issues提交 + +* 感谢以上github仓库所有者! + +##### 插件下载: + +[![GitHub release (latest by date)](https://img.shields.io/github/v/release/kenzok8/compile-package?style=for-the-badge&label=插件更新下载)](https://github.com/kenzok8/compile-package/releases/latest) + +#### 使用方式: + +```bash + sed -i '$a src-git smpackage https://github.com/kenzok8/small-package' feeds.conf.default +``` +对于强迫症的同学(有报错信息、或Lean源码编译出错的情况),请尝试删除冲突的插件 + +```bash +rm -rf feeds/smpackage/{base-files,dnsmasq,firewall*,fullconenat,libnftnl,nftables,ppp,opkg,ucl,upx,vsftpd-alt,miniupnpd-iptables,wireless-regdb} +``` + + + + + + + + + + + diff --git a/ddns-go/Makefile b/ddns-go/Makefile new file mode 100644 index 0000000..1ecbbb0 --- /dev/null +++ b/ddns-go/Makefile @@ -0,0 +1,62 @@ +# SPDX-License-Identifier: GPL-3.0-only +# +# Copyright (C) 2021-2023 sirpdboy +# +# This is free software, licensed under the Apache License, Version 2.0 . +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=ddns-go +PKG_VERSION:=5.6.3 +PKG_RELEASE:=1 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://github.com/jeessy2/ddns-go.git +PKG_MIRROR_HASH:=f0c87a4f9982b85d62295bed4fbd4805671f5d6d45a03857b7cc257c00615bed +PKG_SOURCE_VERSION:=5b77583b498dc2e893cd77533b5a15c0e1620aef + +PKG_LICENSE:=AGPL-3.0-only +PKG_LICENSE_FILES:=LICENSE +PKG_MAINTAINER:=herboy2008 + +PKG_BUILD_DEPENDS:=golang/host +PKG_BUILD_PARALLEL:=1 +PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 + +GO_PKG:=github.com/jeessy2/ddns-go/v5 +GO_PKG_LDFLAGS_X:=main.version=$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk + +define Package/ddns-go + TITLE:=A Linux web GUI client of ddns-go + SECTION:=net + CATEGORY:=Network + SUBMENU:=Web Servers/Proxies + DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle + URL:=https://github.com/jeessy2/ddns-go + USERID:=ddns-go:ddns-go +endef + +define Package/ddns-go/description + ddns-go is a automatically obtain your public IPv4 or IPv6 address and resolve it to the corresponding domain name service, + support Alidns Dnspod Cloudflare Hicloud Callback Baiducloud porkbun GoDaddy Google Domains. +endef + + +define Package/ddns-go/install + $(call GoPackage/Package/Install/Bin,$(1)) + + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./file/ddns-go.init $(1)/etc/init.d/ddns-go + + $(INSTALL_DIR) $(1)/etc/uci-defaults + $(INSTALL_BIN) ./file/luci-ddns-go.uci-default $(1)/etc/uci-defaults/luci-ddns-go +endef + +$(eval $(call GoBinPackage,ddns-go)) +$(eval $(call BuildPackage,ddns-go)) diff --git a/ddns-go/file/ddns-go.init b/ddns-go/file/ddns-go.init new file mode 100644 index 0000000..d845dc5 --- /dev/null +++ b/ddns-go/file/ddns-go.init @@ -0,0 +1,46 @@ +#!/bin/sh /etc/rc.common +# +# Copyright (C) 2021-2023 sirpdboy https://github.com/sirpdboy/luci-app-ddns-go +# +# This file is part of ddns-go . +# +# This is free software, licensed under the Apache License, Version 2.0 . +# + + +START=99 +USE_PROCD=1 + +PROG=/usr/bin/ddns-go +CONFDIR=/etc/ddns-go +CONF=$CONFDIR/ddns-go-config.yaml + +get_config() { + config_get_bool enabled $1 enabled 1 + config_get_bool logger $1 logger 1 + config_get port $1 port 9876 + config_get time $1 time 300 +} + +init_yaml(){ + [ -d $CONFDIR ] || mkdir -p $CONFDIR 2>/dev/null + cat /usr/share/ddns-go/ddns-go-default.yaml > $CONF +} + +start_service() { + config_load ddns-go + config_foreach get_config basic + [ x$enabled == x1 ] || return 1 + [ -s ${CONF} ] || init_yaml + logger -t ddns-go -p warn "ddns-go is start." + echo "ddns-go is start." + procd_open_instance + procd_set_param command $PROG -l :$port -f $time -c "$CONF" + [ "x$logger" == x1 ] && procd_set_param stderr 1 + procd_set_param respawn + procd_close_instance +} + +service_triggers() { + procd_add_reload_trigger "ddns-go" +} diff --git a/ddns-go/file/luci-ddns-go.uci-default b/ddns-go/file/luci-ddns-go.uci-default new file mode 100644 index 0000000..0c01cac --- /dev/null +++ b/ddns-go/file/luci-ddns-go.uci-default @@ -0,0 +1,7 @@ +#!/bin/sh + +[ -s "/etc/ddns-go/localtime" ] && mv -f /etc/ddns-go/localtime /etc/localtime +/etc/init.d/ddns-go enable +/etc/init.d/ddns-go start +rm -f /tmp/luci* +exit 0 diff --git a/luci-app-ddns-go/Makefile b/luci-app-ddns-go/Makefile new file mode 100644 index 0000000..daca91a --- /dev/null +++ b/luci-app-ddns-go/Makefile @@ -0,0 +1,23 @@ +# SPDX-License-Identifier: GPL-3.0-only +# +# Copyright (C) 2021-2022 sirpdboy https://github.com/sirpdboy/luci-app-ddns-go +# +# This is free software, licensed under the Apache License, Version 2.0 . +# +include $(TOPDIR)/rules.mk + +PKG_NAME:=luci-app-ddns-go +PKG_VERSION:=1.3.2 +PKG_RELEASE:=10 + +LUCI_TITLE:=LuCI Support for Dynamic ddns-go Client +LUCI_DEPENDS:=+ddns-go +LUCI_PKGARCH:=all + +define Package/$(PKG_NAME)/conffiles +/etc/config/ddns-go +/etc/ddns-go/ddns-go-config.yaml +endef + +include $(TOPDIR)/feeds/luci/luci.mk +# call BuildPackage - OpenWrt buildroot signature diff --git a/luci-app-ddns-go/README.md b/luci-app-ddns-go/README.md new file mode 100644 index 0000000..8665ed6 --- /dev/null +++ b/luci-app-ddns-go/README.md @@ -0,0 +1,118 @@ +## 访问数:![hello](https://views.whatilearened.today/views/github/sirpdboy/deplives.svg)[![](https://img.shields.io/badge/TG群-点击加入-FFFFFF.svg)](https://t.me/joinchat/AAAAAEpRF88NfOK5vBXGBQ) +### 访问数:[![](https://visitor-badge.glitch.me/badge?page_id=sirpdboy-visitor-badge)] [![](https://img.shields.io/badge/TG群-点击加入-FFFFFF.svg)](https://t.me/joinchat/AAAAAEpRF88NfOK5vBXGBQ) + +欢迎来到sirpdboy的源码仓库! += +# luci-app-ddns-go + +luci-app-ddns-go 自动获得你的公网 IPv4 或 IPv6 地址,并解析到对应的域名服务。支持的域名服务商 Alidns(阿里云) Dnspod(腾讯云) Cloudflare 华为云 Callback 百度云 porkbun GoDaddy + +[![若部分图片无法正常显示,请挂上机场浏览或点这里到末尾看修复教程](https://visitor-badge.glitch.me/badge?page_id=sirpdboy-visitor-badge)](#解决-github-网页上图片显示失败的问题) [![](https://img.shields.io/badge/TG群-点击加入-FFFFFF.svg)](https://t.me/joinchat/AAAAAEpRF88NfOK5vBXGBQ) + +[luci-app-ddns-go ddns-go动态域名插件](https://github.com/sirpdboy/luci-app-ddns-go) + +====================== + + +请 **认真阅读完毕** 本页面,本页面包含注意事项和如何使用。 + +## 功能说明: + +### ddns-go动态域名插件 +#### 自动获得你的公网 IPv4 或 IPv6 地址,并解析到对应的域名服务。 + + + +- [ddns-go](#ddns-go) + - [特性](#特性) + - [使用方法](#使用方法) + - [说明](#说明) + - [界面](#界面) + - [捐助](#捐助) + + + +## 特性 + +- 支持Mac、Windows、Linux系统,支持ARM、x86架构 +- 支持的域名服务商 `Alidns(阿里云)` `Dnspod(腾讯云)` `Cloudflare` `华为云` `Callback` `百度云` `porkbun` `GoDaddy` +- 支持接口/网卡获取IP +- 支持以服务的方式运行 +- 默认间隔5分钟同步一次 +- 支持多个域名同时解析,公司必备 +- 支持多级域名 +- 网页中配置,简单又方便,可设置 `登录用户名和密码` / `禁止从公网访问` +- 网页中方便快速查看最近50条日志,不需要跑docker中查看 +- 支持webhook通知 +- 支持TTL +- 支持部分dns服务商传递自定义参数,实现地域解析等功能 + +## 使用方法 + +- 将luci-app-ddns-go添加至 LEDE/OpenWRT 源码的方法。 + +### 下载源码方法: + + ```Brach + + # 下载源码 + + git clone https://github.com/sirpdboy/luci-app-ddns-go.git package/ddns-go + make menuconfig + + ``` +### 配置菜单 + + ```Brach + make menuconfig + # 找到 LuCI -> Applications, 选择 luci-app-ddns-go, 保存后退出。 + ``` + +### 编译 + + ```Brach + # 编译固件 + make package/ddns-go/luci-app-ddns-go/compile V=s + ``` + +## 说明 + +-源码来源:https://github.com/sirpdboy/luci-app-ddns-go +-你可以随意使用其中的源码,但请注明出处。 + +============================ + +## 界面 + +![screenshots](https://raw.githubusercontent.com/jeessy2/ddns-go/master/ddns-web.png) + + +# My other project + +网络速度测试 :https://github.com/sirpdboy/NetSpeedTest + +定时设置插件 : https://github.com/sirpdboy/luci-app-autotimeset + +关机功能插件 : https://github.com/sirpdboy/luci-app-poweroffdevice + +opentopd主题 : https://github.com/sirpdboy/luci-theme-opentopd + +opentoks 主题: https://github.com/sirpdboy/luci-theme-opentoks [仿KOOLSAHRE主题] + +btmob 主题: https://github.com/sirpdboy/luci-theme-btmob + +系统高级设置 : https://github.com/sirpdboy/luci-app-advanced + +## 捐助 + +-如果你觉得此项目对你有帮助,请捐助我们,以使项目能持续发展,更加完善。··请作者喝杯咖啡~~~** +-你们的支持就是我的动力!** + +| 图飞了😂 | 图飞了😂 | +| :-----------------: | :-------------: | +|![xm1](https://raw.githubusercontent.com/sirpdboy/openwrt/master/doc/支付宝.png) | ![xm1](https://raw.githubusercontent.com/sirpdboy/openwrt/master/doc/微信.png) | + + + 图飞了😂 + + diff --git a/luci-app-ddns-go/luasrc/controller/ddns-go.lua b/luci-app-ddns-go/luasrc/controller/ddns-go.lua new file mode 100644 index 0000000..abafbce --- /dev/null +++ b/luci-app-ddns-go/luasrc/controller/ddns-go.lua @@ -0,0 +1,23 @@ +-- Copyright (C) 2021-2022 sirpdboy https://github.com/sirpdboy/luci-app-ddns-go +-- Licensed to the public under the Apache License 2.0. + +module("luci.controller.ddns-go", package.seeall) + +function index() + if not nixio.fs.access("/etc/config/ddns-go") then + return + end + + entry({"admin", "services", "ddns-go"}, alias("admin", "services", "ddns-go", "setting"),_("DDNS-GO"), 58).dependent = true + entry({"admin", "services", "ddns-go", "setting"}, cbi("ddns-go"), _("Base Setting"), 20).leaf=true + entry({"admin", "services", "ddns-go", "ddns-go"}, template("ddns-go"), _("DDNS-GO"), 30).leaf = true + entry({"admin", "services", "ddnsgo_status"}, call("act_status")) +end + +function act_status() + local sys = require "luci.sys" + local e = { } + e.running = sys.call("pidof ddns-go >/dev/null") == 0 + luci.http.prepare_content("application/json") + luci.http.write_json(e) +end diff --git a/luci-app-ddns-go/luasrc/model/cbi/ddns-go.lua b/luci-app-ddns-go/luasrc/model/cbi/ddns-go.lua new file mode 100644 index 0000000..d0cf7e4 --- /dev/null +++ b/luci-app-ddns-go/luasrc/model/cbi/ddns-go.lua @@ -0,0 +1,30 @@ +-- Copyright (C) 2021-2022 sirpdboy https://github.com/sirpdboy/luci-app-ddns-go + +local m, s ,o + +m = Map("ddns-go") +m.title = translate("DDNS-GO") +m.description = translate("DDNS-GO automatically obtains your public IPv4 or IPv6 address and resolves it to the corresponding domain name service.")..translate("
For specific usage, see:")..translate("GitHub @sirpdboy/luci-app-ddns-go ") + +m:section(SimpleSection).template = "ddns-go_status" + +s = m:section(TypedSection, "basic", translate("Global Settings")) +s.addremove = false +s.anonymous = true + +o = s:option(Flag,"enabled",translate("Enable")) +o.default = 0 + +o = s:option(Value, "port",translate("Set the DDNS-TO access port")) +o.datatype = "uinteger" +o.default=9876 + +o = s:option(Value, "time",translate("update interval")) +o.default=300 + +m.apply_on_parse = true +m.on_after_apply = function(self,map) + luci.sys.exec("/etc/init.d/ddns-go restart") +end + +return m diff --git a/luci-app-ddns-go/luasrc/view/ddns-go.htm b/luci-app-ddns-go/luasrc/view/ddns-go.htm new file mode 100644 index 0000000..2dd5c70 --- /dev/null +++ b/luci-app-ddns-go/luasrc/view/ddns-go.htm @@ -0,0 +1,22 @@ +<%# + Copyright 2021-2022 sirpdboy Wich + https://github.com/sirpdboy/luci-app-ddns-go + Licensed to the public under the Apache License 2.0. +-%> + +<%+header%> +
+ + + +
+ +<%+footer%> diff --git a/luci-app-ddns-go/luasrc/view/ddns-go_status.htm b/luci-app-ddns-go/luasrc/view/ddns-go_status.htm new file mode 100644 index 0000000..35a0135 --- /dev/null +++ b/luci-app-ddns-go/luasrc/view/ddns-go_status.htm @@ -0,0 +1,27 @@ + + +
+ <%:DDNS-GO Status%> +

+ <%:Collecting data...%> +

+
diff --git a/luci-app-ddns-go/po/zh-cn/ddns-go.po b/luci-app-ddns-go/po/zh-cn/ddns-go.po new file mode 100644 index 0000000..047e6e0 --- /dev/null +++ b/luci-app-ddns-go/po/zh-cn/ddns-go.po @@ -0,0 +1,40 @@ +msgid "" +msgstr "Content-Type: text/plain; charset=UTF-8" + +msgid "DDNS-GO" +msgstr "DDNS-GO" + +msgid "DDNS-GO automatically obtains your public IPv4 or IPv6 address and resolves it to the corresponding domain name service." +msgstr "DDNS-GO自动获得你的公网 IPv4 或 IPv6 地址,并解析到对应的域名服务." + +msgid "Base Setting" +msgstr "基本设置" + +msgid "Running state" +msgstr "运行状态" + +msgid "The DDNS-GO service is running." +msgstr "DDNS-GO服务已启动" + +msgid "The DDNS-GO service is not running." +msgstr "DDNS-GO服务未启动" + +msgid "DDNS-GO Status" +msgstr "DDNS-GO服务状态" + +msgid "Click the new page to open ddns-go" +msgstr "点击打开ddns-go后台" + +msgid "Set the DDNS-TO access port" +msgstr "设置访问端口" + +msgid "
For specific usage, see:" +msgstr "
具体使用方法参见:" + +msgid "Collecting data..." +msgstr "收集数据..." + +msgid "update interval" +msgstr "更新间隔" + + diff --git a/luci-app-ddns-go/po/zh_Hans b/luci-app-ddns-go/po/zh_Hans new file mode 100644 index 0000000..41451e4 --- /dev/null +++ b/luci-app-ddns-go/po/zh_Hans @@ -0,0 +1 @@ +zh-cn \ No newline at end of file diff --git a/luci-app-ddns-go/root/etc/config/ddns-go b/luci-app-ddns-go/root/etc/config/ddns-go new file mode 100644 index 0000000..1237772 --- /dev/null +++ b/luci-app-ddns-go/root/etc/config/ddns-go @@ -0,0 +1,5 @@ +config basic + option enabled '0' + option logger '1' + option port 9876 + option time 300 \ No newline at end of file diff --git a/luci-app-ddns-go/root/etc/ddns-go/ddns-go-config.yaml b/luci-app-ddns-go/root/etc/ddns-go/ddns-go-config.yaml new file mode 100644 index 0000000..74b2fd1 --- /dev/null +++ b/luci-app-ddns-go/root/etc/ddns-go/ddns-go-config.yaml @@ -0,0 +1,27 @@ +ipv4: + enable: true + gettype: url + url: https://myip4.ipip.net, https://ddns.oray.com/checkip, https://ip.3322.net + netinterface: br-lan + domains: + - "" +ipv6: + enable: false + gettype: url + url: https://myip6.ipip.net, https://speed.neu6.edu.cn/getIP.php, https://v6.ident.me + netinterface: "" + ipv6reg: "" + domains: + - "" +dns: + name: alidns + id: "" + secret: "" +user: + username: "" + password: "" +webhook: + webhookurl: "" + webhookrequestbody: "" +notallowwanaccess: true +ttl: "" diff --git a/luci-app-ddns-go/root/etc/ddns-go/localtime b/luci-app-ddns-go/root/etc/ddns-go/localtime new file mode 100644 index 0000000000000000000000000000000000000000..91f6f8bc2e234bafd484146986bdb289082c3588 GIT binary patch literal 561 zcmbu*zb^w}9LMo*sb7uZVlR)P+QDKF36WCLNNV90hMH8mol%_2lQ6N|X0Wt&|A0ig zYPz+k{ufWWnRwpMAJ9ZRm*-x?E%$l*C$;LT3_WT4b=2NzZC~|=C*8PAnz!SMZcTj$ zt?sL|$L>r!EJ$Z#%XIIr^!v`U`Pj?IXSr#5n@#x|uLk|}K=-#pGy8I==4y|zif-%k z``2;iyrCBIr}1LxMlH>RUUvCRWd{{6H&If#PQe>V40%K@diI|riW5nZK+9zLz?b5# zy+^+If0*`TPqbFdBNLIC$W&ym(@sWaJMDC2K9T^*fTTcjAW4ucNE)Zj!x|DHnUGXS cE+iR}4M~UOLlQb|MkJ;4e>qdO>B@TQ7g9&Lh5!Hn literal 0 HcmV?d00001 diff --git a/luci-app-ddns-go/root/usr/share/ddns-go/ddns-go-default.yaml b/luci-app-ddns-go/root/usr/share/ddns-go/ddns-go-default.yaml new file mode 100644 index 0000000..b077756 --- /dev/null +++ b/luci-app-ddns-go/root/usr/share/ddns-go/ddns-go-default.yaml @@ -0,0 +1,27 @@ +ipv4: + enable: true + gettype: url + url: https://4.ipw.cn,https://myip4.ipip.net,https://ddns.oray.com/checkip,https://ip.3322.net + netinterface: br-lan + domains: + - "" +ipv6: + enable: false + gettype: url + url: https://6.ipw.cn, https://speed.neu6.edu.cn/getIP.php, https://v6.ident.me + netinterface: "" + ipv6reg: "" + domains: + - "" +dns: + name: alidns + id: "" + secret: "" +user: + username: "" + password: "" +webhook: + webhookurl: "" + webhookrequestbody: "" +notallowwanaccess: true +ttl: "" diff --git a/luci-app-ddns-go/root/usr/share/rpcd/acl.d/luci-app-ddns-go.json b/luci-app-ddns-go/root/usr/share/rpcd/acl.d/luci-app-ddns-go.json new file mode 100644 index 0000000..7f919d2 --- /dev/null +++ b/luci-app-ddns-go/root/usr/share/rpcd/acl.d/luci-app-ddns-go.json @@ -0,0 +1,11 @@ +{ + "luci-app-ddns-go": { + "description": "Grant UCI access for luci-app-ddns-go", + "read": { + "uci": [ "ddns-go" ] + }, + "write": { + "uci": [ "ddns-go" ] + } + } +} diff --git a/sms-tool/Makefile b/sms-tool/Makefile new file mode 100644 index 0000000..1484608 --- /dev/null +++ b/sms-tool/Makefile @@ -0,0 +1,30 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=sms-tool +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=https://github.com/obsy/sms_tool +PKG_SOURCE_PROTO:=git +PKG_SOURCE_DATE:=2022-03-21 +PKG_SOURCE_VERSION:=f07699ab5189656f595ffa75872c8938bf4b40ac +PKG_MIRROR_HASH:=0d114a97eb7aeadd95b49281d29371ba0570382125c34f3f8668d34fd0290f46 + +include $(INCLUDE_DIR)/package.mk + +define Package/sms-tool + SECTION:=utils + CATEGORY:=Utilities + TITLE:=sms tool + URL:=https://github.com/obsy/sms_tool +endef + +define Package/sms-tool/description + SMS Tool for 3G/4G modem +endef + +define Package/sms-tool/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/sms_tool $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,sms-tool))