LiteServer Project Minecraft 主站
LiteServer Project Minecraft 国际站
友链: 白天的小站
此时还不能配置BGP对话, 需要先建立起连接才可以
安装 Strongswan (IPSec VPN)
1 | sudo apt install strongswan strongswan-pki |
配置ipsec, 配置文件路径 /etc/ipsec.conf
1 | config setup |
其中vti脚本内容如下, 路径 /var/lib/strongswan/ipsec-vti.sh
(源自网络,见参考)
1 | #!/bin/bash |
调整 charon 配置, 不要安装路由 (下一步由bird2配置具体的路由, 否则会像WireGuard一样安装一个0.0.0.0/0的路由) /etc/strongswan.d/vti.conf
这里其实有点像wg的Table=off
1 | charon { |
配置防火墙/端口转发(如有需要), ipsec使用: 500/udp,4500/udp,4510/udp,4511/udp
通过命令启动/关闭/查看ipsec隧道
启动: sudo ipsec start
关闭: sudo ipsec stop
查看状态 sudo ipsec statusall
(也可以使用 sudo ipsec status
)
看到ESTABLISHED
字样就表明已经建立连接了 (这里只能看到一个因为写文章的时候已经开始回收测试环境了)
1 | Status of IKE charon daemon (strongSwan 5.9.5, Linux 5.15.0-107-generic, x86_64): |
创建高可用VPN, 本质是一个隧道组,要实现HA,最少需要 2 中的两个网卡每个网卡配置一条隧道到1,最多可以配置 n*m 个隧道
安装BIRD2 sudo apt install bird2
编写bird2配置 /etc/bird/bird.conf
1 | log syslog all; |
重加载bird配置 sudo birdc configure
查看bird协议状态 sudo birdc show protocol all
1 | BIRD 2.0.8 ready. |
没问题的话就能看到GCP推送过来的路由了 ip route
1 | ... |
How to set up a VPN between strongSwan and Cloud VPN
Using Strongswan to setup site to site IPsec VPN between GCP and Digital Ocean
Configuring Site-to-Site IPSec VPN on Ubuntu using Strongswan
Figuring out how ipsec transforms work in Linux
Establish VPN tunnel for in-house machine to access GCP network
KB: Connecting OpenWRT/LEDE router to Azure Virtual Network Gateway (IKEv2)
Secure site-to-site connection with Linux IPsec VPN
Google Cloud HA VPN interoperability guide for AWS
How does IPsec VPN really work?
Google史一样的文档: Create two fully configured HA VPN gateways that connect to each other | Establish BGP sessions
GCP Networking: Part 2 Cloud Router
howto/Bird2 - dn42 虽然是dn42的教程但是非常管用
不知道为啥缺氧没做这个功能, 创意工坊里也没有做这个的人, 只好自己写个脚本来做了. 特别感谢 @RoboPhred 提供的 oni-save-parser
1 | const { readFileSync, writeFileSync } = require("fs"); |
经手的一部分项目使用了rate.Limiter
作为限流器, 但是使用了atomic.Value
包裹. 猜测本意可能是为了多协程安全, 但实际上rate.Limiter
本身就支持多协程访问. 最终导致了线上限流器行为与预期不符(大约超过限流2倍左右). 在更新限流器限流的时候, 应该使用 SetLimit
或 SetLimitAt
来更新限流配置.
1 | func main() { |
现象: Ctrl+Alt+M / 多显示器菜单切换无效, 选择新布局模式后屏闪并且仍然只使用一块显示器.
修复方式: 客户机打开服务: 停止 vm3dservice (VMware SVGA Helper Service) 将启动设置改为禁用即可.
VMware workstation pro 17 验证有效.
补充: 全屏模式下 Ctrl+Alt, Alt+Space, N 即可最小化当前正在运行的VM
Multi-monitor still broken, does anybody have a solution / workaround ?
docker compose 模式部署的 gitea 在某次更新之后开始大量出现如下报错:
1 | Feb 12 17:23:37 VM-0-16-ubuntu gitea_compose_giteadb_1[3927]: 2024-02-12 9:23:37 3103704 [ERROR] Incorrect definition of table mysql.column_stats: expected column 'histogram' at position 10 to have type longblob, found type varbinary(255). |
错误量非常巨大给syslog打崩了, 日志滚动的时候负载特别高会出现无法连接的问题. 经排查发现是mariadb升级的时候没有自动升级库表结构引起. 在 docker-compose.yml mariadb
中添加 MARIADB_AUTO_UPGRADE=1
环境变量再 docker-compose up -d
即可修复.
Incorrect definition of table mysql.column_stats: expected column ‘hist_type’ … #25970
【大型催泪鬼畜】赵本山宋丹丹《白云黑土爱情故事》完整版MV首发!笑着笑着就哭了
Hoàng Read - The Magic Bomb (Questions I get asked) [Official Audio] 抽象手舞蹈BGM
ปูหนีบอีปิ (Poo Neep E-Pi) - พร จันทพร พอดีม่วน [OFFICIAL VIDEO] Lisa螃蟹舞BGM
Nee Jathaga Full Video Song - Yevadu Video Songs - Ram Charan, Allu Arjun, Shruti Hassan, Kajal Nee…
2NE1 - “I’m Busy (난 바빠) (Color Coded Lyrics Eng/Rom/Han/가사) bang bang bang bey bey bey
[MV] Lee Hyori(이효리) _ 10 Minutes
王不醒 - 佛说不配 (抖音热播DJ版) Phật Nói Không Xứng Đáng (Remix)『佛说不配,酒又下肚两杯,你有别人陪你不醉不归』【2k22抖音火流行歌曲推荐TikTok】
Computer Chip Walking To Stayin’ Alive Synced to Music 原曲: Bee Gees - Stayin’ Alive (Official Music Video)
ERUPTION - ONE WAY TICKET / BONEY M - RASPUTIN / DJ DALI MIX / HQ HD
认清现实の小曲.mp3完整版素材 | The Amazing Digital Circus [End Orchestral Theme] | EPIC VERSION (Your New Home)
German Soldier’s Song - “Erika” (with English Subtitles) 希希哈哈的小曲
The Perfect Girl 绝命毒师meme曲
Mareux - The Perfect Girl (The Motion Retrowave Remix) 复古蒸汽波版
Mareux - The Perfect Girl (Retrowave/Synthwave cover) Slowed Reverb 蒸汽慢摇版
T-ARA(티아라) _ Sexy Love (Dance Ver. MV) B站舞蹈区BGM Sexy Love
Project Zomboid Remastered OST - Main Theme PZ主题曲
我知道你对我最好 | 《小丑の小曲》1.3x蚊子版 | 勵陽 - 我知道你『我知道你 在我世界最重要』【動態歌詞Lyrics】
问题现象
1 | sudo podman create network test |
报错提示
1 | WARN[0000] Error validating CNI config file /etc/cni/net.d/test.conflist: [plugin bridge does not support config version "1.0.0" plugin portmap does not support config version "1.0.0" plugin firewall does not support config version "1.0.0" plugin tuning does not support config version "1.0.0"] |
解决方案
看起来是Ubuntu2204的已知问题, 需要手动安装最新版本的containernetworking-plugins
打开下载页面, 下载最新的deb包
sudo dpkg -i containernetworking-plugins_1.1.1+ds1-3build1_amd64.deb
Podman automatically sets cniVersion 1.0.0 instead of 0.4.0
Error validating CNI config file and network errors in rootful podman #14189
需要两个配置文件
消费远端消息 mirrormaker-consumer.config
(注: remote-kafka
需要在 /etc/hosts
里添加配置, 下同)
1 | bootstrap.servers=remote-kafka:9092 |
投递到本地的Kafka集群 mirrormaker-producer.config
1 | bootstrap.servers=local-kafka:9092 |
启动 Kafka Mirror Maker
1 | #!/bin/bash |
mirror-maker虽然不被confluent看重(可能是因为他们有专门的同步工具), 不过还是非常好用的. 在线上实际跑了将近三个月的时间, 其自带的重试功能可以保证同步意外断开之后无人值守地自动恢复.
retention.ms - Kafka topic configuration reference | Confluent Documentation 配置消息过期时间
Docker Configuration Parameters for Confluent Platform