Skip to content

Commit

Permalink
dcompass: use min, extra: some fix
Browse files Browse the repository at this point in the history
  • Loading branch information
honwen committed Feb 12, 2021
1 parent c0e60d0 commit 0d42567
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 11 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

- dnsmasq-extra + dnsproxy

- dnsmasq-extra + dcompass(experimental)
- dnsmasq-extra + dcompass _(experimental)_

- dnsmasq-extra + adguard-home

Expand All @@ -38,6 +38,8 @@

- dnsproxy@7200 with multidns/DoT/DoH

- dcompass@7500 with multidns/DoT/DoH

- adguard-home@7600 with multidns/DoT/DoH and **_adguard_**

- dnsmasq-extra
Expand Down
4 changes: 2 additions & 2 deletions dcompass/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=dcompass
PKG_VERSION:=20210212
PKG_RELEASE:=0938
PKG_RELEASE:=2220
PKG_MAINTAINER:=honwen <https://github.com/honwen>

# OpenWrt ARCH: arm, aarch64, i386, x86_64, mips, mipsel
Expand All @@ -22,7 +22,7 @@ ifeq ($(ARCH),aarch64)
PKG_ARCH:=aarch64-unknown-linux-musleabihf
endif

PKG_SOURCE:=dcompass-$(PKG_ARCH)-cn
PKG_SOURCE:=dcompass-$(PKG_ARCH)-min
PKG_SOURCE_URL:=https://github.com/LEXUGE/dcompass/releases/download/build-$(PKG_VERSION)_$(PKG_RELEASE)/
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_ARCH)-$(PKG_VERSION)_$(PKG_RELEASE)
PKG_HASH:=skip
Expand Down
5 changes: 2 additions & 3 deletions dcompass/files/dcompass.init
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,8 @@ $(_table_head)
- check_secure
- tag: check_secure
if:
geoip:
codes:
- CN
ipcidr:
- /etc/dnsmasq-extra.d/chnroute.txt
else:
- query: secure
- end
Expand Down
4 changes: 2 additions & 2 deletions dnsmasq-extra/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=dnsmasq-extra
PKG_VERSION:=2021-02-09
PKG_RELEASE:=1.7.0
PKG_VERSION:=2021-02-12
PKG_RELEASE:=1.7.1

PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)

Expand Down
1 change: 1 addition & 0 deletions dnsmasq-extra/files/config
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ config general
list plugins 'smartdns'
list plugins 'dnsproxy'
list plugins 'dcompass'
list pluginsOtcp 'xray'
list pluginsOtcp 'ss-tunnel'
list pluginsOtcp 'ssr-tunnel'
# list clean_server '1.1.1.1'
Expand Down
9 changes: 6 additions & 3 deletions dnsmasq-extra/files/sh/init
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,11 @@ start() {

for plugin in $(uci_get_by_type ${NAME} general pluginsOtcp); do
[ -x /usr/bin/${plugin} ] && {
if echo ${plugin} | grep -q 'tunnel'; then
if echo ${plugin} | grep -qe 'ray\|tunnel'; then
plugin_alias=$(echo -n ${plugin} | sed 's/ss/shadowsocks/g; s/-tunnel//g')
plugin_srv=$(uci_get_by_type ${plugin_alias} port_forward server nil)
[ "V${plugin_srv}" == "Vnil" ] && continue
plugin_enable=$(uci_get_by_type ${plugin_alias} port_forward 'enable' 0)
[ "V${plugin_srv}" == "Vnil" -a "V${plugin_enable}" == "V0" ] && continue
plugin_port=$(uci_get_by_type ${plugin_alias} port_forward local_port 5300)

else
Expand All @@ -73,7 +74,7 @@ start() {
(/usr/bin/dnsFtcp -p $plugin_tcpport -s 127.0.0.1:$plugin_port >/dev/null 2>&1) &

echo -n "plugin-tcp:${plugin}, " | tr [a-z] [A-Z]
uni_cat 'gfwlist' 'tldn' | sed "s/^/server=\//;s/$/\/127.0.0.1#${plugin_port}/" >${TARGET}/plugin_${plugin}.conf
uni_cat 'gfwlist' 'tldn' | sed "s/^/server=\//;s/$/\/127.0.0.1#${plugin_tcpport}/" >${TARGET}/plugin_${plugin}.conf
echo "server=/${ss_watchdog}/127.0.0.1#${plugin_tcpport}" >>${TARGET}/plugin_${plugin}.conf
}
done
Expand Down Expand Up @@ -175,8 +176,10 @@ start() {
uci_bool_by_type ${NAME} general overwrite_dcompass && {
[ -x /usr/bin/dcompass ] && {
local dcompass_port=$(uci_get_by_type dcompass dcompass port 7500)
echo "server=/${ss_watchdog}/127.0.0.1#${dcompass_port}" >>${TARGET}/misc_custom.conf
echo "server=127.0.0.1#$dcompass_port" >>${TARGET}/misc_custom.conf
sed "s+/#$+/127.0.0.1#$dcompass_port+g" -i ${TARGET}/*.conf
rm -f ${TARGET}/plugin_dcompass.conf
}
}

Expand Down

0 comments on commit 0d42567

Please sign in to comment.