Merge Mainline
This commit is contained in:
commit
bf697e03ef
55
package/ctcgfw/sub-web/Makefile
Normal file
55
package/ctcgfw/sub-web/Makefile
Normal file
@ -0,0 +1,55 @@
|
||||
#
|
||||
# Copyright (C) 2020 CTCGFW Project-OpenWrt
|
||||
# (https://project-openwrt.eu.org)
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v3.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=sub-web
|
||||
PKG_VERSION:=1.0.0
|
||||
PKG_RELEASE:=5
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/CareyWang/sub-web.git
|
||||
PKG_SOURCE_DATE:=2021-01-07
|
||||
PKG_SOURCE_VERSION:=26d278800cc42025f8ceecff64b26f47b9fc2d14
|
||||
PKG_MIRROR_HASH:=a83f49aeecfa086ad8da3503b1ff95f8505845588839ed569d22fb0ced417b9f
|
||||
|
||||
PKG_LICENSE:=MIT
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
PKG_MAINTAINER:=CN_SZTL <cnsztl@project-openwrt.eu.org>
|
||||
|
||||
PKG_BUILD_DEPENDS:=node/host node-yarn/host
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/sub-web
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
URL:=https://github.com/CareyWang/sub-web
|
||||
TITLE:=A WebUI for generating proxy subscription url
|
||||
DEPENDS:=+subconverter
|
||||
PKGARCH:=all
|
||||
endef
|
||||
|
||||
define Package/sub-web/description
|
||||
Based on vue-cli and subconverter, for generating proxy subscription
|
||||
url automatically.
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
( \
|
||||
cd $(PKG_BUILD_DIR); \
|
||||
yarn install; \
|
||||
yarn build; \
|
||||
)
|
||||
endef
|
||||
|
||||
define Package/sub-web/install
|
||||
$(INSTALL_DIR) $(1)/www
|
||||
$(CP) $(PKG_BUILD_DIR)/dist $(1)/www/sub-web
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,sub-web))
|
||||
@ -0,0 +1,57 @@
|
||||
From 4359c358bd434d1d0b182a13a743881ee21e7d27 Mon Sep 17 00:00:00 2001
|
||||
From: CN_SZTL <cnsztl@project-openwrt.eu.org>
|
||||
Date: Mon, 11 Jan 2021 11:22:43 +0000
|
||||
Subject: [PATCH] dist: support run in curdir
|
||||
|
||||
As https://cli.vuejs.org/config/#vue-config-js said:
|
||||
```
|
||||
By default, Vue CLI assumes your app will be deployed at the root of
|
||||
a domain, e.g. https://www.my-app.com/. If your app is deployed at a
|
||||
sub-path, you will need to specify that sub-path using this option.
|
||||
For example, if your app is deployed at https://www.foobar.com/my-app/,
|
||||
set publicPath to '/my-app/'.
|
||||
|
||||
The value can also be set to an empty string ('') or a relative path (./)
|
||||
so that all assets are linked using relative paths. This allows the built
|
||||
bundle to be deployed under any public path, or used in a file system based
|
||||
environment like a Cordova hybrid app.
|
||||
```
|
||||
|
||||
Reference:
|
||||
- CareyWang/sub-web#38
|
||||
- CareyWang/sub-web#43
|
||||
|
||||
Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
|
||||
---
|
||||
src/router/index.js | 2 +-
|
||||
vue.config.js | 1 +
|
||||
2 files changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/router/index.js b/src/router/index.js
|
||||
index 643aa66..583fdd9 100644
|
||||
--- a/src/router/index.js
|
||||
+++ b/src/router/index.js
|
||||
@@ -5,7 +5,7 @@ Vue.use(VueRouter);
|
||||
|
||||
const routes = [
|
||||
{
|
||||
- path: "/",
|
||||
+ path: "*",
|
||||
name: "SubConverter",
|
||||
component: () => import("../views/Subconverter.vue")
|
||||
}
|
||||
diff --git a/vue.config.js b/vue.config.js
|
||||
index c4b040b..89b25db 100644
|
||||
--- a/vue.config.js
|
||||
+++ b/vue.config.js
|
||||
@@ -5,6 +5,7 @@ function resolve(dir) {
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
+ publicPath: '',
|
||||
css: {
|
||||
loaderOptions: {
|
||||
less: {
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@ -0,0 +1,128 @@
|
||||
From 0092ddca7faa480e07184c157e992badd4eef633 Mon Sep 17 00:00:00 2001
|
||||
From: CN_SZTL <cnsztl@project-openwrt.eu.org>
|
||||
Date: Mon, 11 Jan 2021 11:57:19 +0000
|
||||
Subject: [PATCH] views: add examples from ACL4SSR and Subconverter
|
||||
|
||||
Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
|
||||
---
|
||||
src/views/Subconverter.vue | 104 +++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 104 insertions(+)
|
||||
|
||||
diff --git a/src/views/Subconverter.vue b/src/views/Subconverter.vue
|
||||
index 701006f..d058719 100644
|
||||
--- a/src/views/Subconverter.vue
|
||||
+++ b/src/views/Subconverter.vue
|
||||
@@ -257,6 +257,110 @@ export default {
|
||||
},
|
||||
backendOptions: [{ value: "http://127.0.0.1:25500/sub?" }],
|
||||
remoteConfig: [
|
||||
+ {
|
||||
+ label: "默认",
|
||||
+ options: [
|
||||
+ {
|
||||
+ label: "不选,由接口提供方提供",
|
||||
+ value: ""
|
||||
+ }
|
||||
+ ]
|
||||
+ },
|
||||
+ {
|
||||
+ label: "ACL4SSR",
|
||||
+ options: [
|
||||
+ {
|
||||
+ label: "ACL4SSR_Online 默认版 分组比较全 (与Github同步)",
|
||||
+ value:
|
||||
+ "https://cdn.jsdelivr.net/gh/ACL4SSR/ACL4SSR@master/Clash/config/ACL4SSR_Online.ini"
|
||||
+ },
|
||||
+ {
|
||||
+ label: "ACL4SSR_Online_AdblockPlus 更多去广告 (与Github同步)",
|
||||
+ value:
|
||||
+ "https://cdn.jsdelivr.net/gh/ACL4SSR/ACL4SSR@master/Clash/config/ACL4SSR_Online_AdblockPlus.ini"
|
||||
+ },
|
||||
+ {
|
||||
+ label: "ACL4SSR_Online_NoAuto 无自动测速 (与Github同步)",
|
||||
+ value:
|
||||
+ "https://cdn.jsdelivr.net/gh/ACL4SSR/ACL4SSR@master/Clash/config/ACL4SSR_Online_NoAuto.ini"
|
||||
+ },
|
||||
+ {
|
||||
+ label: "ACL4SSR_Online_Mini 精简版 (与Github同步)",
|
||||
+ value:
|
||||
+ "https://cdn.jsdelivr.net/gh/ACL4SSR/ACL4SSR@master/Clash/config/ACL4SSR_Online_Mini.ini"
|
||||
+ },
|
||||
+ {
|
||||
+ label: "ACL4SSR_Online_Mini_AdblockPlus.ini 精简版 更多去广告 (与Github同步)",
|
||||
+ value:
|
||||
+ "https://cdn.jsdelivr.net/gh/ACL4SSR/ACL4SSR@master/Clash/config/ACL4SSR_Online_Mini_AdblockPlus.ini"
|
||||
+ },
|
||||
+ {
|
||||
+ label: "ACL4SSR_Online_Mini_NoAuto.ini 精简版 不带自动测速 (与Github同步)",
|
||||
+ value:
|
||||
+ "https://cdn.jsdelivr.net/gh/ACL4SSR/ACL4SSR@master/Clash/config/ACL4SSR_Online_Mini_NoAuto.ini"
|
||||
+ },
|
||||
+ {
|
||||
+ label: "ACL4SSR_Online_Mini_Fallback.ini 精简版 带故障转移 (与Github同步)",
|
||||
+ value:
|
||||
+ "https://cdn.jsdelivr.net/gh/ACL4SSR/ACL4SSR@master/Clash/config/ACL4SSR_Online_Mini_Fallback.ini"
|
||||
+ },
|
||||
+ {
|
||||
+ label: "ACL4SSR_Online_Mini_MultiMode.ini 精简版 自动测速、故障转移、负载均衡 (与Github同步)",
|
||||
+ value:
|
||||
+ "https://cdn.jsdelivr.net/gh/ACL4SSR/ACL4SSR@master/Clash/config/ACL4SSR_Online_Mini_MultiMode.ini"
|
||||
+ },
|
||||
+ {
|
||||
+ label: "ACL4SSR_Online_Full 全分组 重度用户使用 (与Github同步)",
|
||||
+ value:
|
||||
+ "https://cdn.jsdelivr.net/gh/ACL4SSR/ACL4SSR@master/Clash/config/ACL4SSR_Online_Full.ini"
|
||||
+ },
|
||||
+ {
|
||||
+ label: "ACL4SSR_Online_Full_AdblockPlus 全分组 重度用户使用 更多去广告 (与Github同步)",
|
||||
+ value:
|
||||
+ "https://cdn.jsdelivr.net/gh/ACL4SSR/ACL4SSR@master/Clash/config/ACL4SSR_Online_Full_AdblockPlus.ini"
|
||||
+ },
|
||||
+ {
|
||||
+ label: "ACL4SSR 本地 默认版 分组比较全",
|
||||
+ value: "config/ACL4SSR.ini"
|
||||
+ },
|
||||
+ {
|
||||
+ label: "ACL4SSR_Mini 本地 精简版",
|
||||
+ value: "config/ACL4SSR_Mini.ini"
|
||||
+ },
|
||||
+ {
|
||||
+ label: "ACL4SSR_Mini_NoAuto.ini 本地 精简版+无自动测速",
|
||||
+ value: "config/ACL4SSR_Mini_NoAuto.ini"
|
||||
+ },
|
||||
+ {
|
||||
+ label: "ACL4SSR_Mini_Fallback.ini 本地 精简版+fallback",
|
||||
+ value: "config/ACL4SSR_Mini_Fallback.ini"
|
||||
+ },
|
||||
+ {
|
||||
+ label: "ACL4SSR_BackCN 本地 回国",
|
||||
+ value: "config/ACL4SSR_BackCN.ini"
|
||||
+ },
|
||||
+ {
|
||||
+ label: "ACL4SSR_NoApple 本地 无苹果分流",
|
||||
+ value: "config/ACL4SSR_NoApple.ini"
|
||||
+ },
|
||||
+ {
|
||||
+ label: "ACL4SSR_NoAuto 本地 无自动测速 ",
|
||||
+ value: "config/ACL4SSR_NoAuto.ini"
|
||||
+ },
|
||||
+ {
|
||||
+ label: "ACL4SSR_NoAuto_NoApple 本地 无自动测速&无苹果分流",
|
||||
+ value: "config/ACL4SSR_NoAuto_NoApple.ini"
|
||||
+ },
|
||||
+ {
|
||||
+ label: "ACL4SSR_NoMicrosoft 本地 无微软分流",
|
||||
+ value: "config/ACL4SSR_NoMicrosoft.ini"
|
||||
+ },
|
||||
+ {
|
||||
+ label: "ACL4SSR_WithGFW 本地 GFW列表",
|
||||
+ value: "config/ACL4SSR_WithGFW.ini"
|
||||
+ }
|
||||
+ ]
|
||||
+ },
|
||||
{
|
||||
label: "universal",
|
||||
options: [
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=subconverter
|
||||
PKG_VERSION:=0.6.4
|
||||
PKG_RELEASE:=2
|
||||
PKG_RELEASE:=3
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/tindy2013/subconverter.git
|
||||
|
||||
@ -4,7 +4,7 @@ START=99
|
||||
USE_PROCD=1
|
||||
|
||||
BIN="/usr/bin/subconverter"
|
||||
CONF="/etc/subconverter/pref.ini"
|
||||
CONF="/etc/subconverter/pref.example.ini"
|
||||
LOG_FILE="/tmp/subconverter.log"
|
||||
|
||||
start_service() {
|
||||
@ -28,5 +28,6 @@ stop_service() {
|
||||
reload_service() {
|
||||
logger -t Subconverter 'Restarting Subconverter service'
|
||||
stop
|
||||
sleep 2s
|
||||
start
|
||||
}
|
||||
|
||||
@ -9,8 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=automount
|
||||
PKG_VERSION:=1
|
||||
PKG_RELEASE:=32
|
||||
PKG_ARCH:=all
|
||||
PKG_RELEASE:=33
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
@ -18,6 +17,7 @@ define Package/automount
|
||||
TITLE:=Mount autoconfig hotplug script.
|
||||
MAINTAINER:=Lean
|
||||
DEPENDS:=+block-mount +kmod-usb-storage +kmod-usb-storage-extras +!TARGET_ramips:kmod-usb-storage-uas +kmod-fs-vfat +kmod-fs-ext4 +kmod-fs-exfat +ntfs-3g
|
||||
PKGARCH:=all
|
||||
endef
|
||||
|
||||
define Package/automount/description
|
||||
|
||||
@ -9,8 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=autosamba
|
||||
PKG_VERSION:=1
|
||||
PKG_RELEASE:=11
|
||||
PKG_ARCH:=all
|
||||
PKG_RELEASE:=12
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
@ -18,6 +17,7 @@ define Package/autosamba
|
||||
TITLE:=Samba autoconfig hotplug script.
|
||||
MAINTAINER:=Lean
|
||||
DEPENDS:=+luci-app-samba +wsdd2
|
||||
PKGARCH:=all
|
||||
endef
|
||||
|
||||
define Package/autosamba/description
|
||||
|
||||
@ -35,9 +35,13 @@ end
|
||||
|
||||
local function gen_include()
|
||||
cmd(string.format("echo '#!/bin/sh' > /var/etc/%s.include", CONFIG))
|
||||
local function extract_rules(a)
|
||||
local function extract_rules(n, a)
|
||||
local _ipt = "iptables"
|
||||
if n == "6" then
|
||||
_ipt = "ip6tables"
|
||||
end
|
||||
local result = "*" .. a
|
||||
result = result .. "\n" .. sys.exec('iptables-save -t ' .. a .. ' | grep "PSW-SERVER" | sed -e "s/^-A \\(INPUT\\)/-I \\1 1/"')
|
||||
result = result .. "\n" .. sys.exec(_ipt .. '-save -t ' .. a .. ' | grep "PSW-SERVER" | sed -e "s/^-A \\(INPUT\\)/-I \\1 1/"')
|
||||
result = result .. "COMMIT"
|
||||
return result
|
||||
end
|
||||
@ -45,7 +49,11 @@ local function gen_include()
|
||||
if f and err == nil then
|
||||
f:write('iptables-save -c | grep -v "PSW-SERVER" | iptables-restore -c' .. "\n")
|
||||
f:write('iptables-restore -n <<-EOT' .. "\n")
|
||||
f:write(extract_rules("filter") .. "\n")
|
||||
f:write(extract_rules("4", "filter") .. "\n")
|
||||
f:write("EOT" .. "\n")
|
||||
f:write('ip6tables-save -c | grep -v "PSW-SERVER" | ip6tables-restore -c' .. "\n")
|
||||
f:write('ip6tables-restore -n <<-EOT' .. "\n")
|
||||
f:write(extract_rules("6", "filter") .. "\n")
|
||||
f:write("EOT" .. "\n")
|
||||
f:close()
|
||||
end
|
||||
@ -60,6 +68,8 @@ local function start()
|
||||
cmd(string.format("touch %s", LOG_APP_FILE))
|
||||
cmd("iptables -N PSW-SERVER")
|
||||
cmd("iptables -I INPUT -j PSW-SERVER")
|
||||
cmd("ip6tables -N PSW-SERVER")
|
||||
cmd("ip6tables -I INPUT -j PSW-SERVER")
|
||||
ucic:foreach(CONFIG, "user", function(user)
|
||||
local id = user[".name"]
|
||||
local enable = user.enable
|
||||
@ -136,8 +146,10 @@ local function start()
|
||||
local bind_local = user.bind_local or 0
|
||||
if bind_local and tonumber(bind_local) ~= 1 then
|
||||
cmd(string.format('iptables -A PSW-SERVER -p tcp --dport %s -m comment --comment "%s" -j ACCEPT', port, remarks))
|
||||
cmd(string.format('ip6tables -A PSW-SERVER -p tcp --dport %s -m comment --comment "%s" -j ACCEPT', port, remarks))
|
||||
if udp_forward == 1 then
|
||||
cmd(string.format('iptables -A PSW-SERVER -p udp --dport %s -m comment --comment "%s" -j ACCEPT', port, remarks))
|
||||
cmd(string.format('ip6tables -A PSW-SERVER -p udp --dport %s -m comment --comment "%s" -j ACCEPT', port, remarks))
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -150,6 +162,9 @@ local function stop()
|
||||
cmd("iptables -D INPUT -j PSW-SERVER 2>/dev/null")
|
||||
cmd("iptables -F PSW-SERVER 2>/dev/null")
|
||||
cmd("iptables -X PSW-SERVER 2>/dev/null")
|
||||
cmd("ip6tables -D INPUT -j PSW-SERVER 2>/dev/null")
|
||||
cmd("ip6tables -F PSW-SERVER 2>/dev/null")
|
||||
cmd("ip6tables -X PSW-SERVER 2>/dev/null")
|
||||
cmd(string.format("rm -rf %s %s /var/etc/%s.include", CONFIG_PATH, LOG_APP_FILE, CONFIG))
|
||||
end
|
||||
|
||||
|
||||
@ -926,14 +926,21 @@ add_dnsmasq() {
|
||||
}
|
||||
|
||||
#分流规则
|
||||
fwd_dns="${TUN_DNS}"
|
||||
#如果使用chnlist直接使用默认DNS
|
||||
[ "${USE_CHNLIST}" = "1" ] && unset fwd_dns
|
||||
local shunt_ids=$(uci show $CONFIG | grep "=shunt_rules" | awk -F '.' '{print $2}' | awk -F '=' '{print $1}')
|
||||
for shunt_id in $shunt_ids; do
|
||||
config_n_get $shunt_id domain_list | tr -s "\r\n" "\n" | gen_dnsmasq_items "shuntlist" "${fwd_dns}" "${TMP_DNSMASQ_PATH}/shunt_host.conf"
|
||||
echolog " - [$?]$shunt_id分流规则(shuntlist):${fwd_dns:-默认}"
|
||||
done
|
||||
[ "$(config_n_get $TCP_NODE protocol)" = "_shunt" ] && {
|
||||
fwd_dns="${TUN_DNS}"
|
||||
#如果使用chnlist直接使用默认DNS
|
||||
[ "${USE_CHNLIST}" = "1" ] && unset fwd_dns
|
||||
local default_node_id=$(config_n_get $TCP_NODE default_node nil)
|
||||
local shunt_ids=$(uci show $CONFIG | grep "=shunt_rules" | awk -F '.' '{print $2}' | awk -F '=' '{print $1}')
|
||||
for shunt_id in $shunt_ids; do
|
||||
local shunt_node_id=$(config_n_get $TCP_NODE ${shunt_id} nil)
|
||||
[ "$shunt_node_id" = "nil" ] && continue
|
||||
local shunt_node=$(config_n_get $shunt_node_id address nil)
|
||||
[ "$shunt_node" = "nil" ] && continue
|
||||
config_n_get $shunt_id domain_list | tr -s "\r\n" "\n" | gen_dnsmasq_items "shuntlist" "${fwd_dns}" "${TMP_DNSMASQ_PATH}/shunt_host.conf"
|
||||
echolog " - [$?]$shunt_id分流规则(shuntlist):${fwd_dns:-默认}"
|
||||
done
|
||||
}
|
||||
|
||||
#始终使用远程DNS解析代理(黑名单)列表
|
||||
fwd_dns="${TUN_DNS}"
|
||||
|
||||
@ -21,7 +21,10 @@ include $(INCLUDE_DIR)/cmake.mk
|
||||
|
||||
CMAKE_HOST_OPTIONS += \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER="" \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER=""
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER="" \
|
||||
-DCMAKE_SKIP_RPATH=FALSE \
|
||||
-DCMAKE_INSTALL_RPATH="${STAGING_DIR_HOST}/lib" \
|
||||
|
||||
|
||||
define Host/Install/ccache
|
||||
$(INSTALL_DIR) $(STAGING_DIR_HOST)/bin/
|
||||
|
||||
Loading…
Reference in New Issue
Block a user