Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

这个脚本的V2ray 内核是自动升级还是要手动? #3

Open
supkrogoth opened this issue Oct 8, 2018 · 7 comments
Open

这个脚本的V2ray 内核是自动升级还是要手动? #3

supkrogoth opened this issue Oct 8, 2018 · 7 comments

Comments

@supkrogoth
Copy link

脚本的V2ray 最新内核能自动升级吗?能否一键删除服务器中储存的客户端和配置文件?

@dylanbai8
Copy link
Owner

dylanbai8 commented Oct 8, 2018

1.不支持v2ray自动升级。

bash c.sh -v

重复执行以上代码手动升级,同时会更换新的 UUID,其它配置不变。

或者执行以下代码更新,不更换 UUID

bash <(curl -L -s https://install.direct/go.sh)

2.执行以下代码一键删除web服务器中的客户端和配置文件。

rm -rf /www/V2rayPro.zip

@supkrogoth
Copy link
Author

希望能够加入每天凌晨自动升级V2ray内核,自动重启vps的功能。

@dylanbai8
Copy link
Owner

dylanbai8 commented Oct 9, 2018

1.手动添加定时重启

# 安装定时软件
[ centos 系统 ]
yum -y install crontabs

[ debian 系统 ]
apt -y install cron

# 设置每天12点30重启(服务器时区的中午)
crontab -l >> crontab.txt
echo "30 12 * * * /sbin/reboot" >> crontab.txt
crontab crontab.txt
rm -f crontab.txt

# 查看历史重启记录
last reboot

2.自动升级内核

很抱歉,这个版的脚本中不打算加入这个功能。
1.WebSocket+TLS+Web是个古老、完善的配置了,新版内核短期不会再有什么优化,升不升级并没有什么意义。
2.很多客户端内核版本通常都会滞后,或者只更新稳定版本的内核。服务器和客户端版本内核不一致只会让体验变差。

当然,你可以执行以下命令手动添加:

# 安装定时软件 cron (略)

# 设置每天12点20自动升级(服务器时区)
crontab -l >> crontab.txt
echo "20 12 * * * bash <(curl -L -s https://install.direct/go.sh)" >> crontab.txt
crontab crontab.txt
rm -f crontab.txt

# 查看定时列表
crontab -l

@dylanbai8
Copy link
Owner

再补一个命令,清除所有定时任务:

touch crontab.txt
crontab crontab.txt
rm -f crontab.txt

@supkrogoth
Copy link
Author

非常感谢!

@xiamuguizhi
Copy link

#域名301重定向
www.mmp.wiki {
  redir https://mmp.wiki{uri}
}
http://mmp.wiki:80 {
	redir https://mmp.wiki:443{url}
	}
https://mmp.wiki:443 {
	gzip
	tls admin@mmp.wiki
	root /www
	proxy /5a3e93d2 localhost:42494 {
		websocket
		header_upstream -Origin
	}
	fastcgi / /run/php/php7.0-fpm.sock php
    # 伪静态开始
    rewrite {
        if {path} not_match ^\/admin
        to {path} {path}/ /index.php?{query}
    }
    # 伪静态结束
}

这是typecho的配置文件

访问www 跳转到非www 添加了伪静态

@nedved888
Copy link

非常感谢作者,省却的很多查资料修改配置的时间,收下了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants