思绪的空中生活 发布的文章

使用cloudflare解析域名

更改域名ns服务器为cloudflare,通过cdn来获得魔法加成
安装v2ray之前,云朵点灰,即是 DNS only

安装 V2Ray

一键安装脚本
bash <(curl -s -L https://233blog.com/v2ray.sh)
传输协议选择 WebSocket + TLS (即是选择 4 )
V2Ray 端口随便,不要是 80 和 443 即可
然后输入你的域名
域名解析 Y
自动配置 TLS 也是 Y
其他直接回车

设置 Crypto 和 开启中转

确保 Cloudflare 的 Crypto 选项卡的 SSL 为 Full
并且 Universal SSL 要为 Active Certificate
然后在 DNS 选项卡那里,把刚才点灰的那个云朵图标,点亮它,云朵图标务必为橙色状态,即是 DNS and HTTP proxy(CDN)

v2ray 常用命令

v2ray menu #管理 V2Ray (同等于直接输入 v2ray)
v2ray info #查看 V2Ray 配置信息
v2ray config #修改 V2Ray 配置
v2ray link #生成 V2Ray 客户端配置文件链接
v2ray textlink 生成 V2Ray 配置信息链接
v2ray qr #生成 V2Ray 配置二维码链接
v2ray ss #修改 Shadowsocks 配置
v2ray ssinfo #查看 Shadowsocks 配置信息
v2ray ssqr #生成 Shadowsocks 配置二维码链接
v2ray status #查看 V2Ray 运行状态
v2ray start #启动 V2Ray
v2ray stop #停止 V2Ray
v2ray restart #重启 V2Ray
v2ray log #查看 V2Ray 运行日志
v2ray update #更新 V2Ray
v2ray update.sh #更新 V2Ray 管理脚本
v2ray uninstall #卸载 V2Ray

注意

如果提示 curl: command not found ,那是因为你的小鸡没装 Curl
ubuntu/debian 系统安装 Curl 方法:
apt-get update -y && apt-get install curl -y
centos 系统安装 Curl 方法:
yum update -y && yum install curl -y
安装好 curl 之后再使用脚本

注意事项

不支持OpenVZ的虚拟化构架
只适用于由GRUB引导的VPS
重装前请务必备份好重要数据,后果自负
重装需要20-40分钟不等的时间,期间无法连接服务器,请耐心等待,有vnc的面板可以通过vnc查看安装进度

原系统安装必备软件

Debian / Ubuntu 系统:

apt-get update
apt-get install -y gawk sed grep

RHEL / CentOS 系统:

yum install -y gawk sed grep

下载脚本

wget --no-check-certificate -qO DebianNET.sh 'https://moeclub.org/attachment/LinuxShell/DebianNET.sh' && chmod -x DebianNET.sh

使用方法

安装Debian 7 32位:
bash DebianNET.sh -d 7 -v 32 -a
安装Debian 7 64位:
bash DebianNET.sh -d 7 -v 64 -a
安装Debian 8 32位:
bash DebianNET.sh -d 8 -v 32 -a
安装Debian 8 64位:
bash DebianNET.sh -d 8 -v 64 -a
安装Debian 9 32位:
bash DebianNET.sh -d 9 -v 32 -a
安装Debian 9 64位:
bash DebianNET.sh -d 9 -v 64 -a

修改密码

默认root密码:MoeClub.org,安装完成后请立即更改密码.
passwd root

参考:https://www.zhujiboke.com/2017/09/803.html

Debian OpenVZ 魔改 BBR - lkl-rinetd 一键脚本

测试机器:
nfphosting 512m Debian GNU/Linux 7 (64 Bit) OpenVZ

要求以下:
OpenVZ 64 bit Ram >> 64M

Debian or Ubuntu
适用于 单网卡(单 IP) 服务器:

wget https://github.com/tcp-nanqinlang/lkl-rinetd/releases/download/1.1.0/tcp_nanqinlang-rinetd-debianorubuntu.sh
bash tcp_nanqinlang-rinetd-debianorubuntu.sh

适用于 多网卡(多 IP) 服务器,会为所有网卡(所有 IP)提供加速:

wget https://github.com/tcp-nanqinlang/lkl-rinetd/releases/download/1.1.0/tcp_nanqinlang-rinetd-debianorubuntu-multiNIC.sh
bash tcp_nanqinlang-rinetd-debianorubuntu-multiNIC.sh

在 /home/tcp_nanqinlang 进行安装,所以安装完成后不要动这个文件夹了(除非你想修改端口)。
vi /home/tcp_nanqinlang/config-port.conf
安装过程中,会提示输入端口号。多个端口号用空格隔开。不支持端口段。

2018年8月17日22点08分测试图
image

参考:https://github.com/tcp-nanqinlang/wiki/wiki/lkl-rinetd

1、依赖安装

apt-get update
apt-get install git wget python-setuptools -y
apt-get install python-pip
pip install cymysql

2、libsodium 安装

apt-get install build-essential -y
wget https://github.com/jedisct1/libsodium/releases/download/1.0.16/libsodium-1.0.16.tar.gz
tar xf libsodium-1.0.16.tar.gz && cd libsodium-1.0.16
./configure && make -j2 && make install
echo /usr/local/lib > /etc/ld.so.conf.d/usr_local_lib.conf
ldconfig
cd ../ && rm -rf libsodium*

3、下载源代码并安装依赖

git clone -b manyuser https://github.com/Anankke/shadowsocks.git
cd shadowsocks
pip install -r requirements.txt

4、配置文件

cp apiconfig.py userapiconfig.py
cp config.json user-config.json
vi userapiconfig.py

5、运行SSR

python server.py 用于调试的
./run.sh 无日志后台运行
./logrun.sh 有日志后台运行

6、开机启动
假设你的shadowsocks是安装在root目录下,可以这样:
vi /etc/rc.local
加入一条:
sh /root/shadowsocks/run.sh
然后:
chmod +x /etc/rc.local
Debian 9开机启动 https://sixu.life/debian-9-etc-rc-local.html
7、使用Supervisor守护进程启动ssr

# 安装
apt-get install supervisor -y

# 写入配置
vi /etc/supervisor/conf.d/ssr.conf

# 写入以下内容
[program:ssr]
command=python /root/shadowsocks/server.py 
autorestart=true
autostart=true
user=root

# 重启Supervisor服务。
/etc/init.d/supervisor restart

# 重启 ssr
supervisorctl restart ssr

# 查看Supervisor服务运行状态。
supervisorctl status

# 如果遇到问题,可以检查日志:
supervisorctl tail -f ssr stderr

# 如果使用supervisor进程守护,需要修改文件vi /etc/default/supervisor,添加一行:
ulimit -n 1024000

8、加速
Debian OpenVZ 魔改 BBR:https://sixu.life/debian-openvz-magic-change-bbr.html
Debian centos bbr加速:https://sixu.life/the-acceleration-effect-of-bbr-is-obvious.html

参考:
https://blog.starryvoid.com/archives/176.html

https://github.com/zyl6698/ss-panel-v3-mod-with-f2fpay/wiki/%E5%AE%89%E8%A3%85%E9%AD%94%E6%94%B9%E5%90%8E%E7%AB%AF

https://github.com/iMeiji/shadowsocks_install/wiki/%E6%90%AD%E5%BB%BA-sspanel-v3-%E9%AD%94%E6%94%B9%E7%89%88%E8%AE%B0%E5%BD%95

Debian 7 x64系统中运行apt-get安装软件时出现如下错误提示:

Media change: please insert the disc labeled  'Debian GNU/Linux 7.0.0 _Wheezy_ - Official amd64 CD Binary-1 20130504-14:44' in the drive '/media/cdrom/' and press enter

google发现原来是apt的问题。
1、编辑文件
vi /etc/apt/sources.list
2、在deb cdrom:[Debian GNU/Linux 7.0.0 _Wheezy_ - Official amd64 CD Binary-1 20130504-14:44]/ wheezy main前加#号注释掉这行
3、更新下deb仓库
apt-get update

参考:https://wobeibk.com/1626.html

r2d的当前版本2.25.201,发现mt工具箱打开失效了,显示:

No page is registered at '/web/misstar/index' .

If this url belongs to an extension, make sure it is properly installed.

If the extension was recently installed, try removing the /tmp/luci-indexcache file.

查找有现成的方法,就搬过来了
1、ssh方root用户登录路由器后台;
2、执行命令:
vi /usr/lib/lua/luci/controller/web/index2.lua
3、加入如下内容:

module("luci.controller.web.index2", package.seeall) 
function index()      
     local page   = node("web","misstar")          
     page.target  = firstchild()         
     page.title   = ("")          
     page.order   = 100          
     page.sysauth = "admin"          
     page.sysauth_authenticator = "jsonauth"          
     page.index = true          
     entry({"web", "misstar", "index"}, template("web/setting/misstar/index"), _("Tools"), 81)          
     entry({"web", "misstar", "add"}, template("web/setting/misstar/add"), _("Tools"), 82)          
     entry({"web", "misstar"}, alias("web","misstar","index"), _("Tools"), 80)          
     entry({"web", "misstar", "ss"}, template("web/setting/applications/ss/html/ss"), _("Tools"), 85)          
     entry({"web", "misstar","frp"}, template("web/setting/applications/frp/html/frp"), _("Tools"), 85)          
     entry({"web", "misstar","aliddns"}, template("web/setting/applications/aliddns/html/aliddns"), _("Tools"), 85)  
     entry({"web", "misstar","adm"}, template("web/setting/applications/adm/html/adm"), _("Tools"), 85)    
     entry({"web", "misstar","koolproxy"}, template("web/setting/applications/koolproxy/html/koolproxy"), _("Tools"), 85)
     entry({"web", "misstar","rm"}, template("web/setting/applications/rm/html/rm"), _("Tools"), 85)
     entry({"web", "misstar","aria2"}, template("web/setting/applications/aria2/html/aria2"), _("Tools"), 85) 
     entry({"web", "misstar","webshell"}, template("web/setting/applications/webshell/html/webshell"), _("Tools"), 85)
     entry({"web", "misstar","pptpd"}, template("web/setting/applications/pptpd/html/pptpd"), _("Tools"), 85)  
     entry({"web", "misstar","ftp"}, template("web/setting/applications/ftp/html/ftp"), _("Tools"), 85)
     entry({"web", "misstar","kms"}, template("web/setting/applications/kms/html/kms"), _("Tools"), 85)  
end

4、执行清理缓存命令:
rm -rf /tmp/luci-indexcache

参考:http://www.cmliu.net/?id=78