Archive of

Install Debian 10 by an ISO file on VPS

I bought a VPS from http://virmach.com five years ago. It had been running Ubuntu 14.04 OS for over five years. It was stable but a bit out-of-date. Firstly I tried the Ubuntu 18 template, which was builtin by the cheap Vps provider (virmach). Unfortunately, I cannot log into the system after the OS installation, it always automatically refused my ssh connection, and continuously told me my password is wrong through the HTML5 vnc console. It's already very late yesterday evening, I was tired and wanted to give up.

Then I found the Debian 10 Server X64 ISO file on the cdrom TAB. I love Debian, so I decided give it a go before going to bed. That's a very familiar and happy process. I just want to record the main steps of the process as a memo. Here it is

  1. mount the ios file you needed
  2. setup the boot sequence to CDROM first
  3. reboot your VPS and open the HTML vnc pannel
  4. Install the OS
  5. setup the boot sequence to HDD only
  6. Reboot

Shadowsocks for Windows Kcptun 插件配置指南

“把文档写详细点会死吗?” 大概率会吧。虽然我来写未必会更好,但我还是要批评 ShadowsocksX-NG 和 Shadowsocks for windows 的项目的 README.md 文件。
起因:我妹夫访问我的翻墙服务器实在是太脏话慢了。虽然我这会身在墙外,然而身为墙国人,祖国总会给机会锤炼你的翻墙技术。所以,本着药不能停的原则,我又拣起了高速翻墙的技能。

下面是我最后成功完成配置的具体步骤。

  1. 在你的服务器上搭好 Shadowsocks 和 Kcp server。
  2. shadowsocks/windows 下载最新版,并解压缩到你打算放置的地方,比如 Desktop\shadowsocks。
  3. 这里 下载Kcptun 最新版,把解压出来的 client_windows_amd64.exe 放到刚才放置 shadowsocks.exe 文件的同一文件夹。
  4. 配置shadowsocks

假定你的shadowsocks配置是:

{
    "server":"0.0.0.0",
    "server_port":8964,
    "local_port":1080,
    "password":"your-secure-password",
    "timeout":60,
    "method":"chacha20-ietf-poly1305"
}

假定你的 Kcptun server 配置是:

./server_linux_amd64 -t 127.0.0.1:8964 -l :28964 -mode fast3 -key chrd5 -sockbuf 16777217 -nocomp -dscp 46 -crypt none

则你的Shadowsocks for windows 需要如下配置:

Server IP: your-server-ip-or-domain
Server Port: 28964
Password: your-secure-password
Encryption: chacha20-ietf-poly1305
Plugin Program: client_windows_amd64.exe
Plugin Opts:
                    [v] Need Plugin Argument
Plugin Arguments: -l %SS_LOCAL_HOST%:%SS_LOCAL_PORT% -r %SS_REMOTE_HOST%:%SS_REMOTE_PORT% -key chrd5 -crypt none -mode fast3 -nocomp
Remarks: AnythingYouLike

注意事项

  • Server Port 是 Kcptun 监听端口,不是 Shadowsocks 监听端口
  • Plugin Program 那里填 client_windows_amd64.exe 文件的相对或绝对路径文件名。我上面让你把解压出来的文件扔到 shadowsocks.exe 同一文件夹,就是这里填写文件。
  • Plugin arguments 所有参数前缀都是一个 - 字符,网上有些教程会写成 --, 这可能是个坑。

就这样。希望也能帮到你。如果你遇到了麻烦,不要客气也不要担心自己的问题幼稚,欢迎留言给我,只要我及时看到并有空,就会帮忙。

tldr; 设置要点见下图

Guide for ShadowsocksX-NG with kcptun plugin configuration

There's little information on the internet about configuring the Kcptun plugin for ShadowsocksX-NG. It is necessary to write a blog to record the process that how I configured it, as it is not only helpful for myself later, and it could help the others who need it. Let's start.

  1. Download the latest ShadowsocksX-NG release and install it on your macOS (It is v1.9.3 when I wrote this article. If you meet issues with newer version, maybe it is worth to try the v1.9.3 release), it is the easiest step. You won't meet any problems at this stage.

  2. The following are samples for shadowsocks server configuration and Kcptun server configuration:

Sample for the shadowsocks-libev config.json

{
    "server":"0.0.0.0",
    "server_port":8964,
    "local_port":1080,
    "password":"your-secure-password",
    "timeout":60,
    "method":"chacha20-ietf-poly1305"
}

Sample for the Kcptun server configuration 

./server_linux_amd64 -t 127.0.0.1:8964 -l :28964 -mode fast3 -key chrd5 -sockbuf 16777217 -nocomp -dscp 46 -crypt none

Your configuration may be different from the samples, it doesn't matter.

  1. The configuration details
Address: your-server-ip-or-domain
Port: 28964
Encryption: chacha20-ietf-poly1305
Password: your-secure-password
Plugin: kcptun
Plugin Opts: key=chrd5;crypt=none;mode=fast3;sockbuf=16777217;nocomp;dscp=46
Remarks: AnythingYouLike

What you need to pay attention to in the upper configuration:

  1. The Port should be the Port that your Kcptun server is listening to, not the port that your Shadowsocks server is listening.
  2. For the Plugin Opts, you don't need to specify any IP or Port parameters.
  3. You don't need to download the Kcptun plugin by yourself, because it is builtin in latest release.

That's all.

dotnet-ef summary

Instal dotnet-ef

dotnet tool install -g dotnet-ef --version 3.1.1

Add Migration

dotnet-ef migrations add migration-name [-c SomeDbContext]

Update Database

dotnet-ef update database [migration-name] [-c SomeDbContext]

Revert All Database Update

dotnet-ef update database 0 [-c SomeDbContext]

Windows is still a buggy and uncomfortable OS in 2020

I would like to give Windows 10 a try after the promise 12 years ago. I got a job a month ago, and I need to write ASP.NET Core application for this job. Though Asp.NET core and C# taste good, windows 10 makes me upset once more.

Twelve years ago, that was the year 2008, I left windows XP for Arch Linux. I promised I will never use Windows as my main OS in the future at that time. My boss bought me an excellent DELL laptop with 32GB memory and equipped a 15" 4k screen. Yes, it is preinstalled with Windows 10 Professional.

Today I have installed autojump, Wrox on windows 10, and changed a few settings here and there to reach my requirements. I know I may insist on Windows for a bit long time because I need the job to live and I should give Windows another go. I hope I can feel better later. The Windows 10 system does improve a lot than its previous version, however, the feeling, I cannot tell. Another long way to go, or it may never be perfect.

Good luck to me, and to windows.