<?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>未完待续</title>
	<atom:link href="https://ioio.name/feed" rel="self" type="application/rss+xml" />
	<link>https://ioio.name</link>
	<description>To Be Continued</description>
	<lastBuildDate>Fri, 20 Feb 2026 06:31:39 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
<site xmlns="com-wordpress:feed-additions:1">235906499</site>	<item>
		<title>Building a Command-Line Tool to Verify iOS AASAFiles</title>
		<link>https://ioio.name/a.html</link>
		
		<dc:creator><![CDATA[枯藤昏鸦]]></dc:creator>
		<pubDate>Fri, 20 Feb 2026 06:27:33 +0000</pubDate>
				<category><![CDATA[就是不分类]]></category>
		<guid isPermaLink="false">https://ioio.name/?p=2391</guid>

					<description><![CDATA[# Building a Command-Line Tool to Verify iOS AASA Files If you&#8217;ve ever set up Universal Links for an iOS application, you know that the Apple App Site Association (AASA) file can sometimes be a headache. Just a single typo, &#8230; <a href="https://ioio.name/a.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p># Building a Command-Line Tool to Verify iOS AASA Files</p>
<p>If you&#8217;ve ever set up Universal Links for an iOS application, you know that the Apple App Site Association (AASA) file can sometimes be a headache. Just a single typo, a missing bracket, or a misconfigured HTTP header can break deep linking entirely. </p>
<p>To make this process a bit smoother, I recently built a simple, dependency-free Python tool that verifies AASA files right from the command line.</p>
<p>## What is an AASA File?</p>
<p>The Apple App Site Association (AASA) file is a JSON file that lives on your web server. It establishes a secure connection between your domain and your iOS app, proving to Apple that you own both. When a user clicks a Universal Link (like <code>https://yourdomain.com/path</code>), iOS checks this file to see if the link should open in your app instead of Safari.</p>
<p>For this to work, the AASA file must:<br />
1. Be served over HTTPS with a valid certificate.<br />
2. Be exposed exactly at <code>/.well-known/apple-app-site-association</code> or <code>/apple-app-site-association</code>.<br />
3. Contain valid JSON syntax defining the <code>applinks</code> (and optionally <code>webcredentials</code> or <code>appclips</code>).</p>
<p>If everything is correct, Apple&#8217;s CDN will also eventually cache a copy at <code>https://app-site-association.cdn-apple.com/a/v1/[yourdomain.com]</code>.</p>
<p>## The Problem: It&#8217;s Hard to See Why It Fails</p>
<p>Usually, when deep links stop working, you&#8217;re left guessing. Is the file missing? Did the server return the wrong caching headers? Did my JSON syntax break when I updated it?</p>
<p>There are some web-based validators out there, but I wanted something I could run quickly in terminal, integrate into CI/CD pipelines, or just use locally without relying on third-party sites.</p>
<p>## Building <code>verify_aasa.py</code></p>
<p>I decided to build a simple Python script called <code>verify_aasa.py</code>. The goal was to check the common endpoints where an AASA file might live, fetch it, parse the JSON, and validate its structural integrity.</p>
<p>### 1. Fetching the File</p>
<p>The script checks three distinct locations:</p>
<p><code></code><code>python<br />
paths = [<br />
    f"https://{domain}/.well-known/apple-app-site-association",<br />
    f"https://{domain}/apple-app-site-association",<br />
    f"https://app-site-association.cdn-apple.com/a/v1/{domain}"<br />
]<br />
</code><code></code></p>
<p>It iterates through these paths using Python&#8217;s built-in <code>urllib.request</code>. If it succeeds in pulling down the valid file, it confirms the HTTP status and notes the <code>Content-Type</code> returned by the server. </p>
<p>*Note: One common hangup is that local Python environments on macOS sometimes struggle with root SSL certificates. To make the tool robust, I added a quick fallback behavior: if the <code>certifi</code> module is available, it uses that for validation; otherwise, it bypasses SSL validation and prints a warning so the user isn&#8217;t stuck behind a local configuration error.*</p>
<p>### 2. Validating the JSON</p>
<p>Once it has the file, the next step is parsing it. If the AASA file has trailing commas or weird quotes, <code>json.loads()</code> will throw an error immediately, simulating the confusion iOS might experience.</p>
<p>Assuming it passes the JSON decode, the script validates the structure:</p>
<p><code></code><code>python<br />
if 'applinks' in data:<br />
    applinks = data['applinks']<br />
    if 'details' in applinks:<br />
        for i, app in enumerate(applinks['details']):<br />
            appID = app.get('appID')<br />
            appIDs = app.get('appIDs')<br />
            # Check for modern 'components' or legacy 'paths'<br />
            # ...<br />
</code><code></code></p>
<p>A common issue nowadays is transitioning from the legacy <code>paths</code> routing to the modern <code>components</code> routing, as well as the transition from <code>appID</code> (string) to <code>appIDs</code> (array). The script validates that at least one of these is correctly defined for each block.</p>
<p>It also supports checking for the existence of <code>webcredentials</code> (Shared Web Credentials) and <code>appclips</code> (App Clips configurations).</p>
<p>## Running the Tool</p>
<p>Running the tool is simple:</p>
<p><code></code><code>bash<br />
python3 verify_aasa.py apple.com<br />
</code><code></code></p>
<p>Which produces an output like this:</p>
<p><code></code><code><br />
Verifying AASA file for domain: apple.com</p>
<p>Checking https://apple.com/.well-known/apple-app-site-association ...<br />
Found AASA file at https://apple.com/.well-known/apple-app-site-association<br />
Content-Type: None</p>
<p>Successfully parsed as JSON.</p>
<p>--- Validating AASA Structure ---<br />
Found 'applinks' key.<br />
Found 'applinks.details' key.</p>
<p>  App 1: appIDs = ['W74U47NE8E.com.apple.store.Jolly']<br />
    Uses modern 'components' routing.</p>
<p>Found 'webcredentials' key.<br />
  Includes 1 app(s) for shared web credentials.</p>
<p>Found 'appclips' key.<br />
  Includes 1 app(s) for App Clips.</p>
<p>Summary: AASA file syntax looks good!<br />
</code><code></code></p>
<p>## Wrapping Up</p>
<p>Building this little tool was a great reminder of how useful small, purpose-built CLI utilities can be. No dependencies (unless you want <code>certifi</code> for strict SSL), no web interfaces, just a quick sanity check to ensure iOS will swallow your AASA file correctly.</p>
<p>You can grab the script and use it in your own projects whenever Universal Links start acting up!<br />
https://gist.github.com/darcyliu/0f15d22751829f2fa4f5c811e15b67c8</p>
<p>-EOF-</p>
<hr /><small>Copyright &copy; 2005~2011 | <a href="https://ioio.name/a.html" title="Permalink">Permalink</a> | <a href="https://ioio.name/a.html#comments">0 Comments</a> | <a href="http://closetou.com" title="Close To U">Close To U</a> <br />
<a href="http://feeds.feedburner.com/miss">订阅</a> <a href="https://twitter.com/tearnon">Twitter</a> <a href="http://www.linode.com/?r=8dd6ddd391fc320d9f55ad101e051bde767df599">Linode VPS</a>
</small> )</small>]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2391</post-id>	</item>
		<item>
		<title>ssh stuck at expecting SSH2_MSG_KEX_ECDH_REPLY</title>
		<link>https://ioio.name/ssh-stuck-at-expecting-ssh2_msg_kex_ecdh_reply.html</link>
		
		<dc:creator><![CDATA[枯藤昏鸦]]></dc:creator>
		<pubDate>Fri, 25 Jul 2025 21:32:00 +0000</pubDate>
				<category><![CDATA[就是不分类]]></category>
		<guid isPermaLink="false">https://ioio.name/?p=2382</guid>

					<description><![CDATA[前段时间遇到使用了 WireGuard 的 IP SSH 卡在了 SSH2_MSG_KEX_ECDH_REPLY，使用主机对外的IP又能正常登陆。 debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: algorithm: sntrup761x25519-sha512@openssh.com debug1: kex: host key algorithm: ssh-ed25519 debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: compression: none debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: compression: none debug1: &#8230; <a href="https://ioio.name/ssh-stuck-at-expecting-ssh2_msg_kex_ecdh_reply.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>前段时间遇到使用了 WireGuard 的 IP SSH 卡在了 SSH2_MSG_KEX_ECDH_REPLY，使用主机对外的IP又能正常登陆。<br />
<code></code><code><br />
debug1: SSH2_MSG_KEXINIT sent<br />
debug1: SSH2_MSG_KEXINIT received<br />
debug1: kex: algorithm: sntrup761x25519-sha512@openssh.com<br />
debug1: kex: host key algorithm: ssh-ed25519<br />
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none<br />
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none<br />
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY<br />
</code><code></code></p>
<p>一番研究之后发现是 MTU 值偏低导致，在不调整 MTU 的情况下，可以更改 KexAlgorithms 或者 MACs 试试。<br />
<code></code><code><br />
ssh root@10.10.10.10 -v -o KexAlgorithms=ecdh-sha2-nistp521<br />
ssh root@10.10.10.10 -v -o MACs=hmac-sha2-256<br />
</code><code></code></p>
<p>-EOF-</p>
<hr /><h2>Related posts:</h2><ul><li><a href="https://ioio.name/a.html" rel="bookmark" title="Permanent Link: Building a Command-Line Tool to Verify iOS AASAFiles">Building a Command-Line Tool to Verify iOS AASAFiles</a></li></ul><hr /><small>Copyright &copy; 2005~2011 | <a href="https://ioio.name/ssh-stuck-at-expecting-ssh2_msg_kex_ecdh_reply.html" title="Permalink">Permalink</a> | <a href="https://ioio.name/ssh-stuck-at-expecting-ssh2_msg_kex_ecdh_reply.html#comments">0 Comments</a> | <a href="http://closetou.com" title="Close To U">Close To U</a> <br />
<a href="http://feeds.feedburner.com/miss">订阅</a> <a href="https://twitter.com/tearnon">Twitter</a> <a href="http://www.linode.com/?r=8dd6ddd391fc320d9f55ad101e051bde767df599">Linode VPS</a>
</small> )</small>]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2382</post-id>	</item>
		<item>
		<title>macOS 不借助第三方软查看图片是否含有 Alpha 通道</title>
		<link>https://ioio.name/check-image-alpha-channel-on-macos.html</link>
		
		<dc:creator><![CDATA[枯藤昏鸦]]></dc:creator>
		<pubDate>Wed, 25 Jun 2025 04:24:14 +0000</pubDate>
				<category><![CDATA[就是不分类]]></category>
		<guid isPermaLink="false">https://ioio.name/?p=2378</guid>

					<description><![CDATA[方法一： Using Preview: 1. Open the image in Preview 2. Click Tools > Show Inspector (or press Cmd + I) 3. Click the &#8220;i&#8221; tab (Information) 4. Look under &#8220;More Info&#8221; &#8211; it will show color space and bits per &#8230; <a href="https://ioio.name/check-image-alpha-channel-on-macos.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>方法一：<br />
Using Preview:<br />
1. Open the image in Preview<br />
2. Click Tools > Show Inspector (or press Cmd + I)<br />
3. Click the &#8220;i&#8221; tab (Information)<br />
4. Look under &#8220;More Info&#8221; &#8211; it will show color space and bits per component</p>
<p>方法二：<br />
Using Terminal:</p><pre class="urvanov-syntax-highlighter-plain-tag">sips -g format -g pixelWidth -g pixelHeight -g hasAlpha path/to/image.jpg</pre><p>-EOF-</p>
<hr /><h2>Related posts:</h2><ul><li><a href="https://ioio.name/gae-sdk-140-prerelease.html" rel="bookmark" title="Permanent Link: GAE SDK 1.4.0 预览版放出">GAE SDK 1.4.0 预览版放出</a></li><li><a href="https://ioio.name/judge-online-system-download-celiz-judge-system.html" rel="bookmark" title="Permanent Link: Judge Online System Download:Celiz Judge System">Judge Online System Download:Celiz Judge System</a></li><li><a href="https://ioio.name/a.html" rel="bookmark" title="Permanent Link: Building a Command-Line Tool to Verify iOS AASAFiles">Building a Command-Line Tool to Verify iOS AASAFiles</a></li><li><a href="https://ioio.name/how-to-check-which-shell-i-am-using.html" rel="bookmark" title="Permanent Link: How to check which shell I am using?">How to check which shell I am using?</a></li><li><a href="https://ioio.name/google-app-engine-roadmap-2011.html" rel="bookmark" title="Permanent Link: Google App Engine Roadmap 2011">Google App Engine Roadmap 2011</a></li></ul><hr /><small>Copyright &copy; 2005~2011 | <a href="https://ioio.name/check-image-alpha-channel-on-macos.html" title="Permalink">Permalink</a> | <a href="https://ioio.name/check-image-alpha-channel-on-macos.html#comments">0 Comments</a> | <a href="http://closetou.com" title="Close To U">Close To U</a> <br />
<a href="http://feeds.feedburner.com/miss">订阅</a> <a href="https://twitter.com/tearnon">Twitter</a> <a href="http://www.linode.com/?r=8dd6ddd391fc320d9f55ad101e051bde767df599">Linode VPS</a>
</small> )</small>]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2378</post-id>	</item>
		<item>
		<title>快速添加public ssh key到服务器</title>
		<link>https://ioio.name/how-to-add-given-public-ssh-key-to-my-server.html</link>
		
		<dc:creator><![CDATA[枯藤昏鸦]]></dc:creator>
		<pubDate>Wed, 25 Jun 2025 04:01:49 +0000</pubDate>
				<category><![CDATA[就是不分类]]></category>
		<guid isPermaLink="false">https://ioio.name/?p=2375</guid>

					<description><![CDATA[登陆服务器，然后执行 [crayon-69d127e5a5550642220526/] -EOF- Related posts:Google Public DNSSRV DNS 记录JAVA求素数算法实现ASP.NET MVC 1.0 的数据模型验证安装Visual Studio 2008 Team Foundation ServerCopyright &#169; 2005~2011 &#124; Permalink &#124; 0 Comments &#124; Close To U 订阅 Twitter Linode VPS )]]></description>
										<content:encoded><![CDATA[<p>登陆服务器，然后执行</p><pre class="urvanov-syntax-highlighter-plain-tag">mkdir -m 700 ~/.ssh
curl https://github.com/{username}.keys &gt;&gt; ~/.ssh/authorized_keys</pre><p>-EOF-</p>
<hr /><h2>Related posts:</h2><ul><li><a href="https://ioio.name/google-public-dns.html" rel="bookmark" title="Permanent Link: Google Public DNS">Google Public DNS</a></li><li><a href="https://ioio.name/srv-dns.html" rel="bookmark" title="Permanent Link: SRV DNS 记录">SRV DNS 记录</a></li><li><a href="https://ioio.name/java-prime.html" rel="bookmark" title="Permanent Link: JAVA求素数算法实现">JAVA求素数算法实现</a></li><li><a href="https://ioio.name/asp-net-mvc-1-0-onvalidate.html" rel="bookmark" title="Permanent Link: ASP.NET MVC 1.0 的数据模型验证">ASP.NET MVC 1.0 的数据模型验证</a></li><li><a href="https://ioio.name/install-visual-studio-2008-team-foundation-server.html" rel="bookmark" title="Permanent Link: 安装Visual Studio 2008 Team Foundation Server">安装Visual Studio 2008 Team Foundation Server</a></li></ul><hr /><small>Copyright &copy; 2005~2011 | <a href="https://ioio.name/how-to-add-given-public-ssh-key-to-my-server.html" title="Permalink">Permalink</a> | <a href="https://ioio.name/how-to-add-given-public-ssh-key-to-my-server.html#comments">0 Comments</a> | <a href="http://closetou.com" title="Close To U">Close To U</a> <br />
<a href="http://feeds.feedburner.com/miss">订阅</a> <a href="https://twitter.com/tearnon">Twitter</a> <a href="http://www.linode.com/?r=8dd6ddd391fc320d9f55ad101e051bde767df599">Linode VPS</a>
</small> )</small>]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2375</post-id>	</item>
		<item>
		<title>PSQL 常用命令</title>
		<link>https://ioio.name/psql-commonds.html</link>
		
		<dc:creator><![CDATA[枯藤昏鸦]]></dc:creator>
		<pubDate>Sun, 24 Nov 2024 06:18:01 +0000</pubDate>
				<category><![CDATA[就是不分类]]></category>
		<guid isPermaLink="false">https://ioio.name/?p=2356</guid>

					<description><![CDATA[创建新的数据库 [crayon-69d127e5a5685333861700/] 创建新的用户 [crayon-69d127e5a568a689199633/] 将新数据库的所有权限授予新用户 [crayon-69d127e5a568c101665569/] 删除数据库 [crayon-69d127e5a568d062926220/] 删除用户 [crayon-69d127e5a568e953429418/] -EOF- Copyright &#169; 2005~2011 &#124; Permalink &#124; 0 Comments &#124; Close To U 订阅 Twitter Linode VPS )]]></description>
										<content:encoded><![CDATA[<p>创建新的数据库</p><pre class="urvanov-syntax-highlighter-plain-tag">psql -U postgres -c &quot;CREATE DATABASE $DB_NAME;&quot;</pre><p>创建新的用户</p><pre class="urvanov-syntax-highlighter-plain-tag">psql -U postgres -c &quot;CREATE USER $DB_USER WITH PASSWORD '$DB_PASSWORD';&quot;</pre><p>将新数据库的所有权限授予新用户</p><pre class="urvanov-syntax-highlighter-plain-tag">psql -U postgres -c &quot;GRANT ALL PRIVILEGES ON DATABASE $DB_NAME TO $DB_USER;&quot;</pre><p>删除数据库</p><pre class="urvanov-syntax-highlighter-plain-tag">psql -U postgres -c &quot;DROP DATABASE IF EXISTS $DB_NAME;&quot;</pre><p>删除用户</p><pre class="urvanov-syntax-highlighter-plain-tag">psql -U postgres -c &quot;DROP USER IF EXISTS $DB_USER;&quot;</pre><p>-EOF-</p>
<hr /><small>Copyright &copy; 2005~2011 | <a href="https://ioio.name/psql-commonds.html" title="Permalink">Permalink</a> | <a href="https://ioio.name/psql-commonds.html#comments">0 Comments</a> | <a href="http://closetou.com" title="Close To U">Close To U</a> <br />
<a href="http://feeds.feedburner.com/miss">订阅</a> <a href="https://twitter.com/tearnon">Twitter</a> <a href="http://www.linode.com/?r=8dd6ddd391fc320d9f55ad101e051bde767df599">Linode VPS</a>
</small> )</small>]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2356</post-id>	</item>
		<item>
		<title>修复 WordPress 的文件读写权限错误</title>
		<link>https://ioio.name/fix-wordpress-permission.html</link>
		
		<dc:creator><![CDATA[枯藤昏鸦]]></dc:creator>
		<pubDate>Wed, 31 Jul 2024 17:50:04 +0000</pubDate>
				<category><![CDATA[就是不分类]]></category>
		<guid isPermaLink="false">https://ioio.name/?p=2350</guid>

					<description><![CDATA[如果在 WordPress Site Health 页面遇到 “Some files are not writable by WordPress”, 可以通过如下的方式解决： 1. 检查 web server 所使用的 user 账号， 比如 nginx: [crayon-69d127e5a57dc290286099/] 如上 nginx 所使用的 user 为 www-data. 2. 将 WordPress 的文件 Owner 更改成 web server user, 比如： [crayon-69d127e5a57e0804689438/] &#8230; <a href="https://ioio.name/fix-wordpress-permission.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>如果在 WordPress Site Health 页面遇到 “Some files are not writable by WordPress”, 可以通过如下的方式解决：<br />
1. 检查 web server 所使用的 user 账号， 比如 nginx:</p><pre class="urvanov-syntax-highlighter-plain-tag">cat /etc/nginx/nginx.conf
user www-data;
worker_processes auto;
pid /run/nginx.pid;
error_log /var/log/nginx/error.log;
include /etc/nginx/modules-enabled/*.conf;</pre><p>如上 nginx 所使用的 user 为 <code>www-data</code>.<br />
2. 将 WordPress 的文件 Owner 更改成 web server user, 比如：</p><pre class="urvanov-syntax-highlighter-plain-tag">chown -R www-data:www-data /the/folder/place/the/wordpress/</pre><p>重新刷新页面即可。<br />
-EOF-</p>
<hr /><h2>Related posts:</h2><ul><li><a href="https://ioio.name/display-sub-dir-in-root-dir.html" rel="bookmark" title="Permanent Link: WordPress在根目录中显示子目录下的BLOG内容">WordPress在根目录中显示子目录下的BLOG内容</a></li><li><a href="https://ioio.name/wordpress-roles.html" rel="bookmark" title="Permanent Link: WordPress用户角色">WordPress用户角色</a></li><li><a href="https://ioio.name/new-domain.html" rel="bookmark" title="Permanent Link: 换域名">换域名</a></li><li><a href="https://ioio.name/hello-how-are-you.html" rel="bookmark" title="Permanent Link: Hello,How are you!">Hello,How are you!</a></li><li><a href="https://ioio.name/wordpress-222-chinese-lang.html" rel="bookmark" title="Permanent Link: WordPress 2.2.2 简体中文语言文件">WordPress 2.2.2 简体中文语言文件</a></li></ul><hr /><small>Copyright &copy; 2005~2011 | <a href="https://ioio.name/fix-wordpress-permission.html" title="Permalink">Permalink</a> | <a href="https://ioio.name/fix-wordpress-permission.html#comments">0 Comments</a> | <a href="http://closetou.com" title="Close To U">Close To U</a> <br />
<a href="http://feeds.feedburner.com/miss">订阅</a> <a href="https://twitter.com/tearnon">Twitter</a> <a href="http://www.linode.com/?r=8dd6ddd391fc320d9f55ad101e051bde767df599">Linode VPS</a>
</small> )</small>]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2350</post-id>	</item>
		<item>
		<title>Unix/Linux enable IP forwarding(开启IP包转发)</title>
		<link>https://ioio.name/unix-linux-enable-ip-forwarding.html</link>
		
		<dc:creator><![CDATA[枯藤昏鸦]]></dc:creator>
		<pubDate>Sat, 30 Dec 2023 23:33:54 +0000</pubDate>
				<category><![CDATA[就是不分类]]></category>
		<guid isPermaLink="false">https://ioio.name/?p=2337</guid>

					<description><![CDATA[Unix/Linux在默认情况下在网络包转发是处于禁用状态的，在安装了 WireGuard 等网络流量转发软件后，需要开启IP包转发才能正常的处理来自客户的流量转发请求。 以下命令可以查询当前的 ip.forwarding 标记状态, 0表示已禁用，1表示已开启。 [crayon-69d127e5a5916646388499/] 我们可以通过设置该值为1开启IP包转发功能。 [crayon-69d127e5a591b993579382/] -EOF- Related posts:Kubernetes Dashboard Disable Token TTL/Skip Login修复Nginx + PHP 5xx ErrorPredefined macros in compilers(clang, gcc)Judge Online System Download:Celiz Judge SystemSSH Port ForwardingCopyright &#169; 2005~2011 &#124; Permalink &#124; 0 Comments &#8230; <a href="https://ioio.name/unix-linux-enable-ip-forwarding.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>Unix/Linux在默认情况下在网络包转发是处于禁用状态的，在安装了 WireGuard 等网络流量转发软件后，需要开启IP包转发才能正常的处理来自客户的流量转发请求。<br />
以下命令可以查询当前的 ip.forwarding 标记状态, 0表示已禁用，1表示已开启。</p><pre class="urvanov-syntax-highlighter-plain-tag">sysctl net.inet.ip.forwarding
sysctl net.inet6.ip6.forwarding</pre><p>我们可以通过设置该值为1开启IP包转发功能。</p><pre class="urvanov-syntax-highlighter-plain-tag">sysctl net.inet.ip.forwarding=1
sysctl net.inet6.ip6.forwarding=1</pre><p></p>
<p>-EOF-</p>
<hr /><h2>Related posts:</h2><ul><li><a href="https://ioio.name/kubernetes-dashboard-disable-token-ttl-skip-login.html" rel="bookmark" title="Permanent Link: Kubernetes Dashboard Disable Token TTL/Skip Login">Kubernetes Dashboard Disable Token TTL/Skip Login</a></li><li><a href="https://ioio.name/fix-nginx-php-5xx-error.html" rel="bookmark" title="Permanent Link: 修复Nginx + PHP 5xx Error">修复Nginx + PHP 5xx Error</a></li><li><a href="https://ioio.name/predefined-macros-in-compilersclang-gcc.html" rel="bookmark" title="Permanent Link: Predefined macros in compilers(clang, gcc)">Predefined macros in compilers(clang, gcc)</a></li><li><a href="https://ioio.name/judge-online-system-download-celiz-judge-system.html" rel="bookmark" title="Permanent Link: Judge Online System Download:Celiz Judge System">Judge Online System Download:Celiz Judge System</a></li><li><a href="https://ioio.name/ssh-port-forwarding.html" rel="bookmark" title="Permanent Link: SSH Port Forwarding">SSH Port Forwarding</a></li></ul><hr /><small>Copyright &copy; 2005~2011 | <a href="https://ioio.name/unix-linux-enable-ip-forwarding.html" title="Permalink">Permalink</a> | <a href="https://ioio.name/unix-linux-enable-ip-forwarding.html#comments">0 Comments</a> | <a href="http://closetou.com" title="Close To U">Close To U</a> <br />
<a href="http://feeds.feedburner.com/miss">订阅</a> <a href="https://twitter.com/tearnon">Twitter</a> <a href="http://www.linode.com/?r=8dd6ddd391fc320d9f55ad101e051bde767df599">Linode VPS</a>
</small> )</small>]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2337</post-id>	</item>
		<item>
		<title>修复Nginx + PHP 5xx Error</title>
		<link>https://ioio.name/fix-nginx-php-5xx-error.html</link>
		
		<dc:creator><![CDATA[枯藤昏鸦]]></dc:creator>
		<pubDate>Sat, 30 Dec 2023 00:59:04 +0000</pubDate>
				<category><![CDATA[就是不分类]]></category>
		<guid isPermaLink="false">https://ioio.name/?p=2331</guid>

					<description><![CDATA[之前时不时会收到 Google Search Console 发来的邮件告知在索引页面的时候遇到了5xx，一直都没有管。 直到上周我自己重现了一次才开始重视起来。 Search Console has identified that your site is affected by 1 Page indexing issue(s). The following issues were found on your site. Top Issues Server error (5xx) We recommend that you fix these issues &#8230; <a href="https://ioio.name/fix-nginx-php-5xx-error.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>之前时不时会收到 Google Search Console 发来的邮件告知在索引页面的时候遇到了5xx，一直都没有管。 直到上周我自己重现了一次才开始重视起来。<br />
<quote>Search Console has identified that your site is affected by 1 Page indexing issue(s). The following issues were found on your site.</quote></p>
<p>Top Issues</p>
<p>Server error (5xx)<br />
We recommend that you fix these issues when possible to enable the best experience and coverage in Google Search.<br />
检查日志发现如下内容：<br />
<code><br />
2023/12/12 01:23:45 [error] 2175086#0: *57111 connect() to unix:/run/php-fpm/www.sock failed (11: Resource temporarily unavailable) while connecting to upstream, client: 192.3.114.12, server: example.com, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm/www.sock:", host: "example.com", referrer: "http://example.com/"<br />
</code><br />
于是跑了一遍压力测试，发现将近一半的请求都遇到5xx错误，同时日志中产生如上记录。<br />
<code><br />
wrk -t12 -c400 -d30s https://ioio.name<br />
</code></p>
<p>便因此做了一下研究，主要参考 <a href="https://serverfault.com/questions/867866/11-resource-temporarily-unavailable-while-connecting-to-upstream-bad-gateway" target="_blank" rel="noopener">11: Resource temporarily unavailable, while connecting to upstream + Bad Gateway (Nginx)</a></p>
<p>通过执行如下命令调整了 net.core.somaxconn 及 net.core.netdev_max_backlog<br />
<code><br />
echo "net.core.somaxconn = 65535" | sudo tee -a /etc/sysctl.conf<br />
sudo sysctl -p<br />
echo "net.core.netdev_max_backlog = 65535" | sudo tee -a /etc/sysctl.conf<br />
sudo sysctl -p<br />
</code></p>
<p>更新nginx配置文件，给 FastCGI service 添加</p><pre class="urvanov-syntax-highlighter-plain-tag">fastcgi_keep_conn on;</pre><p></p>
<p>然后重启服务</p><pre class="urvanov-syntax-highlighter-plain-tag">systemctl restart php-fpm.service
systemctl restart nginx</pre><p></p>
<p>再次运行压力测试，错误消失。<br />
<code><br />
wrk -t12 -c400 -d30s https://ioio.name<br />
Running 30s test @ https://ioio.name<br />
12 threads and 400 connections<br />
Thread Stats   Avg      Stdev     Max   +/- Stdev<br />
Latency   180.51ms   88.60ms   1.91s    89.36%<br />
Req/Sec   109.17     32.60   212.00     71.29%<br />
39114 requests in 30.08s, 1.86GB read<br />
Socket errors: connect 158, read 0, write 0, timeout 0<br />
Requests/sec:   1300.31<br />
Transfer/sec:     63.29MB<br />
</code><br />
-EOF-</p>
<hr /><h2>Related posts:</h2><ul><li><a href="https://ioio.name/fix-wordpress-permission.html" rel="bookmark" title="Permanent Link: 修复 WordPress 的文件读写权限错误">修复 WordPress 的文件读写权限错误</a></li><li><a href="https://ioio.name/jquery-error-event.html" rel="bookmark" title="Permanent Link: jQuery取得页面JavaScript错误">jQuery取得页面JavaScript错误</a></li><li><a href="https://ioio.name/lion-install-mod-python.html" rel="bookmark" title="Permanent Link: [Mac OS X]Lion编译安装mod_python">[Mac OS X]Lion编译安装mod_python</a></li><li><a href="https://ioio.name/gae-templatedoesnotexist-error.html" rel="bookmark" title="Permanent Link: GAE TemplateDoesNotExist Error">GAE TemplateDoesNotExist Error</a></li><li><a href="https://ioio.name/using-recaptcha-with-google-app-engine.html" rel="bookmark" title="Permanent Link: 在GAE中使用reCAPTCHA">在GAE中使用reCAPTCHA</a></li></ul><hr /><small>Copyright &copy; 2005~2011 | <a href="https://ioio.name/fix-nginx-php-5xx-error.html" title="Permalink">Permalink</a> | <a href="https://ioio.name/fix-nginx-php-5xx-error.html#comments">0 Comments</a> | <a href="http://closetou.com" title="Close To U">Close To U</a> <br />
<a href="http://feeds.feedburner.com/miss">订阅</a> <a href="https://twitter.com/tearnon">Twitter</a> <a href="http://www.linode.com/?r=8dd6ddd391fc320d9f55ad101e051bde767df599">Linode VPS</a>
</small> )</small>]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2331</post-id>	</item>
		<item>
		<title>How to Install PostgreSQL on FreeBSD</title>
		<link>https://ioio.name/how-to-install-postgresql-on-freebsd.html</link>
		
		<dc:creator><![CDATA[枯藤昏鸦]]></dc:creator>
		<pubDate>Sat, 18 Nov 2023 21:24:14 +0000</pubDate>
				<category><![CDATA[就是不分类]]></category>
		<guid isPermaLink="false">https://ioio.name/?p=2326</guid>

					<description><![CDATA[1. Update all available repository and upgrade all packages to the latest [crayon-69d127e5a5bb9656338219/] 2. Install PostgreSQL 13 [crayon-69d127e5a5bbd983251472/] 3. Add the PostgreSQL to the system boot: [crayon-69d127e5a5bbe383431048/] 4. Initialize the PostgreSQL database [crayon-69d127e5a5bc0271467476/] 5. Start the PostgreSQL service and check &#8230; <a href="https://ioio.name/how-to-install-postgresql-on-freebsd.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>1. Update all available repository and upgrade all packages to the latest</p><pre class="urvanov-syntax-highlighter-plain-tag">pkg update
pkg upgrade</pre><p>2. Install PostgreSQL 13</p><pre class="urvanov-syntax-highlighter-plain-tag">pkg install postgresql13-server postgresql13-client</pre><p>3. Add the PostgreSQL to the system boot:</p><pre class="urvanov-syntax-highlighter-plain-tag">sysrc postgresql_enable=yes</pre><p>4. Initialize the PostgreSQL database</p><pre class="urvanov-syntax-highlighter-plain-tag">/usr/local/etc/rc.d/postgresql initdb</pre><p>5. Start the PostgreSQL service and check its status</p><pre class="urvanov-syntax-highlighter-plain-tag">service postgresql start
service postgresql status</pre><p>-EOF-</p>
<hr /><h2>Related posts:</h2><ul><li><a href="https://ioio.name/update-freebsd-hostname.html" rel="bookmark" title="Permanent Link: Update FreeBSD hostname">Update FreeBSD hostname</a></li><li><a href="https://ioio.name/ubuntu-pil.html" rel="bookmark" title="Permanent Link: Ubuntu 安装 Python Imaging Library (PIL)">Ubuntu 安装 Python Imaging Library (PIL)</a></li><li><a href="https://ioio.name/how-to-install-openvpn-on-a-debianubuntu-vps.html" rel="bookmark" title="Permanent Link: 如何在 Debian/Ubuntu VPS 安装 OpenVPN">如何在 Debian/Ubuntu VPS 安装 OpenVPN</a></li><li><a href="https://ioio.name/install-wget.html" rel="bookmark" title="Permanent Link: wget的下载与安装">wget的下载与安装</a></li><li><a href="https://ioio.name/ubuntu-filezilla-putty-bluefish.html" rel="bookmark" title="Permanent Link: Ubuntu 下常用工具软件的安装">Ubuntu 下常用工具软件的安装</a></li></ul><hr /><small>Copyright &copy; 2005~2011 | <a href="https://ioio.name/how-to-install-postgresql-on-freebsd.html" title="Permalink">Permalink</a> | <a href="https://ioio.name/how-to-install-postgresql-on-freebsd.html#comments">0 Comments</a> | <a href="http://closetou.com" title="Close To U">Close To U</a> <br />
<a href="http://feeds.feedburner.com/miss">订阅</a> <a href="https://twitter.com/tearnon">Twitter</a> <a href="http://www.linode.com/?r=8dd6ddd391fc320d9f55ad101e051bde767df599">Linode VPS</a>
</small> )</small>]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2326</post-id>	</item>
		<item>
		<title>Kubernetes Dashboard Disable Token TTL/Skip Login</title>
		<link>https://ioio.name/kubernetes-dashboard-disable-token-ttl-skip-login.html</link>
		
		<dc:creator><![CDATA[枯藤昏鸦]]></dc:creator>
		<pubDate>Mon, 06 Feb 2023 06:51:09 +0000</pubDate>
				<category><![CDATA[就是不分类]]></category>
		<guid isPermaLink="false">https://ioio.name/?p=2314</guid>

					<description><![CDATA[The default token TTL for Kubernetes Dashboard is 10 minutes, it is inconvenient in a development environment. We can remove this limit by disabling the TTL or enabling the skip login. 1. Inspect the configuration for kubernetes-dashboard kubectl -n kubernetes-dashboard &#8230; <a href="https://ioio.name/kubernetes-dashboard-disable-token-ttl-skip-login.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>The default token TTL for Kubernetes Dashboard is 10 minutes, it is inconvenient in a development environment. We can remove this limit by disabling the TTL or enabling the skip login.</p>
<p>1. Inspect the configuration for kubernetes-dashboard<br />
<code><br />
kubectl -n kubernetes-dashboard describe deployments kubernetes-dashboard<br />
</code><br />
You may see <code>--auto-generate-certificates</code> in the **arg** section.</p>
<p>2. Update the configuration to add <code>--token-ttl=0</code> to  disable the session timeout; add <code>-enable-skip-login</code> to enable the skip login button.<br />
<code><br />
kubectl -n kubernetes-dashboard edit deployments kubernetes-dashboard</code></p>
<p><code><br />
</code><code>Args:<br />
--auto-generate-certificates<br />
--token-ttl=0<br />
--enable-skip-login<br />
--enable-insecure-login<br />
</code><br />
-EOF-</p>
<hr /><h2>Related posts:</h2><ul><li><a href="https://ioio.name/chrome-os-preview.html" rel="bookmark" title="Permanent Link: Chrome OS 拿什么去爱你">Chrome OS 拿什么去爱你</a></li><li><a href="https://ioio.name/windows-7-ubuntu-google-wave.html" rel="bookmark" title="Permanent Link: Windows 7//Ubuntu 9.10//Google Wave">Windows 7//Ubuntu 9.10//Google Wave</a></li><li><a href="https://ioio.name/mail-system-login-code.html" rel="bookmark" title="Permanent Link: 多系统邮箱快速登陆入口">多系统邮箱快速登陆入口</a></li><li><a href="https://ioio.name/antlr-reference-manual.html" rel="bookmark" title="Permanent Link: [资料]ANTLR参考手册中文版 下载">[资料]ANTLR参考手册中文版 下载</a></li><li><a href="https://ioio.name/python-ftp-upload.html" rel="bookmark" title="Permanent Link: Python一键FTP传文件">Python一键FTP传文件</a></li></ul><hr /><small>Copyright &copy; 2005~2011 | <a href="https://ioio.name/kubernetes-dashboard-disable-token-ttl-skip-login.html" title="Permalink">Permalink</a> | <a href="https://ioio.name/kubernetes-dashboard-disable-token-ttl-skip-login.html#comments">0 Comments</a> | <a href="http://closetou.com" title="Close To U">Close To U</a> <br />
<a href="http://feeds.feedburner.com/miss">订阅</a> <a href="https://twitter.com/tearnon">Twitter</a> <a href="http://www.linode.com/?r=8dd6ddd391fc320d9f55ad101e051bde767df599">Linode VPS</a>
</small> )</small>]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2314</post-id>	</item>
	</channel>
</rss>
