kiddin9 4 лет назад
Родитель
Сommit
ee348b8b91

+ 0 - 4
.github/workflows/Openwrt-AutoBuild.yml

@@ -195,10 +195,6 @@ jobs:
         echo ${{ env.date4 }} > version.txt
         rename -v "s/^openwrt/${{ env.date3 }}-openwrt/" *
         rename -v "s/friendlyarm_//" *gz
-        if [ "$(ls *vmdk)" ]; then
-            mkdir EXSI专用
-            mv -f *vmdk* EXSI专用/
-        fi
         md5=$((md5sum *squashfs-sysupgrade* || md5sum *squashfs-combined-efi*) | awk '{print $1}') 2>/dev/null
         echo $md5 >> version.txt
         echo $REPO_BRANCH >> version.txt

+ 1 - 1
devices/common/.config

@@ -208,6 +208,6 @@ CONFIG_GRUB_BOOTOPTS="nomodeset"
 CONFIG_IMAGEOPT=y
 CONFIG_VERSIONOPT=y
 CONFIG_VERSION_CODE=""
-CONFIG_VERSION_REPO="https://op.supes.top"
+CONFIG_VERSION_REPO="http://dl"
 CONFIG_VERSION_MANUFACTURER="Kiddin'"
 CONFIG_VERSION_FILENAMES=n

+ 7 - 1
devices/common/default-settings

@@ -8,9 +8,15 @@ version=`uci get base_config.@status[0].version 2>/dev/null`
 test -n "${DISTRIB_ID}" || DISTRIB_ID=OpenWrt
 DISTRIB_ID=`echo -n $DISTRIB_ID | tr a-z A-Z`
 
+if [ "$(uci get dhcp.@dnsmasq[0].port)" != "53" ]; then
+	uci set dhcp.@dnsmasq[0].port='53'
+	uci commit dhcp
+fi
+
+
 sed -i '/profile.d/d' /lib/upgrade/keep.d/base-files
 
-sed -i 's/\(supes.top.*\)\/custom/\1/' /etc/opkg/distfeeds.conf
+sed -i 's/\(custom.*\)\/custom/\1/' /etc/opkg/distfeeds.conf
 sed -i 's?\(src/gz openwrt_core\)?#\1?' /etc/opkg/distfeeds.conf
 
 echo $(uci get uhttpd.main.index_page) | grep -q "cgi-bin/luci" ||

+ 0 - 1
devices/common/diy.sh

@@ -33,7 +33,6 @@ sed -i 's/max_requests 3/max_requests 20/g' package/network/services/uhttpd/file
 curl -L https://git.io/J0klM --create-dirs -o package/network/config/firewall/patches/fullconenat.patch
 sed -i 's?admin/status/channel_analysis??' package/feeds/luci/luci-mod-status/root/usr/share/luci/menu.d/luci-mod-status.json
 sed -i "s/askfirst/respawn/g" `find package target -name inittab`
-sed -i 's/"$routername" "$lanaddr"/"$routername" "$lanaddr"\ndhcp_domain_add "" "op" "$lanaddr"/' package/network/services/dnsmasq/files/dnsmasq.init
 
 sed -i \
 	-e "s/+\(luci\|luci-ssl\)\( \|$\)/+luci-ssl-nginx\2/" \

+ 0 - 53
devices/common/files/etc/nginx/conf.d/reverse_proxy.conf.sample

@@ -1,53 +0,0 @@
-# AdguardHome
-server {
-		listen 80;
-		listen [::]:80;
-		server_name adg;
-		access_log off; # logd openwrt;
-		
-		location /{
-				   proxy_pass http://10.0.0.1:3000;
-				   proxy_set_header Host $host;
-				   proxy_set_header X-Real-IP $remote_addr;
-				   proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
-				   proxy_set_header REMOTE-HOST $remote_addr;
-				   }
-	}
-
-# PVE
-server {
-		listen 443 ssl;
-		listen [::]:443 ssl;
-		server_name pve;
-		access_log off; # logd openwrt;
-		
-		location /{
-				   proxy_pass https://10.0.0.10:8006;
-				   proxy_set_header Host $host;
-				   proxy_set_header X-Real-IP $remote_addr;
-				   proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
-				   proxy_set_header REMOTE-HOST $remote_addr;
-				   }
-	}
-server
-    {
-        listen 80;
-		server_name pve;
-		return 301 https://$host$request_uri;	
-	}
-
-# 青龙
-server {
-		listen 80;
-		listen [::]:80;
-		server_name ql;
-		access_log off; # logd openwrt;
-		
-		location /{
-				   proxy_pass http://10.0.0.1:5700;
-				   proxy_set_header Host $host;
-				   proxy_set_header X-Real-IP $remote_addr;
-				   proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
-				   proxy_set_header REMOTE-HOST $remote_addr;
-				   }
-	}

+ 70 - 0
devices/common/files/etc/nginx/conf.d/shortcuts.conf

@@ -0,0 +1,70 @@
+# AdguardHome
+server {
+		listen 80;
+		listen [::]:80;
+		server_name adg;
+		location /{
+			proxy_pass http://10.0.0.1:3000;
+		}
+	}
+
+# PVE
+server {
+		listen 443 ssl;
+		listen [::]:443 ssl;
+		listen 80;
+		listen [::]:80;
+		server_name pve;
+		location /{
+			proxy_pass https://10.0.0.10:8006;
+			proxy_set_header Upgrade $http_upgrade;
+			proxy_set_header Connection "upgrade"; 
+		}
+		if ($ssl_protocol = "") { return 301 https://$host$request_uri; }
+	}
+
+# 青龙
+server {
+		listen 80;
+		listen [::]:80;
+		server_name ql;
+		location /{
+			proxy_pass http://10.0.0.1:5700;
+		}
+	}
+
+# Bypass
+server {
+		listen 80;
+		listen [::]:80;
+		server_name by;
+		return 301 http://10.0.0.1/luci/admin/services/bypass;
+	}
+
+# Packages软件包
+server {
+		listen 80;
+		listen [::]:80;
+		server_name pk;
+        return 301 http://10.0.0.1/luci/admin/system/opkg;
+	}
+
+# Upgrade在线固件更新
+server {
+		listen 80;
+		listen [::]:80;
+		server_name ug;
+        return 301 http://10.0.0.1/luci/admin/services/gpsysupgrade;
+	}
+
+# 勿删 在线安装插件必须
+server {
+		listen 80;
+		listen [::]:80;
+		server_name dl;
+		location /{
+		resolver 223.5.5.5;
+		set $upstream opkg.supes.top;
+		proxy_pass http://$upstream;
+			}
+	}

+ 33 - 0
devices/common/files/etc/nginx/uci.conf.template

@@ -0,0 +1,33 @@
+# Consider using UCI or creating files in /etc/nginx/conf.d/ for configuration.
+# Parsing UCI configuration is skipped if uci set nginx.global.uci_enable=false
+# For details see: https://openwrt.org/docs/guide-user/services/webserver/nginx
+
+worker_processes auto;
+
+user root;
+
+events {}
+
+http {
+	access_log off;
+	log_format openwrt
+		'$request_method $scheme://$host$request_uri => $status'
+		' (${body_bytes_sent}B in ${request_time}s) <- $http_referer';
+
+	include mime.types;
+	default_type application/octet-stream;
+	sendfile on;
+
+	client_max_body_size 128M;
+	client_header_buffer_size 2k;
+	large_client_header_buffers 4 4k;
+
+	gzip on;
+	gzip_vary on;
+	gzip_proxied any;
+
+	root /www;
+
+	#UCI_HTTP_CONFIG
+	include conf.d/*.conf;
+}

+ 26 - 0
devices/common/patches/nginx_luci.patch

@@ -16,3 +16,29 @@
  		uwsgi_param SERVER_ADDR $server_addr;
  		uwsgi_modifier1 9;
  		uwsgi_pass unix:////var/run/luci-cgi_io.socket;
+
+--- a/package/network/services/dnsmasq/files/dnsmasq.init
++++ b/package/network/services/dnsmasq/files/dnsmasq.init
+@@ -403,6 +403,22 @@ dhcp_this_host_add() {
+ 	local routerstub routername ifdashname
+ 	local lanaddr lanaddr6 lanaddrs6 ulaprefix
+ 
++	lanaddr="$(uci get network.lan.ipaddr)"
++	echo "
++$lanaddr op
++$lanaddr dl" >/tmp/hosts/shortcuts
++	grep -q "#shortcut" /etc/hosts && {
++	sed -i "s/[0-9.]\+ \(.\+#shortcut\)/$lanaddr \1/" /etc/hosts
++} || {
++	echo "
++$lanaddr adg #shortcut
++$lanaddr pve #shortcut
++$lanaddr ql #shortcut
++$lanaddr by #shortcut
++$lanaddr pk #shortcut
++$lanaddr ug #shortcut" >>/etc/hosts
++}
++
+ 	if [ "$mode" -gt 0 ] ; then
+ 		ifdashname="${ifname//./-}"
+ 		routerstub="$( md5sum /etc/os-release )"

+ 1 - 1
devices/x86_64/.config

@@ -7,7 +7,7 @@ CONFIG_TARGET_x86_64=y
 # EFI支持:
 CONFIG_GRUB_IMAGES=y
 CONFIG_EFI_IMAGES=y
-CONFIG_VMDK_IMAGES=y
+CONFIG_VMDK_IMAGES=n
 CONFIG_TARGET_ROOTFS_TARGZ=n
 
 # 其他需要安装的软件包: