1
0
mirror of https://github.com/kenzok8/small-package synced 2025-09-20 19:11:30 +08:00

update-12.26

This commit is contained in:
github-actions[bot]
2021-12-26 20:30:48 +08:00
parent ac687c9193
commit 66d5af6d4c
4 changed files with 124 additions and 93 deletions

View File

@ -1,18 +1,21 @@
# Copyright (C) 2021 xiaorouji
#
# This is free software, licensed under the GNU General Public License v3.
# SPDX-License-Identifier: GPL-3.0-only
#
# Copyright (C) 2021 ImmortalWrt.org
include $(TOPDIR)/rules.mk
PKG_NAME:=hysteria
PKG_VERSION:=0.9.1
PKG_VERSION:=0.9.2
PKG_RELEASE:=$(AUTORELEASE)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/HyNetwork/hysteria/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=skip
PKG_LICENSE:=MIT
PKG_LICENSE_FILE:=LICENSE
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
PKG_CONFIG_DEPENDS:= \
CONFIG_HYSTERIA_COMPRESS_GOPROXY \
CONFIG_HYSTERIA_COMPRESS_UPX
@ -22,28 +25,29 @@ PKG_BUILD_PARALLEL:=1
PKG_USE_MIPS16:=0
GO_PKG:=github.com/tobyxdd/hysteria
GO_PKG_BUILD_PKG:=$(GO_PKG)/cmd
GO_PKG_BUILD_PKG:=github.com/tobyxdd/hysteria/cmd
GO_PKG_LDFLAGS:=-s -w
GO_PKG_LDFLAGS_X:= \
main.appVersion=$(PKG_VERSION)
GO_PKG_LDFLAGS_X:=main.appVersion=$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
define Package/$(PKG_NAME)
SECTION:=net
CATEGORY:=Network
SUBMENU:=Web Servers/Proxies
DEPENDS:=$$(GO_ARCH_DEPENDS)
TITLE:=Hysteria is a feature-packed network utility optimized for networks of poor quality (e.g. satellite connections, congested public Wi-Fi, connecting from China to servers abroad)
URL:=https://github.com/HyNetwork/hysteria
define Package/hysteria
SECTION:=net
CATEGORY:=Network
TITLE:=A feature-packed network utility optimized for networks of poor quality
URL:=https://github.com/tobyxdd/hysteria
DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle
endef
define Package/$(PKG_NAME)/config
menu "Configuration"
depends on PACKAGE_$(PKG_NAME)
define Package/hysteria/description
Hysteria is a feature-packed network utility optimized for networks
of poor quality (e.g. satellite connections, congested public Wi-Fi,
connecting from China to servers abroad) powered by a custom version
of QUIC protocol.
endef
define Package/hysteria/config
config HYSTERIA_COMPRESS_GOPROXY
bool "Compiling with GOPROXY proxy"
default n
@ -51,15 +55,12 @@ config HYSTERIA_COMPRESS_GOPROXY
config HYSTERIA_COMPRESS_UPX
bool "Compress executable files with UPX"
depends on !mips64
default y
endmenu
default y
endef
ifeq ($(CONFIG_HYSTERIA_COMPRESS_GOPROXY),y)
export GO111MODULE=on
export GOPROXY=https://goproxy.io
export GO111MODULE=on
export GOPROXY=https://goproxy.baidu.com
endif
define Build/Compile
@ -69,11 +70,11 @@ ifeq ($(CONFIG_HYSTERIA_COMPRESS_UPX),y)
endif
endef
define Package/$(PKG_NAME)/install
define Package/hysteria/install
$(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
$(INSTALL_DIR) $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/cmd $(1)/usr/bin/hysteria
endef
$(eval $(call GoBinPackage,$(PKG_NAME)))
$(eval $(call BuildPackage,$(PKG_NAME)))
$(eval $(call GoBinPackage,hysteria))
$(eval $(call BuildPackage,hysteria))

View File

@ -24,6 +24,7 @@ PKG_CONFIG_DEPENDS:= CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_binary
define Package/luci-app-adguardhome/conffiles
/usr/share/AdGuardHome/links.txt
/etc/config/AdGuardHome
/etc/AdGuardHome.yaml
endef
define Package/luci-app-adguardhome/postinst

View File

@ -186,7 +186,9 @@ rm_port53()
config_editor "dns.port" "$dnsmasq_port" "$configpath"
uci set dhcp.@dnsmasq[0].port="53"
uci commit dhcp
/etc/init.d/dnsmasq reload
config_get binpath $CONFIGURATION binpath "/usr/bin/AdGuardHome"
killall -9 $binpath
/etc/init.d/dnsmasq restart
}
use_port53()
@ -499,6 +501,11 @@ start_service() {
echo "AdGuardHome service enabled"
echo "luci enable switch=$enabled"
(sleep 10 && [ -z "$(pgrep $binpath)" ] && logger "AdGuardHome" "no process in 10s cancel redirect" && _do_redirect 0 )&
if [[ "`uci get bypass.@global[0].global_server 2>/dev/null`" && "`uci get bypass.@global[0].adguardhome 2>/dev/null`" == 1 && "$(uci get dhcp.@dnsmasq[0].port)" == "53" ]]; then
uci -q set AdGuardHome.AdGuardHome.redirect='exchange'
uci commit AdGuardHome
_do_redirect 1
fi
}
reload_service()

View File

@ -1,37 +1,65 @@
#提交就可以直接用的配置模板文件
#a template config can be use with a apply
bind_host: 0.0.0.0
bind_port: 3000
beta_bind_port: 0
users:
- name: root
password: $2y$10$FfeQavihMUiXCuJhHuQwy.6EOXDvkXb/S50qI5fXizqarNT/ShhQm
language: ""
rlimit_nofile: 0
password: $2y$10$dwn0hTYoECQMZETBErGlzOId2VANOVsPHsuH13TM/8KnysM5Dh/ve
auth_attempts: 5
block_auth_min: 15
http_proxy: ""
language: zh-cn
debug_pprof: false
web_session_ttl: 720
dns:
bind_host: 0.0.0.0
bind_hosts:
- 0.0.0.0
port: 5553
statistics_interval: 1
statistics_interval: 30
querylog_enabled: true
querylog_file_enabled: true
querylog_interval: 6h
querylog_size_memory: 1000
anonymize_client_ip: false
protection_enabled: true
filtering_enabled: true
filters_update_interval: 24
blocking_mode: nxdomain
blocked_response_ttl: 10
querylog_enabled: false
querylog_interval: 1
blocking_mode: default
blocking_ipv4: ""
blocking_ipv6: ""
blocked_response_ttl: 60
parental_block_host: family-block.dns.adguard.com
safebrowsing_block_host: standard-block.dns.adguard.com
ratelimit: 0
ratelimit_whitelist: []
refuse_any: false
upstream_dns:
- 223.5.5.5
upstream_dns_file: ""
bootstrap_dns:
#bootstrap_dns
- 119.29.29.29
- 223.5.5.5
all_servers: false
fastest_addr: false
fastest_timeout: 1s
allowed_clients: []
disallowed_clients: []
blocked_hosts: []
parental_block_host: ""
safebrowsing_block_host: ""
blocked_services: []
blocked_hosts:
- version.bind
- id.server
- hostname.bind
trusted_proxies:
- 127.0.0.0/8
- ::1/128
cache_size: 4194304
parental_sensitivity: 13
cache_ttl_min: 0
cache_ttl_max: 0
cache_optimistic: true
bogus_nxdomain: []
aaaa_disabled: false
enable_dnssec: false
edns_client_subnet: false
max_goroutines: 300
ipset: []
filtering_enabled: true
filters_update_interval: 24
parental_enabled: false
safesearch_enabled: false
safebrowsing_enabled: false
@ -40,14 +68,23 @@ dns:
parental_cache_size: 1048576
cache_time: 30
rewrites: []
upstream_dns:
#upstream_dns
blocked_services: []
upstream_timeout: 10s
local_domain_name: lan
resolve_clients: true
use_private_ptr_resolvers: true
local_ptr_upstreams: []
tls:
enabled: false
server_name: ""
force_https: false
port_https: 443
port_dns_over_tls: 853
port_dns_over_quic: 784
port_dnscrypt: 0
dnscrypt_config_file: ""
allow_unencrypted_doh: false
strict_sni_check: false
certificate_chain: ""
private_key: ""
certificate_path: ""
@ -55,55 +92,40 @@ tls:
filters:
- enabled: true
url: https://adguardteam.github.io/AdGuardSDNSFilter/Filters/filter.txt
name: AdGuard Simplified Domain Names filter
id: 1
name: AdGuard DNS filter
id: 1628750870
- enabled: true
url: https://adaway.org/hosts.txt
name: AdAway
id: 2
- enabled: false
url: https://hosts-file.net/ad_servers.txt
name: hpHosts - Ad and Tracking servers only
id: 3
- enabled: true
url: https://www.malwaredomainlist.com/hostslist/hosts.txt
name: MalwareDomainList.com Hosts List
id: 4
- enabled: false
url: https://raw.githubusercontent.com/vokins/yhosts/master/data/tvbox.txt
name: tvbox
id: 1575018007
- enabled: true
url: https://hosts.nfz.moe/full/hosts
name: neoHosts full
id: 1575618240
- enabled: false
url: https://hosts.nfz.moe/basic/hosts
name: neoHosts basic
id: 1575618241
- enabled: false
url: http://sbc.io/hosts/hosts
name: StevenBlack host basic
id: 1575618242
- enabled: false
url: http://sbc.io/hosts/alternates/fakenews-gambling-porn-social/hosts
name: StevenBlack host+fakenews + gambling + porn + social
id: 1575618243
- enabled: false
url: https://cdn.jsdelivr.net/gh/privacy-protection-tools/anti-AD/anti-ad-easylist.txt
name: anti-AD(Adblock+neohosts+yhosts+cjxlist+adhlist)
id: 1577113202
url: https://anti-ad.net/easylist.txt
name: 'CHN: anti-AD'
id: 1628750871
whitelist_filters: []
user_rules: []
dhcp:
enabled: false
interface_name: ""
gateway_ip: ""
subnet_mask: ""
range_start: ""
range_end: ""
lease_duration: 86400
icmp_timeout_msec: 1000
dhcpv4:
gateway_ip: ""
subnet_mask: ""
range_start: ""
range_end: ""
lease_duration: 86400
icmp_timeout_msec: 1000
options: []
dhcpv6:
range_start: ""
lease_duration: 86400
ra_slaac_only: false
ra_allow_slaac: false
clients: []
log_compress: false
log_localtime: false
log_max_backups: 0
log_max_size: 100
log_max_age: 3
log_file: ""
verbose: false
schema_version: 5
os:
group: ""
user: ""
rlimit_nofile: 0
schema_version: 12