<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>校园网 &#8211; 1738348785</title>
	<atom:link href="https://www.arkicho.cn/tag/%e6%a0%a1%e5%9b%ad%e7%bd%91/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.arkicho.cn</link>
	<description>1738348785‘s blog</description>
	<lastBuildDate>Fri, 22 Nov 2024 07:31:13 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://www.arkicho.cn/wp-content/uploads/2023/11/cropped-110281182_p1-32x32.png</url>
	<title>校园网 &#8211; 1738348785</title>
	<link>https://www.arkicho.cn</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>校园网dns</title>
		<link>https://www.arkicho.cn/blog/228/</link>
					<comments>https://www.arkicho.cn/blog/228/#comments</comments>
		
		<dc:creator><![CDATA[1738348785]]></dc:creator>
		<pubDate>Sat, 09 Nov 2024 08:29:52 +0000</pubDate>
				<category><![CDATA[文章]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[校园网]]></category>
		<guid isPermaLink="false">https://www.arkicho.cn/?p=228</guid>

					<description><![CDATA[前情提要： 校园网的dns解析带有许多奇怪的问题，比如b站图片加载不出来，打开网页要很久很慢，或者突然断网，但 [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p><strong>前情提要：</strong></p>



<p>        校园网的dns解析带有许多奇怪的问题，比如b站图片加载不出来，打开网页要很久很慢，或者突然断网，但是qq和微信之类有能使用，在打游戏的又能接着打游戏。我是通过路由器的接口dns设置来自定义dns的，结果学校dns炸了的情况下，我的设备也出现了断网问题，表明了，我的自定义dns并未生效。</p>



<p>        这种问题一般是dns解析的问题，但是部分校园网的dns的53端口是会劫持的，因此，不能通过路由器的接口设置dns服务器。</p>



<p>如果路由器是openwrt的，可以通过很多第三方dns软件来搭建dns解析服务器。</p>



<p>以下是一些软件</p>



<p><a href="https://github.com/pymumu/smartdns">GitHub &#8211; pymumu/smartdns: A local DNS server to obtain the fastest website IP for the best Internet experience, support DoT, DoH. 一个本地DNS服务器，获取最快的网站IP，获得最佳上网体验，支持DoH，DoT。</a></p>



<p><a href="https://github.com/IrineSistiana/mosdns">GitHub &#8211; IrineSistiana/mosdns: 一个 DNS 转发器</a></p>



<p><a href="https://github.com/sbwml/luci-app-mosdns">GitHub &#8211; sbwml/luci-app-mosdns: 一个 DNS 转发器 &#8211; OpenWrt <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f381.png" alt="🎁" class="wp-smiley" style="height: 1em; max-height: 1em;" /> MosDNS v5 is Ready! <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f389.png" alt="🎉" class="wp-smiley" style="height: 1em; max-height: 1em;" /></a></p>



<p>相对的luci和软件是分开的，luci可以酌情使用。</p>



<p>在设置中开启dot和doh和tls协议来解析dns，可以免于被校园网劫持，提高网络效率</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.arkicho.cn/blog/228/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>校园网TTL</title>
		<link>https://www.arkicho.cn/blog/215/</link>
					<comments>https://www.arkicho.cn/blog/215/#respond</comments>
		
		<dc:creator><![CDATA[1738348785]]></dc:creator>
		<pubDate>Wed, 23 Oct 2024 15:50:23 +0000</pubDate>
				<category><![CDATA[文章]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[校园网]]></category>
		<guid isPermaLink="false">https://www.arkicho.cn/?p=215</guid>

					<description><![CDATA[TTL 是最简单的多设备检测方式，因为 TTL 每过一个路由值都会 -1，所以只需要抓包然后读出我们的包头里面 [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>TTL 是最简单的多设备检测方式，因为 TTL 每过一个路由值都会 -1，所以只需要抓包然后读出我们的包头里面的 TTL 值是否是一般情况下系统默认的 128 或者 64 就可以判断我们是否共享了网络。但在 OpenWRT 中我们可以简单的通过添加 iptables 或者 nftables 防火墙规则来实现路由器下所有设备 TTL 值的统一。</p>



<p>我用的iptables情况下只要一行就能改TTL</p>



<p>windows下 </p>



<p><code>iptables -t mangle -A POSTROUTING -j TTL --ttl-set 128</code></p>



<p>安卓设备或者linux下 </p>



<p><code>iptables -t mangle -A POSTROUTING -j TTL --ttl-set 64 </code></p>



<p>nftables 固定 TTL，没测试过</p>



<p><code>nft add table inet ttl64<br>nft add chain inet ttl64 postrouting { type filter hook postrouting priority -150\; policy accept\; }<br>nft add rule inet ttl64 postrouting counter ip ttl set 64</code></p>



<p>可以放进路由器的&#8212;网络&#8212;防火墙&#8212;自定义规则&#8212;中把这几段加进去。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.arkicho.cn/blog/215/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>在openwrt系统中修改ua及相关配置</title>
		<link>https://www.arkicho.cn/blog/203/</link>
					<comments>https://www.arkicho.cn/blog/203/#respond</comments>
		
		<dc:creator><![CDATA[1738348785]]></dc:creator>
		<pubDate>Wed, 23 Oct 2024 15:32:25 +0000</pubDate>
				<category><![CDATA[文章]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[校园网]]></category>
		<guid isPermaLink="false">https://www.arkicho.cn/?p=203</guid>

					<description><![CDATA[首先，先确定你的系统是mips或arm或x86，通过你购买的路由器型号来判断也可以。 uname -m 确保你 [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>首先，先确定你的系统是mips或arm或x86，通过你购买的路由器型号来判断也可以。</p>



<p><code>uname -m</code></p>



<p>确保你使用的openwrt发行版具有opkg之类的包管理器可以简化流程，如有其他需求，可以尝试自己编译。</p>



<p><a href="https://github.com/Zxilly/UA2F">GitHub &#8211; Zxilly/UA2F: Change User-Agent to F-string on OpenWRT router to prevent being detected.</a></p>



<p>releases中具有编译好的ipk安装包，可以通过架构自己查看。</p>



<p><code>opkg install ua2f</code></p>



<p>如果提示缺乏依赖，如我使用的istoreos</p>



<p><code>opkg update</code></p>



<p><code>opkg install xxxx</code></p>



<figure class="wp-block-image size-full"><img fetchpriority="high" decoding="async" width="1092" height="504" src="https://www.arkicho.cn/wp-content/uploads/2024/10/73D73ACB1A176D5A77E4EAB04CF691E5.png" alt="" class="wp-image-204" srcset="https://www.arkicho.cn/wp-content/uploads/2024/10/73D73ACB1A176D5A77E4EAB04CF691E5.png 1092w, https://www.arkicho.cn/wp-content/uploads/2024/10/73D73ACB1A176D5A77E4EAB04CF691E5-300x138.png 300w, https://www.arkicho.cn/wp-content/uploads/2024/10/73D73ACB1A176D5A77E4EAB04CF691E5-768x354.png 768w" sizes="(max-width: 1092px) 100vw, 1092px" /></figure>



<p>这里我所缺的是libnetfilter-queue1 和kmod-nft-queue，根据不同的发行系统会有所不同，直接            <code>opkg install libnetfilter-queue1                                                                                                                 opkg install kmod-nft-queue</code></p>



<p>安装好依赖后就可以再次                                                                                                                                                         <code>opkg install ua2f</code></p>



<p>如果需要luci界面，可以再下载这个</p>



<p><a href="https://github.com/lucikap/luci-app-ua2f">GitHub &#8211; lucikap/luci-app-ua2f: 一个基于ua2f开发的配置界面，更简单的配置ua2f</a></p>



<p>但是这个功能相对较少，部分配置还是得通过指令终端完成。如果你在luci改了后，再用指令改，重启后会以luci的为最高优先度。</p>



<pre class="wp-block-preformatted"><code># 启动 UA2F<br>service ua2f start</code><br>如果出现报错，那就是缺乏依赖。<br><code>opkg install kmod-ipt-nfqueue<br>opkg install iptables-mod-nfqueue</code><br># 启用 UA2F<br><code>uci set ua2f.enabled.enabled=1</code><br>github上有相关设置，我这边写下我自己的设置<br><code># 启用 UA2F<br>uci set ua2f.enabled.enabled=1<br><br># 可选的防火墙配置选项<br># 是否自动添加防火墙规则<br>uci set ua2f.firewall.handle_fw=1<br><br># 是否尝试处理 443 端口的流量， 通常来说，流经 443 端口的流量是加密的，因此无需处理<br>uci set ua2f.firewall.handle_tls=0<br><br># 是否处理微信的流量，微信的流量通常是加密的，但是据说微信可能会用http向443端口发送数据，保险点还是开了把。这一规则在启用 nftables 时无效<br>uci set ua2f.firewall.handle_mmtls=1                                                                                            </code><code><br># 是否处理内网流量，如果你的路由器是在内网中，且你想要处理内网中的流量，那么请启用这一选项<br>uci set ua2f.firewall.handle_intranet=1<br><br># 使用自定义 User-Agent<br>uci set ua2f.main.custom_ua="FFF"<br><br># 禁用 Conntrack 标记，这会降低性能，但是有助于和其他修改 Connmark 的软件共存<br>uci set ua2f.main.disable_connmark=1<br><br># 应用配置<br>uci commit ua2f<br><br># 开机自启<br>service ua2f enable<br><br># 启动 UA2F<br>service ua2f start</code><br><code><br># 查看 UA2F 配置文件<br>uci show |grep ua2f<br></code><img decoding="async" width="150" height="83" class="wp-image-210" style="width: 150px;" src="https://www.arkicho.cn/wp-content/uploads/2024/10/config.png" alt="" srcset="https://www.arkicho.cn/wp-content/uploads/2024/10/config.png 1508w, https://www.arkicho.cn/wp-content/uploads/2024/10/config-300x166.png 300w, https://www.arkicho.cn/wp-content/uploads/2024/10/config-768x426.png 768w" sizes="(max-width: 150px) 100vw, 150px" /><code><br># 读取日志<br>logread | grep UA2F</code></pre>



<p>完成后打开 <a href="http://ua-check.stagoh.com/">http://ua-check.stagoh.com/</a> 可以查看是否有正常工作。</p>



<p>如果路由器cpu性能很好的情况下也可以试试UA3F，但是貌似对cpu性能要求貌似远高于UA2F</p>



<p><a href="https://github.com/SunBK201/UA3F">GitHub &#8211; SunBK201/UA3F: Implementation of the next generation of HTTP User-Agent modification methodology.</a></p>



<p></p>



<p></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.arkicho.cn/blog/203/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
