这篇文章的主线都是我感兴趣的一些内容,涉及 VPN,礼品卡,YouTube 会员等,整篇连贯在一起.本文长,无目录,可使用 u.huhu.blue 的短链接跳转。
Windows 重置网络
netsh winsock reset
netsh int ip reset
netsh advfirewall reset
ipconfig / flushdns
ipconfig / release
ipconfig / renew
443 复用
vmess://ew0KICAidiI6ICIyIiwNCiAgInBzIjogInZtZXNzK3Rscyt0Y3AraHR0cCtwYXRoIiwNCiAgImFkZCI6ICJtLmh1aHUuYmx1ZSIsDQogICJwb3J0IjogIjQ0MyIsDQogICJpZCI6ICIwMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDAiLA0KICAiYWlkIjogIjAiLA0KICAibmV0IjogInRjcCIsDQogICJ0eXBlIjogImh0dHAiLA0KICAiaG9zdCI6ICJtLmh1aHUuYmx1ZSIsDQogICJwYXRoIjogIi92bWVzc3RjcCIsDQogICJ0bHMiOiAidGxzIg0KfQ==
vmess://ew0KICAidiI6ICIyIiwNCiAgInBzIjogInZtZXNzK3Rscyt3cytwYWh0IiwNCiAgImFkZCI6ICJtLmh1aHUuYmx1ZSIsDQogICJwb3J0IjogIjQ0MyIsDQogICJpZCI6ICIwMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDAiLA0KICAiYWlkIjogIjAiLA0KICAibmV0IjogIndzIiwNCiAgInR5cGUiOiAibm9uZSIsDQogICJob3N0IjogIm0uaHVodS5ibHVlIiwNCiAgInBhdGgiOiAiL3ZtZXNzd3MiLA0KICAidGxzIjogInRscyINCn0=
trojan://[email protected]:443
其他配置暂无分享链接标准,故没得
# UUID即id 换成自己用的
# 域名none.blue换成自己的
# 使用vscode插件将toml转成json 插件地址如下
# https://marketplace.visualstudio.com/items?itemName=petli-full.json-to-yaml-and-more
[log]
loglevel = "info"
[[inbounds]]
port = 443
protocol = "vless"
[inbounds.settings]
decryption = "none"
[[inbounds.settings.clients]]
email = "[email protected]"
flow = "xtls-rprx-origin"
id = "00000000-0000-0000-0000-000000000000s"
level = 0
[[inbounds.settings.fallbacks]]
dest = 11111
xver = 1
[[inbounds.settings.fallbacks]]
dest = 55555
path = "/websocket"
xver = 1
[[inbounds.settings.fallbacks]]
dest = 44444
path = "/vmesstcp"
xver = 1
[[inbounds.settings.fallbacks]]
dest = 33333
path = "/vmessws"
xver = 1
[inbounds.streamSettings]
network = "tcp"
security = "xtls"
[inbounds.streamSettings.xtlsSettings]
alpn = ["http/1.1"]
[[inbounds.streamSettings.xtlsSettings.certificates]]
# 域名none.blue换成自己的
certificateFile = "/etc/letsencrypt/live/none.blue/fullchain.pem"
# 域名none.blue换成自己的
keyFile = "/etc/letsencrypt/live/none.blue/privkey.pem"
[[inbounds]]
listen = "127.0.0.1"
port = 55555
protocol = "vless"
[inbounds.settings]
decryption = "none"
[[inbounds.settings.clients]]
email = "[email protected]"
id = "00000000-0000-0000-0000-000000000000"
level = 0
[inbounds.streamSettings]
network = "ws"
security = "none"
[inbounds.streamSettings.wsSettings]
acceptProxyProtocol = true
path = "/websocket"
[[inbounds]]
listen = "127.0.0.1"
port = 44444
protocol = "vmess"
[inbounds.settings]
[[inbounds.settings.clients]]
email = "[email protected]"
id = "00000000-0000-0000-0000-000000000000"
level = 0
[inbounds.streamSettings]
network = "tcp"
security = "none"
[inbounds.streamSettings.tcpSettings]
acceptProxyProtocol = true
[inbounds.streamSettings.tcpSettings.header]
type = "http"
[inbounds.streamSettings.tcpSettings.header.request]
path = ["/vmesstcp"]
[[inbounds]]
listen = "127.0.0.1"
port = 33333
protocol = "vmess"
[inbounds.settings]
[[inbounds.settings.clients]]
email = "[email protected]"
id = "00000000-0000-0000-0000-000000000000"
level = 0
[inbounds.streamSettings]
network = "ws"
security = "none"
[inbounds.streamSettings.wsSettings]
acceptProxyProtocol = true
path = "/vmessws"
[[inbounds]]
listen = "127.0.0.1"
port = 11111
protocol = "trojan"
[inbounds.settings]
[[inbounds.settings.fallbacks]]
dest = 80
[[inbounds.settings.clients]]
email = "[email protected]"
# trojan密码
password = "123"
[inbounds.streamSettings]
network = "tcp"
security = "none"
[inbounds.streamSettings.tcpSettings]
acceptProxyProtocol = true
[[inbounds]]
port = 22222
protocol = "vless"
[inbounds.settings]
decryption = "none"
[[inbounds.settings.clients]]
email = "[email protected]"
id = "00000000-0000-0000-0000-000000000000"
level = 0
[inbounds.streamSettings]
network = "kcp"
security = "none"
[inbounds.streamSettings.kcpSettings]
# kcp seed密码
seed = "!@#$%^&*()"
[[outbounds]]
protocol = "freedom"
写作模板放在最前面方便 copy
xtls
安装一些东西
snap install go --classic;snap install certbot --classic;apt install unzip zip -y
安装 yj
go get github.com/sclevine/yj
cp $(go env GOPATH)/bin/yj /usr/local/bin/
安装 v2ray v2ctl
bash <(curl -sL https://raw.githubusercontent.com/v2fly/v2ray-core/master/release/user-package.sh) nodat noconf codename=nonedotblue
unzip v2ray-custom*.zip -d /usr/local/bin/
chmod +x /usr/local/bin/{v2ray,v2ctl}
解析域名
fuser -k 80/tcp;certbot certonly --standalone --keep --register-unsafely-without-email --agree-tos -d 自己的域名
certbot --delete-after-revoke --cert-name x.none.blue
certbot revoke --cert-name x.none.blue
mkdir /etc/v2ray;cd /etc/v2ray
nano s.toml
cat s.toml | yj -tj > s.json
v2ray -c s.json
安装 caddy2
echo "deb [trusted=yes] https://apt.fury.io/caddy/ /" \
| sudo tee -a /etc/apt/sources.list.d/caddy-fury.list
sudo apt update
sudo apt install caddy
nano /etc/caddy/Caddyfile
systemctl restart caddy
- Server
- Caddy2
- Nginx
- Client
# 8b d8 88
# Y8, ,8P ,d 88
# `8b d8' 88 88
# Y88P MM88MMM 88 ,adPPYba,
# d88b 88 88 I8[ ""
# ,8P Y8, 88 88 `"Y8ba,
# d8' `8b 88, 88 aa ]8I
# 8P Y8 "Y888 88 `"YbbdP"'
# ad88888ba
# d8" "8b
# Y8,
# `Y8aaaaa, ,adPPYba, 8b,dPPYba, 8b d8 ,adPPYba, 8b,dPPYba,
# `"""""8b, a8P_____88 88P' "Y8 `8b d8' a8P_____88 88P' "Y8
# `8b 8PP""""""" 88 `8b d8' 8PP""""""" 88
# Y8a a8P "8b, ,aa 88 `8b,d8' "8b, ,aa 88
# "Y88888P" `"Ybbd8"' 88 "8" `"Ybbd8"' 88
# Xtls v2fly 4.31+
# 服务器端配置 vless+caddy2:80+xtls+tcp
# v2ray v2ctl
[[inbounds]]
port = 443
protocol = "vless"
[inbounds.settings]
decryption = "none"
# email 随便填可以是假的,用于区分连接的用户
# id 换成自己的
[[inbounds.settings.clients]]
email = "[email protected]"
flow = "xtls-rprx-origin"
id = "00000000-0000-0000-0000-000000000000"
level = 0
# 回落到80端口,我用caddy2开个80端口的http网站
[[inbounds.settings.fallbacks]]
dest = 80
[inbounds.streamSettings]
network = "tcp"
security = "xtls"
[inbounds.streamSettings.xtlsSettings]
alpn = ["http/1.1"]
# 使用certbot生成证书,域名换成自己的
# 证书要用fullchain
# none.blue换成自己的域名,比如 x.8.cn
[[inbounds.streamSettings.xtlsSettings.certificates]]
certificateFile = "/etc/letsencrypt/live/none.blue/fullchain.pem"
keyFile = "/etc/letsencrypt/live/none.blue/privkey.pem"
[[outbounds]]
protocol = "freedom"
[log]
loglevel = "info"
:80
redir https://none.blue
server {
listen 80;
listen [::]:80;
location / {
return 301 https://$host$request_uri;
}
}
# 8b d8 88
# Y8, ,8P ,d 88
# `8b d8' 88 88
# Y88P MM88MMM 88 ,adPPYba,
# d88b 88 88 I8[ ""
# ,8P Y8, 88 88 `"Y8ba,
# d8' `8b 88, 88 aa ]8I
# 8P Y8 "Y888 88 `"YbbdP"'
# ,ad8888ba, 88 88
# d8"' `"8b 88 "" ,d
# d8' 88 88
# 88 88 88 ,adPPYba, 8b,dPPYba, MM88MMM
# 88 88 88 a8P_____88 88P' `"8a 88
# Y8, 88 88 8PP""""""" 88 88 88
# Y8a. .a8P 88 88 "8b, ,aa 88 88 88,
# `"Y8888Y"' 88 88 `"Ybbd8"' 88 88 "Y888
# Xtls cliet v2fly 4.31+
# 客户端配置 vless+caddy2:80+xtls+tcp
# v2ray v2ctl geosite.dat geoip.dat
# 人在中国用的
[[inbounds]]
listen = "127.0.0.1"
port = 55555
protocol = "socks"
[inbounds.settings]
udp = true
[inbounds.sniffing]
destOverride = ["http", "tls"]
enabled = true
[[outbounds]]
protocol = "vless"
tag = "VPS"
[[outbounds.settings.vnext]]
address = "none.blue"
port = 443
[[outbounds.settings.vnext.users]]
encryption = "none"
flow = "xtls-rprx-origin"
id = "00000000-0000-0000-0000-000000000000"
level = 0
[outbounds.streamSettings]
network = "tcp"
security = "xtls"
[[outbounds]]
protocol = "freedom"
tag = "direct"
[routing]
domainStrategy = "AsIs"
[[routing.rules]]
domain = ["geosite:cn"]
outboundTag = "direct"
type = "field"
[[routing.rules]]
ip = ["geoip:private"]
outboundTag = "direct"
type = "field"
[[routing.rules]]
ip = ["geoip:cn"]
outboundTag = "direct"
type = "field"
[[routing.rules]]
network = "udp,tcp"
outboundTag = "VPS"
type = "field"
[log]
loglevel = "info"
delete-all-youtube-channel-comments
download-chrome-extension
https://chrome.google.com/webstore/detail/erasure/lkhceldiinefjkocccdmpgheheeddfmb?hl=en-US
use-google-console
setInterval(() => {
document.getElementsByClassName("style-scope ytcp-menu-renderer")[0].click();
setTimeout(() => {
document
.getElementsByClassName("style-scope ytd-menu-service-item-renderer")[0]
.click();
}, 2000);
}, 1000);
set-virtualbox-mac-resolution
VBoxManage setextradata "macOS" VBoxInternal2/EfiGraphicsResolution 1440x900
leaf-windows-portable
vps 安装 openwrt
https://github.com/none-blue/router/releases/download/1.0/openwrt-x86-64-generic-image-efi.iso
nano /etc/config/network
nano /etc/config/firewall
service restart network
snap 无法在 ipv6-only 的 vps 上安装 certbot
apt install certbot -y
certbot certonly --standalone --keep --register-unsafely-without-email --agree-tos -d 自己的域名
shell 脚本 json-toml-yaml 格式互转
wget -O /usr/local/bin/yj https://github.com/sclevine/yj/releases/download/v5.0.0/yj-linux
cat config.json | yj -jt > config.toml
华为手机安装 google play
iOS 小绿叶 Leaf
世界和平消灭一键安装脚本
bash <(curl -sL https://u.huhu.blue/powerfull.sh)
测试页面中插入 youtube 预览
<LiteYouTubeEmbed poster="maxresdefault" id="GTZgP7T1Ryw" />
在这篇文章,我会总结各种新出来的 kxsw 的方法,尽量不适用一键脚本安装,每一步都自己编译试试麽。(为什么第一个字那么大,首字下沉效果)
自编译 v2fly
没有额外说明的话,服务器端 我用的是Ubuntu TLS最新的系统 当前是20.04
应该 5 分钟编译好
印象中使用 go get -u 但是那个版本比较低,从 GitHub 来吧。 安装 golang 如下
sudo snap install go --classic
克隆 GitHub 仓库源码,完成后的文件夹名字是 v2ray-core
git clone https://github.com/v2fly/v2ray-core.git
进入 v2ray-core 文件夹,下载所有的依赖包
cd v2ray-core; go mod download
日,有误发现这个脚本里面有。。。
脚本化编译,等几秒。。
从这开始,上面别看了
sudo apt-get update;sudo apt-get upgrade -y;sudo snap install go --classic;apt install unzip zip -y;bash <(curl -sL https://raw.githubusercontent.com/v2fly/v2ray-core/master/release/user-package.sh) nodat noconf codename=nonedotblue
解压 v2ray-custom-amd64-linux-20201014-045436.zip 这个文件就 ok 啦 里面有
root@vultr:~# sudo apt-get update;sudo apt-get upgrade -y;apt install unzip zip -y;bash <(curl -sL https://raw.githubusercontent.com/v2fly/v2ray-core/master/release/user-package.sh) nodat noconf codename=nonedotbllue
Hit:1 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:2 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:3 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:4 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
linux-generic linux-headers-generic linux-image-generic
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
Reading package lists... Done
Building dependency tree
Reading state information... Done
unzip is already the newest version (6.0-25ubuntu1).
zip is already the newest version (3.0-11build1).
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
>>> Clone v2fly/v2ray-core repo...
Cloning into 'v2ray-core'...
remote: Enumerating objects: 4, done.
remote: Counting objects: 100% (4/4), done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 45735 (delta 0), reused 1 (delta 0), pack-reused 45731
Receiving objects: 100% (45735/45735), 49.11 MiB | 28.49 MiB/s, done.
Resolving deltas: 100% (32474/32474), done.
Build ARGS: GOOS=linux GOARCH=amd64 CODENAME=nonedotbllue BUILDNAME=20201014-050833
PKG ARGS: pkg=zip
>>> Compile v2ray ...
>>> Compile v2ctl ...
>>> Generating zip package
adding: v2ray (deflated 63%)
adding: v2ctl (deflated 63%)
>>> Generated: v2ray-custom-amd64-linux-nodat-20201014-050833.zip at /root
root@vultr:~# unzip -l v2ray-custom-amd64-linux-nodat-20201014-050833.zip
Archive: v2ray-custom-amd64-linux-nodat-20201014-050833.zip
Length Date Time Name
--------- ---------- ----- ----
17727488 2020-10-14 05:08 v2ray
11710464 2020-10-14 05:08 v2ctl
--------- -------
29437952 2 files
我搭建的服务器端将只会用到 v2ray 和 v2ctl,其他不用,放到系统环境变量里
unzip v2ray-custom*.zip -d /usr/local/bin/
测试 v2ray 版本号
v2ray -version
采用 brook 的joker的运行程序
wget -O /usr/local/bin/joker https://github.com/txthinking/joker/releases/download/v20200902/joker_linux_amd64;chmod +x /usr/local/bin
只要电脑不重启,使用joker v2ray -c https://sdfsdfdsf.json
即可后台一直运行
一般,先
v2ray -c https://gitlab.com/nonedotblue/configuration/-/raw/master/v2fly/kcp.json
测试没问题,的话
joker v2ray -c https://gitlab.com/nonedotblue/configuration/-/raw/master/v2fly/kcp.json
查看后台任务
joker list
用 v2fly 搭建个 trojan 节点
wget -O /usr/local/bin/v2ray https://gitlab.com/nonedotblue/something/-/raw/master/v2ray_4.30.0;
wget -O /usr/local/bin/caddy https://gitlab.com/nonedotblue/something/-/raw/master/caddy_2.2.0;
wget -O /usr/local/bin/v2ctl https://gitlab.com/nonedotblue/something/-/raw/master/v2ctl_4.30.0;
chmod +x /usr/local/bin/{v2ray,caddy,v2ctl}
sudo snap install --classic certbot;fuser -k 80/tcp;sudo certbot certonly --standalone --keep --register-unsafely-without-email --agree-tos
v2ray -c https://gitlab.com/nonedotblue/something/-/raw/master/v2fly_trojan_serve.json
自签证书+无需域名+vless+tcp+xtls+caddy2+fallbacks
{
"log": {
"loglevel": "warning"
},
"inbounds": [
{
"port": 20800,
"listen": "127.0.0.1",
"protocol": "socks",
"settings": {
"udp": true
}
}
],
"outbounds": [
{
"protocol": "vless",
"settings": {
"vnext": [
{
"address": "139.180.203.34",
"port": 443,
"users": [
{
"id": "00000000-0000-0000-0000-000000000000",
"flow": "xtls-rprx-origin",
"encryption": "none",
"level": 0
}
]
}
]
},
"streamSettings": {
"network": "tcp",
"security": "xtls",
"xtlsSettings": {
"allowInsecure": true
}
}
}
]
}
teamviewer
sudo apt-get update
sudo apt-get install ubuntu-desktop -y
wget -O /tmp/teamviewer.deb https://download.teamviewer.com/download/linux/teamviewer_amd64.deb
sudo apt install /tmp/teamviewer.deb -y
teamviewer setup
vless+tcp+tls+caddy2
轻微折腾,v2fly 使用 443,网页 https
系统选择
系统推荐 Ubuntu,各位系统推荐 Ubuntu,各位系统推荐 Ubuntu,各位系统推荐 Ubuntu,TLS 长期版本,我这一直用最新的 Ubuntu。
域名解析
添加一条 A 记录,比如 jp,然后指向 vps 的 ipv4 地址。
安装 v2fly 4.28.2 + caddy2 certbot
来源均为官方
bash <(curl -sL https://git.io/v2fly.sh)
explain this code snippetecho "deb [trusted=yes] https://apt.fury.io/caddy/ /" \
| sudo tee -a /etc/apt/sources.list.d/caddy-fury.list
sudo apt update
sudo apt install caddysudo snap install --classic certbot
后期续约证书: 短暂关停 caddy 解放 80 端口--->续约证书--->证书成功--->再次启动 caddy
sudo sh -c 'printf "#!/bin/sh\nsystemctl stop caddy\n" > /etc/letsencrypt/renewal-hooks/pre/caddy.sh'
sudo sh -c 'printf "#!/bin/sh\nsystemctl start caddy\n" > /etc/letsencrypt/renewal-hooks/post/caddy.sh'
sudo chmod 755 /etc/letsencrypt/renewal-hooks/pre/caddy.sh
sudo chmod 755 /etc/letsencrypt/renewal-hooks/post/caddy.sh使用 certbot 生成证书
fuser -k 80/tcp;sudo certbot certonly --standalone --keep --register-unsafely-without-email --agree-tos
explain this code snippet配置文件
- Server
- Caddy2
- Client
/usr/local/etc/v2ray/config.json{
"log": {
"loglevel": "warning"
},
"inbounds": [
{
"port": 443,
"protocol": "vless",
"settings": {
"clients": [
{
"id": "d1d1c6ce-4192-4832-9d65-93bb4cd2387c",
"level": 0,
"email": "[email protected]"
}
],
"decryption": "none",
"fallbacks": [
{
"dest": 80
}
]
},
"streamSettings": {
"network": "tcp",
"security": "tls",
"tlsSettings": {
"alpn": ["http/1.1"],
"certificates": [
{
"certificateFile": "/etc/letsencrypt/live/jp.huhu.blue/fullchain.pem",
"keyFile": "/etc/letsencrypt/live/jp.huhu.blue/privkey.pem"
}
]
}
}
}
],
"outbounds": [
{
"protocol": "freedom"
}
]
}explain this code snippet/etc/caddy/Caddyfile:80
redir https://none.blueexplain this code snippet{
"log": {
"loglevel": "warning"
},
"inbounds": [
{
"port": 20800,
"listen": "127.0.0.1",
"protocol": "socks",
"settings": {
"udp": true
}
}
],
"outbounds": [
{
"protocol": "vless",
"settings": {
"vnext": [
{
"address": "jp.huhu.blue",
"port": 443,
"users": [
{
"id": "d1d1c6ce-4192-4832-9d65-93bb4cd2387c",
"encryption": "none",
"level": 0
}
]
}
]
},
"streamSettings": {
"network": "tcp",
"security": "tls"
}
}
]
}explain this code snippet启动
systemctl start caddy;systemctl start v2ray
后期维护
? 需要维护么 证书续签,不用在担心,上面已经解决了 如果想要升级 v2fly 版本,再搞这个
bash <(curl -sL https://git.io/v2fly.sh)
v2fly频发更新,不保证本文一直有效,失效请⬆反馈!