Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

随机出现一段时间后打开网页很长时间转圈加载的情况 #171

Closed
umlka opened this issue Jul 1, 2023 · 6 comments
Closed

Comments

@umlka
Copy link

umlka commented Jul 1, 2023

运行环境

NAME="OpenWrt"
VERSION="23.05.0-rc2"
ID="openwrt"
ID_LIKE="lede openwrt"
PRETTY_NAME="OpenWrt 23.05.0-rc2"
VERSION_ID="23.05.0-rc2"
HOME_URL="https://openwrt.org/"
BUG_URL="https://bugs.openwrt.org/"
SUPPORT_URL="https://forum.openwrt.org/"
BUILD_ID="r23228-cd17d8df2a"
OPENWRT_BOARD="x86/64"
OPENWRT_ARCH="x86_64"
OPENWRT_TAINTS=""
OPENWRT_DEVICE_MANUFACTURER="OpenWrt"
OPENWRT_DEVICE_MANUFACTURER_URL="https://openwrt.org/"
OPENWRT_DEVICE_PRODUCT="Generic"
OPENWRT_DEVICE_REVISION="v0"
OPENWRT_RELEASE="OpenWrt 23.05.0-rc2 r23228-cd17d8df2a"
  • Kernel:
Linux OpenWrt 5.15.118 #0 SMP Mon Jun 26 11:20:39 2023 x86_64 GNU/Linux

BUG描述

dae安装在主路由上面, 该路由器为PPPoE拨号, 启动dae后刚开始一段时间打开国外网站都很快, 过几分钟/几十分钟后随机出现某些被代理的网站打开时浏览器页面一直转圈, 也没有该网站域名相关的日志输出, 等几秒/几十秒后网站就打开了(这时候有该网站域名相关的日志输出了), 之后一段时间内打开该网站都会很快

节点类型

加密协议 'Shadowsocks AEAD'
shadowsocks_encrypt_method 'aes-128-gcm'
shadowsocks_plugin 'obfs-local'
shadowsocks_plugin_opts 'obfs=http;obfs-host=5c2d9c0098.douyincdn.com'

配置文件

global {
	tproxy_port: 12345
	tproxy_port_protect: true
	so_mark_from_dae: 0
	log_level: info
	disable_waiting_network: false
	lan_interface: eth0,eth2
	#wan_interface: auto
	auto_config_kernel_parameter: true
	tcp_check_url: 'http://cp.cloudflare.com,1.1.1.1,2606:4700:4700::1111'
	tcp_check_http_method: HEAD
	udp_check_dns: 'dns.google.com:53,8.8.8.8,2001:4860:4860::8888'
	check_interval: 30s
	check_tolerance: 50ms
	dial_mode: domain
	allow_insecure: false
	sniffing_timeout: 100ms
	tls_implementation: tls
	utls_imitate: chrome_auto
}

subscription {
	FC: 'https://'
}

dns {
	ipversion_prefer: 4
	upstream {
		localdns: 'udp://223.5.5.5:53'
		remotedns: 'tcp://1.1.1.1:53'
	}
	routing {
		request {
			#qname(geosite:category-ads-all) -> reject
			qname(geosite:cn) -> localdns
			qname(geosite:geolocation-!cn) -> remotedns
			fallback: localdns
		}
		response {
			upstream(remotedns) -> accept
			!qname(geosite:cn) && ip(geoip:private) -> remotedns
			fallback: accept
		}
	}
}

group {
	proxy {
		#filter: name(keyword: '新加坡')
		filter: subtag(FC) && name(keyword: '新加坡') && !name(keyword: '实验性')
		policy: fixed(0)
	}
}

routing {
	### Preset rules.
	pname(NetworkManager) -> direct

	### Dest IP rule
	dip(224.0.0.0/3, 'ff00::/8') -> direct
	dip(geoip:private) -> direct

	### Source IP rule

	### Dest port rule
	!dport(22, 53, 80, 143, 443, 465, 587, 853, 993, 995, 8080, 8443, 9418) -> direct

	### Source port rule

	### Level 4 protocol rule

	### IP version rule:

	### Write your rules below.
	#domain(geosite:category-ads-all) -> block
	l4proto(udp) && dport(443) && domain(geosite:youtube) -> block
	dip(geoip:cn) -> direct
	domain(geosite:cn) -> direct
	domain(geosite:steam@cn) -> direct
	fallback: proxy
}

补充

同样的节点配置在homeproxy下面没有这种情况出现

@dae-prow
Copy link
Contributor

dae-prow bot commented Jul 1, 2023

Thanks for opening this issue!

@mzz2017
Copy link
Contributor

mzz2017 commented Jul 2, 2023

调试意见:去掉ipversion_prefer,使用domain++
思路:有可能和之前的首屏白屏问题有关系,访问的是ipv4/ipv6混合站点,而ipv6被block时app没有回退而是重试

疑问:本地是否分配有ipv6地址,本地的ipv6是否畅通

@mzz2017
Copy link
Contributor

mzz2017 commented Jul 2, 2023

另外,浏览器是不是 firefox?

@umlka
Copy link
Author

umlka commented Jul 2, 2023

调试意见:去掉ipversion_prefer,使用domain++ 思路:有可能和之前的首屏白屏问题有关系,访问的是ipv4/ipv6混合站点,而ipv6被block时app没有回退而是重试

疑问:本地是否分配有ipv6地址,本地的ipv6是否畅通

浏览器是chrome,本地有ipv6且畅通,可能和v6地址block返回0.0.0.0有关,之前我测试过block一个网址,访问时也是一直转圈加载

@mzz2017
Copy link
Contributor

mzz2017 commented Jul 2, 2023

@umlka 好的,等待你的测试结果

@umlka
Copy link
Author

umlka commented Jul 7, 2023

@umlka 好的,等待你的测试结果

目前在openwrt上面这样设置后就没问题了

uci -q del dhcp.@dnsmasq[0].server
uci add_list dhcp.@dnsmasq[0].server='223.5.5.5'
uci set dhcp.@dnsmasq[0].rebind_protection='0'
uci set dhcp.@dnsmasq[0].cachesize='0'
uci set dhcp.@dnsmasq[0].noresolv='1'
uci commit dhcp
/etc/init.d/dnsmasq reload

配置还是用的上面贴的配置

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants