scw instance server create type=STARDUST1-S zone=fr-par-1 image=arch_linux root-volume=l:10G name=v6instance ip=none ipv6=true project-id=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx
- 安装keyring:
pacman -S archlinux-keyring
- 全面更新系统:
pacman -Syu
- 安装vi并编辑DNS64:
pacman -S vi
vi /etc/resolve.conf
nameserver 2001:67c:2b0::4
nameserver 2001:67c:2b0::6
nameserver 2001:67c:27e4::64
nameserver 2001:67c:27e4::60
- 安装一些基础包:
pacman -S base-devel git vim
- 新建用户:
useradd --create-home yunyuyuan
,改密:passwd yunyuyuan
- 添加至sudoer:
usermod -aG wheel yunyuyuan
,visudo
打开wheel
- 临时git地址,
vi /etc/hosts
:
2a01:4f8:c010:d56::2 github.com
2a01:4f8:c010:d56::3 api.github.com
2a01:4f8:c010:d56::4 codeload.github.com
2a01:4f8:c010:d56::5 objects.githubusercontent.com
su yunyuyuan
切换到非sudo用户
- 安装yay:
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
yay -S v2ray
sudo vim /etc/v2ray/config.json
{
"inbounds": [
{
"port": 18686,
"protocol": "vmess",
"settings": {
"clients": [
{
"id": "b831381d-6324-4d53-ad4f-8cda48b30811"
}
]
},
"streamSettings": {
"network": "ws",
"wsSettings": {
"path": "/wspath"
}
}
}
],
"outbounds": [
{
"protocol": "freedom",
"settings": {}
}
]
}
sudo systemctl enable --now v2ray
yay -S cloudflared
cloudflared tunnel login
cloudflared tunnel create scaleway
cloudflared tunnel list
cloudflared tunnel route dns scaleway v2ray-sw-cf.yunyuyuan.net
vim ~/.cloudflared/config.yml
tunnel: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
credentials-file: /home/yunyuyuan/.cloudflared/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.json
ingress:
- hostname: v2ray-sw-cf.yunyuyuan.net
service: http://localhost:18686
- service: http_status:404
cloudflared tunnel --edge-ip-version=6 run scaleway
After editing the nameserver for DNS64, we should run
/etc/rc.d/network restart
to restart the network. This way, maybe we can avoid rebooting when startingclatd
.