MoreRSS

site iconVincent Yang修改

DeepLX作者。2000年,天秤座,美国计算机科学硕士。篮球爱好者,金州勇士队粉丝,喜欢旅行,尤其是海边,Golang编程。
请复制 RSS 到你的阅读器,或快速订阅到 :

Inoreader Feedly Follow Feedbin Local Reader

Vincent Yang的 RSS 预览

Know ShadowTLS too late

2025-05-05 22:10:28

正如标题写的那样,ShadowTLS 相见恨晚

偶然在 Mihomo 的 Issue 里面看到作者说 ShadowTLS 还很稳,所以没必要支持 XHTTP。看了一下 ShadowTLS 的作者竟然是我关注了很久的大佬 ihc

看了一下 GitHub 的文档,发现部署 ShadowTLS 其实非常简单。我尝试在日本 IIJ 的服务器上部署了一下,发现速度很不错。并且 Surge 和 Shadowrocket 都支持 ShadowTLS。之前一直在用 Snell,但是苦于 Snell 必须要依赖 Surge,很难分享给没有 Surge 的朋友使用。ShadowTLS 刚好解决了这个问题。

由于 老刘没有提供 Snell Server 的 Docker Image,我在 geekdada/snell-server-docker 的基础上改进了一下,支持了 Github Actions 的自动构建,并且支持了更多的环境变量。

如何部署

本文只介绍如何使用 Docker Compose 部署 ShadowTLS + Shadowsocks 和 ShadowTLS + Snell。

https://github.com/missuo/snell-server-docker

ShadowTLS + Shadowsocks

# Create directory and navigate to it
mkdir shadowtls-shadowsocks
cd shadowtls-shadowsocks

# Download compose file
wget -O compose.yaml https://raw.githubusercontent.com/missuo/snell-server-docker/refs/heads/master/compose-shadowsocks.yaml

# Generate random password for enhanced security
openssl rand -base64 32

# Edit the compose file with your configuration
nano compose.yaml

# Start the containers
docker compose up -d

# Check logs
docker compose logs

ShadowTLS + Snell

# Create directory and navigate to it
mkdir shadowtls-shadowsocks
cd shadowtls-shadowsocks

# Download compose file
wget -O compose.yaml https://raw.githubusercontent.com/missuo/snell-server-docker/refs/heads/master/compose-shadowsocks.yaml

# Generate random password for enhanced security
openssl rand -base64 32

# Edit the compose file with your configuration
nano compose.yaml

# Start the containers
docker compose up -d

# Check logs
docker compose logs

其中我提供的 compose 文件使用的是 ShadowTLS V3 (Strict Mode)。

PostgreSQL Master-Slave Synchronization

2025-05-04 13:43:07

本来一直在用 Supabase,但是苦于 Free Plan 只能创建两个 Database,所以不得不寻找其他方案。

最初的想法是,在我美国的不同地区的 Servers 上部署 PG Instance,并且实现 HA (High Availability) 和 Replication。但是我发现如果要实现 HA,至少需要三个 Servers,而且需要保证三个 Servers 之间的优秀的网络。我又没有那么多 Servers,所以最后放弃了 HA。仅保留了主从 Replication,也就是说只要我在 Master 上创建了 Database,那么从数据库也会自动创建一个相同的 Database,并且自动同步数据。

我找到了一个相对来说比较简单的方案,就是使用 bitnami/postgresql 这个 Docker Image。

部署

Master Instance

services:
  postgres-primary:
    image: bitnami/postgresql:latest
    env_file:
      - .env
    restart: always
    volumes:
      - ./data/primary:/bitnami/postgresql
    ports:
      - "5432:5432"
# .env
POSTGRESQL_REPLICATION_MODE=master
POSTGRESQL_REPLICATION_USER=replicator
POSTGRESQL_REPLICATION_PASSWORD=password_hard_to_guess
POSTGRESQL_USERNAME=postgres
POSTGRESQL_PASSWORD=password_hard_to_guess
POSTGRESQL_DATABASE=mydb

Slave Instance

services:
  postgres-replica:
    image: bitnami/postgresql:latest
    env_file:
      - .env
    restart: always
    volumes:
      - ./data/replica:/bitnami/postgresql
    ports:
      - "5433:5432"
POSTGRESQL_REPLICATION_MODE=slave
POSTGRESQL_REPLICATION_USER=replicator
POSTGRESQL_REPLICATION_PASSWORD=password_hard_to_guess
POSTGRESQL_MASTER_HOST=master_instance_public_ip
POSTGRESQL_MASTER_PORT_NUMBER=5432
POSTGRESQL_USERNAME=postgres
POSTGRESQL_PASSWORD=password_hard_to_guess
POSTGRESQL_DATABASE=mydb

其中 Slave Instance 的 Port 其实可以不用映射到公网,因为 Slave 只负责同步数据,不负责对外提供服务。当然,我暴露 5433 是为了连接 Slave Instance 测试是否能实现自动同步。

我的 Master Instance 部署在 Los Angeles, CA,然而 Slave Instance 部署在 Pittsburgh, PA 家里的 PVE 的 Debian VM 上,实际测试下来效果非常好,能否实现几乎无延迟的同步。

优化

  • 使用 TLS 加密所有 Postgres 连接。
  • 计划实现真正的高可用性 (例如 Patroni 或 pg_auto_failover) 。

Proxmox VE smooth upgrade

2025-04-11 01:38:10

Recently, PVE released version 8.4.0, while I am still using 8.3.0 and plan to upgrade to the latest version.

  1. Open the PVE management backend, select pve, and click Shell. This will open the command line for PVE.

  2. By default, if there is no enterprise subscription, updates cannot be checked, so you need to add a no-subscription source.list.

nano /etc/apt/sources.list.d/pve-no-subscription.list
# Enter the following line
deb http://download.proxmox.com/debian/pve bookworm pve-no-subscription
  1. Update the PVE source and upgrade the PVE.
apt update
apt list --upgradable
apt dist-upgrade
reboot
  1. After the upgrade is complete, check the PVE version.
pveversion -v

Get an US DL with a Chinese DL

2025-04-03 14:39:02

使用中国驾照及翻译件在美国租车,大部分的租车公司会租给你,当然其实这样的操作在美国的部分州是不合法的。所以,如果有美国驾照就会方便很多,更重要的是持有美国驾照可以去 AAA 换取国际驾照(IDP),这样就可以在全世界范围内租车了。

20250403KzSaN5

灰色部分是不承认 IDP 的国家和地区。(非洲和南美洲部分地区以及中国大陆不能使用 IDP 开车)

本文主要介绍的是使用中国驾照在美国新泽西州申请美国驾照的保姆级攻略。

材料准备

  • 中国驾照原件
  • 中国驾照翻译件原件(可以找 Aiqiang Chen 翻译,如果想要省钱也可以自行翻译)
  • SSN 原件 (如果没有可以使用 I-94 或者 I-20 代替)
  • 护照
  • 地址证明(Checking Account Statement)

申请流程

尽管 NJ 有很多的 MVC,但是根据网友的反馈,绝大多数的 MVC 都可能会需要路考,所以我个人仅推荐成功率比较高的可以 Waive 路考的 MVC,比如:

  • North Bergen
  • Bayonne
  • Lodi

我有尝试过 Oakland 最终失败了,而且一旦你在别的 MVC 通过了 Knowledge Test,并且已经拿到了 Learner Permit,那就没有办法再 Waive 路考了。只能等待两年 Learner Permit 过期后重新申请。

上述提到的三家 MVC 离 NYC 都比较近,加上广受好评,导致预约非常困难。一般只能约到起码 20 天之后的时间。根据我的经验,其实只有有脚本一直监控空余的预约,是可以约到当天的时间的,为此我专门写了一个脚本监控这三家 MVC 未来三天内的空余预约,你可以订阅我的 Telegram Channel 收到通知。

在任何一家的 MVC 你都需要先拿着预约进去,然后工作人员会在名单上找你的名字,当然如果是当天捡漏的预约的话,他们的名单上可能没有你的名字,你只要把预约成功的邮件或者短信给工作人员看即可。他就会给你一张表格让你填写。应该先选择 Learner Permit 的申请,填完之后前往 ID Check 窗口,其实这一步就是帮你检查材料是否齐全,这个时候你需要跟他说你有中国驾照,并且你想 Waive 路考。工作人员帮你检查完材料确定无误之后,会给你分配一个号码,等到叫号之后前往窗口提交材料。这个时候需要拍照,签名,支付 $10 的 Learner Permit 费用。他会问你是否需要今天参加 Knowledge Test,如果是的话接下来就等待叫号参加笔试。

先是测试视力,然后上机笔试,通过之后,就到了最关键的 Waive 路考环节。如果在 North Bergen 申请的话,需要你打开 12123 的 App 上的电子版中国驾照查看,请注意美国的 IP 根本无法登录,这边建议你提前准备好香港的 IP 或者中国大陆 IP 的 VPN。

这一步完成之后,接下来应该重新 ID Check 一遍,然后获取一个号码,等待叫号办理 Full License。但是很多 MVC 不让在当天进行到这一步,通常会让你第二天再来。由于这个业务没办法预约,会导致第二天只能 Walk-in 办理,目前知道的情况是每家 MVC 每天都有 Walk-in 的名额,但是具体是多少,我还没有去验证过,理论上去得早的话应该肯定没什么问题。如果他们没有给你 Walk-in 的名额,你可以尝试直接到 ID Check 窗口,你可以跳过门口检查预约的地方,因为通常上一天的工作人员会给你那张填写的卡片。

第二天的这个流程其实很简单,就是 ID Check 完,等叫号去办理的窗口,拍照,签字,支付 $24 的 Full License 费用,等待 20 天左右就可以收到邮寄的正式驾照了。

注意事项

  • 如果你在别的州有 Permit 和 License,他们理论上不会给你 Waive 路考,但是似乎他们查询不到你是否有别的州的 Permit 和 License。
  • 关于地址证明,仅需打开 Chase App 修改到 NJ 朋友家的地址即可。
  • 关于笔试,个人觉得 Aiqiang Chen 的题库看起来确实很多题目很接近很困惑,例如罚款多少钱,几年内不能考驾照类似那些,但是实际上考试很简单,都是一些基础题目。
  • 关于 Real ID 的申请,我强烈不建议申请 Real ID,即使 Real ID 的法案在五月就要生效了。Real ID License 的有效期仅有一年,而 Standard License 的有效期是四年。
  • 关于 IDP,需要等你拿到正式驾照之后才可以去 AAA 申请。

监控三家 MVC 空余预约

暂时不会考虑开源代码,你仅需订阅频道就可以收到实时的消息。有需要代抢和预约的朋友欢迎给我发邮件 [email protected]

Permanently free Google Workspace

2025-03-21 13:18:59

2022 年的时候偶然在 Twitter 上看到 luolei帖子,才知道 Google Workspace 原来有永久免费的版本。

经过一番搜索发现,这个永久免费的 Google Workspace Starter 版本是由 G Suite Legacy 升级过去的,而在 2022 年这个时间点,G Suite Legacy 已经停止服务了。但是好消息是从 G Suite Legacy 升级为 Google Workspace Starter 的通道还在,只要承诺是仅个人使用。(截止到我写这篇博客的时候似乎通道已经在 2023 年 8 月 21 日关闭)

https://support.google.com/a/answer/60217

以上是原来的升级通道,仅需点击承诺仅个人使用即可完成升级。好处是升级之后会从 100 人变为 300 人的版本,另外 G Suite Legacy 本来是无法换绑域名的,你只能添加额外的域名,而升级到了 Google Workspace Starter 之后,你甚至可以移除原来的域名。

2022 年 10 月 17 日,我在 Google 找了一个相对便宜的网站,入手了 G Suite Legacy 并成功升级到了 Google Workspace Starter。当时花费 $60,后来有很多朋友私信询问购买渠道,后来商家可能知道需求突然变高,开始涨价。而到今天,虽然还能买到 G Suite Legacy,但是不确定能否升级到 Google Workspace Starter。

20250321FP3oyx

As of August 21, 2023, you can no longer identify as a personal user and revert to a no-cost subscription. If you already identified that you use your account for personal use, you don’t need to take any further action at this time.

The no-cost subscription is only intended for personal non-commercial use. If you used G Suite legacy free edition for business purposes, we transitioned your account to Google Workspace. The no-cost subscription does not include support, and in the future we may remove certain business functionality.

以上是官方的原话,很有可能永久免费的 Google Workspace 将成为真正的「传家宝」。

我在过去用过腾讯企业邮箱,阿里云企业邮箱,网易企业邮箱,Lark,Yandex Mail,Mail.ru 等等,但是这些都远不上 Google Workspace。自从 Gemini 推出之后,现在使用 Google Workspace Starter 的所有成员都可以免费使用 Gemini 相关的 AI 功能。例如 Summarize 和补全等功能。更重要的是可以绑定很多域名,我目前已经绑定了 12 个域名。具体关于这个 Plan 的详细信息可以参考 https://workspace.google.com/pricing

截止发文前看了一下之前买的网站,现在 G Suite Legacy 10 Users 的版本售价为 $90,当然在本文我不会推荐任何的商家,感兴趣的可以自行谷歌搜索。

Guess the Flight from the Picture

2025-03-20 11:00:21

I often see friends posting pictures of themselves on airplanes in their WeChat Moments or Instagram Stories, but most of them put mosaics on their boarding passes or photos. However, as a flight enthusiast, I always try to find out the exact flight number, as well as the origin and destination of the flight.

202503190q8pYt

Today’s challenge is, can you tell which flight this picture is from?

At first, I felt clueless when I saw this picture. I focused on the display screen on the right, but the screen only showed switching between English, Chinese, and Japanese, which didn’t seem to have any useful information. After zooming in and looking closely, I found that the aircraft is a Boeing 777-300, and the operating airline is Air New Zealand. Combined with the fact that it was posted 1 hour ago, meaning it took off about an hour ago. Of course, if you didn’t know it was an Air New Zealand aircraft, you could also guess from the language switching on the display that the airline should be from an English-speaking country. Adding the crucial information my friend wrote, an 8-hour flight, the information is sufficient.

I opened Flightradar24 and started searching for all live flights of Air New Zealand that took off about an hour ago and had a flight duration of around 8 hours. Finally, I found it.

NZ175
Aircraft type: Boeing 777-319(ER)
Registration: ZK-OKN
Route: Auckland - Perth

I remembered a screenshot I saw on WeChat Moments before, which only showed departure from PVG and the boarding gate was DXX. Since the D gates at PVG are for international flights, I clicked on all PVG departures and checked the boarding gates. Finally, I matched it to the Shanghai to Singapore flight.

You might think I’m doing something very boring, but I find this process very interesting. It teaches me to pay attention to all the details and to make good use of tools.