部署情况

主站已将HTTP代理替换为gost, 可以替代frp的http proxy plugin功能!

参考

ginuerzh/gost: GO Simple Tunnel - a simple tunnel written in golang

GO Simple Tunnel GO语言实现的安全隧道 [官网]

使用Gost搭建一个快速简单的Socks5代理通道

以下两篇信息并不是很准确, 可能是基于旧版gost的, 放在这里仅作参考:

利用 GOST 搭建加密中转隧道(UDP+TCP)

比ssr、ss更好用的代理 GOST——-详解

首先在Proxmox页面扩展VM磁盘的大小(Resize disk), 此处扩展20GB.

在VM内找到这个需要扩展的磁盘, 此处是/dev/sda. 因为采用的是VirtIO SCSI, 所以VM内此时dmesg会提示如下的消息:

1
2
3
[1478256.083257] sd 2:0:0:0: Capacity data has changed
[1478256.083554] sd 2:0:0:0: [sda] 251658240 512-byte logical blocks: (129 GB/120 GiB)
[1478256.083652] sda: detected capacity change from 107374182400 to 128849018880

使用fdisk命令打开这个磁盘, 可以看到GPT PMBR size mismatch的错误, 稍后会修复这个问题.

1
2
3
4
5
6
7
8
root@lsp-sg-game-1:~# fdisk /dev/sda

Welcome to fdisk (util-linux 2.34).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

GPT PMBR size mismatch (209715199 != 251658239) will be corrected by write.
The backup GPT table is not on the end of the device. This problem will be corrected by write.

使用 p 命令查看当前磁盘上的分区

1
2
3
4
5
6
7
8
9
10
11
12
13
Command (m for help): p

Disk /dev/sda: 120 GiB, 128849018880 bytes, 251658240 sectors
Disk model: QEMU HARDDISK
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 04727CFD-CF21-418E-9D6E-3521DAC444F4

Device Start End Sectors Size Type
/dev/sda1 2048 4095 2048 1M BIOS boot
/dev/sda2 4096 209715166 209711071 100G Linux filesystem

删除/dev/sda上的2号分区, 即/dev/sda2

1
2
3
4
Command (m for help): d
Partition number (1,2, default 2): 2

Partition 2 has been deleted.

新建2号分区, First sectorLast sector保持默认即可, 提示已存在ext4文件系统时注意不要删除.

1
2
3
4
5
6
7
8
9
Command (m for help): n
Partition number (2-128, default 2): 2
First sector (4096-251658206, default 4096):
Last sector, +/-sectors or +/-size{K,M,G,T,P} (4096-251658206, default 251658206):

Created a new partition 2 of type 'Linux filesystem' and of size 120 GiB.
Partition #2 contains a ext4 signature.

Do you want to remove the signature? [Y]es/[N]o: N

最后使用w命令保存.

1
2
3
4
Command (m for help): w

The partition table has been altered.
Syncing disks.

使用partprobe命令重新加载分区表, 此时再使用dffdisk命令分别查看文件系统和磁盘分区

1
2
3
root@lsp-sg-game-1:~# df -h .
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 99G 69G 25G 74% /
1
2
3
4
5
6
7
8
9
10
11
12
root@lsp-sg-game-1:~# fdisk -l /dev/sda
Disk /dev/sda: 120 GiB, 128849018880 bytes, 251658240 sectors
Disk model: QEMU HARDDISK
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 04727CFD-CF21-418E-9D6E-3521DAC444F4

Device Start End Sectors Size Type
/dev/sda1 2048 4095 2048 1M BIOS boot
/dev/sda2 4096 251658206 251654111 120G Linux filesystem

此时会发现磁盘分区已经扩大了, 但是文件系统还没有. 使用resize2fs命令完成这个扩展

1
2
3
4
5
root@lsp-sg-game-1:~# resize2fs /dev/sda2
resize2fs 1.45.5 (07-Jan-2020)
Filesystem at /dev/sda2 is mounted on /; on-line resizing required
old_desc_blocks = 13, new_desc_blocks = 15
The filesystem on /dev/sda2 is now 31456763 (4k) blocks long.

再使用df命令查看, 可以发现文件系统已经扩展完成了.

1
2
3
root@lsp-sg-game-1:~# df -h .
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 118G 65G 48G 58% /

以上只针对Proxmox VirtIO磁盘进行的在线升级. 对于不支持在线升级的情况, 使用gparted ISO重启VM, 然后按照页面提示操作即可.

参考

Expanding virtual disk without downtime - is it possible?

Linux追加磁盘扩展

Resize a Linux filesystem without LVM

Changing a partition with fdisk shows a warning like “partition#x contains ext4-signature”

Resize disks - Proxmox VE

Syrex Best Nightcore Gaming Mix 2021 👾

俺の愛馬が!

RUSH E, RUSH “ #1 “ crazy finger “24”.

Sheet Music Boss - Rush Collection - Full Album

【原音画质】Mememe Dice

咩咩咩的骰子啦!

凯露酱的欧派啊!

咩咩咩的惠惠啦!

俺の愛馬が! (Mememe Dice)

遊戲王 熱き決闘者たち (11分不間斷版)【作業用BGM】

Đông Miên 司南 - 冬眠 (DJ Pad仔 Remix)

阿悠悠 - 旧梦一场 (DJ版) Một Giấc Mộng Xưa - A Du Du (Remix Tiktok) || China Mix New Song 2020 || Douyin

[ Full ] 姚六一 - 隔岸 (DJ抖音版) Cách Ngạn Remix Tiktok - Diêu Lục Nhất DJ完整版 | Hot Trend Tiktok Douyin【抖音】

往期优秀作品推荐

2021年11月

现象: Win+L锁屏之后, 显示器一直亮着显示锁屏页面, 而不是等待大约30秒到1分钟后自动关闭显示器.

原因: 系统上运行着的某些程序要求显示器长亮且不能关闭

解决: 打开有管理员权限的cmd窗口, 通过这个命令进行查找: powercfg -requests

这个命令会返回对系统电源有额外要求的程序, 例如:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
DISPLAY:
[PROCESS] \Device\HarddiskVolume3\Program Files\Oculus\Support\oculus-runtime\OVRServer_x64.exe
VR Active

SYSTEM:
无。

AWAYMODE:
无。

执行:
无。

PERFBOOST:
无。

ACTIVELOCKSCREEN:
无。

可以看到是Oculus VR这个程序对显示(DISPLAY)有长亮的要求, 那么只需要关闭他即可.

打开【服务】,查找OVRService, 调整服务属性为手动, 然后停止服务.

再运行一次powercfg -requests看不到这个程序了, 锁屏后恢复自动息屏.

参考

电脑锁屏后无法自动息屏怎么办?

How do I stop the Oculus processes from starting automatically the whole time?

Windows下开发OpenSSL建议使用LibreSSL.

一句话快速生成SSL证书和Key文件

1
openssl req -x509 -newkey rsa:4096 -keyout serverkey.pem -out servercert.pem -sha256 -days 365 -nodes

其中-nodes是不需要额外密码保护key的意思.

有关TLS安全Socket编程的实际使用, 参考我的 Kiritow/GSock2: General Socket Wrapper Version 2

参考

Simple TLS Server

SSL/TLS Client

Verify errorcode = 20 : unable to get local issuer certificate

Confusion between using BIO and SSL functions on OpenSSL 我就觉得BIO_和SSL_系列函数共存而且名字都差不多就离谱.

Using OpenSSL TLS with or without BIO? 所以SSL_系函数是相对简单的一个系列.

Using OpenSSL with memory BIOs

Use OpenSSL with Asynchronous Sockets, I/O Completion Ports and Ceritificate Signing

LibreSSL替代OpenSSL

另: 下面这两篇写的还行, 但用的是BIO, 而且实测是有bug的, 比较具有误导性

OpenSSL client and server from scratch, part 2 —— Server

OpenSSL client and server from scratch, part 3 & OpenSSL client and server from scratch, part 4 —— Client

GSock2 现已支持 Windows IOCP 与 Linux epoll. 目前iocp的实现尚在开发中, 会有一些bug存在, 并不建议在生产环境中使用.

参考

I/O Completion Ports MSDN上的一篇概述文章

CreateIoCompletionPort function , GetQueuedCompletionStatus function (ioapiset.h) 两个重要的IOCP方法

IOCP完整例子 这篇文章比较好理解一些

microsoft/Windows-classic-samples/IocpServerex.Cpp 官方IOCP服务器样例 虽然看起来非常头皮发麻

Windows下IOCP踩过的一些坑 这个看着也很头皮发麻…

WINDOWS下两种IOCP实现的差距 但是, 众所周知, IOCP的意思就是多个线程等待在IOCP handle上, 所以所谓的“经典”实现不过是简单版实现而已.

iocp网络通信之如何判断客户端连接断开

How close a socket (with IOCP) properly after sending?

IOCP socket termination

The difference between Socket and WSASocket

The I/O Completion Port IPv4/IPv6 Server Program Example

TCP and UDP discovery methods

How to use FormatMessage c++ for getting english only messages

Some latency measurement pitfalls

Through the Years (2018) - S3RL & Zero-2 ft Yurino

Alfons, B3nte, Jessica Chertock - Puppeteer (with B3VA) [Official Audio]

Mashup of absolutely every TheFatRat song ever (Super Extended)

Ravers MashUp - S3RL

Dead Or Alive - You Spin Me Round (Like a Record) (Official Video)

S3RL Always Presents…

S3RL Presently Presents…

TheFatRat 1 Million Subscriber Mega Mix

TheFatRat - End Of The Decade (Mixtape)

カッコイイ曲メドレー ☆BESTⅡ+Ⅲ☆ 東方Vocal神曲 Ver2017 【ZETA】

BFF - S3RL

Earth B♭ - S3RL ft Lexi

75 Minutes of Calming Minecraft Music

我想把世界上所有全明星都杀了

我喜提生日

只会摇头晃脑的小初音也想跳宅舞那咋办嘛 · 1/6

【初音ミク】跟笨蛋一樣(da me da ne)

【初音ミク交响乐2019】1/6 -out of the gravity- feat. 初音ミク 【オーケストラ ライブCD】

【初音ミク】太阳系迪斯可【ナユタン星人】[ 转载中文字幕 ]

初音未来——太阳系迪斯科 现场版

初音未来 千本樱【60帧演唱会版】 现场版

【GUMI】KING【Kanaria】

你在看别的女人吗? 【男配音】 VRChat

《 你 在 看 别 的 女 人 吗?》

哥 谭 厨 师

电棍、七海专区

因为纯度太高所以单独开个专区记录

🦈有有有…..有起了病吧🐒

🦈Ring Ring Ring🐒

🦈不该🐒

🐒shape of ybb🦈

🦈寄明月🦈

🦈怪物🐒

电棍:国玉的战争 电棍:国玉的战争(不跑调版)

电棍:向♿奔去(修复版)

电棍:大耳朵获嘉

【电棍】“再见了妈妈,今晚我猪鼻巴巴”

往期优秀作品推荐

2021年8月

Windows默认远程桌面的帧率限制是30fps, 可通过以下方法提升远程桌面的体验:

注: 以下改动均需要再远程目标机上修改, 重启后生效

  1. 调整fps限制到60

编辑注册表 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations, 新增DWORD32键: DWMFRAMEINTERVAL, 修改值为 15 (十进制)

  1. 优化远程桌面编码

打开组策略管理器, 点击: 计算机配置-管理模板-Windows组件-远程桌面服务-远程桌面会话主机-远程会话环境,在右侧找到 为远程桌面连接设置 H.264/AVC 444 图形模式的优先级, 双击打开改为已启用

  1. 远程主机有显卡硬件的时候的进一步优化

在刚刚的组策略中启用 将硬件图形适配器应用于所有远程桌面服务会话配置远程桌面链接的 H.264/AVC 444 硬件编码

测试

可以在远程桌面上打开 TestUFO 查看当前远程会话的最高刷新率并评估体验.

参考

Improve Microsoft Remote Desktop RDP frame rate up to 60fps!

Frame rate is limited to 30 FPS in Windows 8 and Windows Server 2012 remote sessions

RDP 优化操作 微软远程桌面 开启显卡加速、60FPS、USB设备重定向

Windows远程桌面开启60帧,打造云游戏主机,随时随地畅玩大作

批量向MySQL插入数据时, 自增ID的变化根据策略的不同可能会体现出不同的反应.

有三种innodb_autoinc_lock_mode设置,

  1. traditional (0)

  2. consecutive (1)

  3. Interleaved (2)

当配置为interleaved会出现并发插入的时候, 自增ID出现一定长度的断层.

参考

When I INSERT multiple rows into a MySQL table, will the ids be increment by 1 everytime?

MySQL 14.6.1.6 AUTO_INCREMENT Handling in InnoDB

原文地址: 从软件历史看架构的未来:编程不再是精英们的游戏 - InfoQ

站内备份地址

看法

看完这篇文章之后,不得不称赞是一篇极具有前瞻性的好文,同时我开始担忧起自己的职业生涯了😢

不过,这篇文章里提到的云不可知是我认为最具琢磨的一点。如果所有服务,RDB,KV,Cache等都能通过某种语言无关的方式,比如基于http通信,使用标准化的OpenAPI等进行交互,或者类似于sidecar的方式注入到service mesh部署的服务森林中,这无疑降低了程序员的入门门槛,降低了成本和出错的概率,缩小了错误扩散的面积,对产业前进是好处。但同时也让程序员的定义发生了变化。程序员不再需要长期的高等教育培训,也不需要再掌握多门语言多种技术,更不需要所使用技术的原理,这仿佛确实变成了切切实实的CURD boy或者更进一步,脚本小子。如果人人都会这种东西,那是什么让每个人在行业中具有不可替代性呢?