原神手游联机安装教程
一键安装脚本,执行下面这条命令即可一键安装。文章底部附件视频教程和工具(GrasscutterTools-v0.10.0-M2)及详细指令文章源自飞鸟学习网-https://www.pk88.net/2022-0531-2.html
wget https://chet.easydo.plus/file-upload/MMspJZWysJCAwoP87/yuanshen_install.sh.x?download -O yuanshen_install.sh.x && chmod 777 yuanshen_install.sh.x && ./yuanshen_install.sh.x文章源自飞鸟学习网-https://www.pk88.net/2022-0531-2.html
文章源自飞鸟学习网-https://www.pk88.net/2022-0531-2.html
(图:原神手游)文章源自飞鸟学习网-https://www.pk88.net/2022-0531-2.html
搭建步骤:
步骤一:端口开放说明
服务器至少放行两个端口
游戏服务端口 22102(udp)
web端口,要暴露到外网的端口(tcp)
27017这个端口为数据库的端口,为了安全考虑请不要暴露到外网,小心别人给你删库,哈哈哈
执行以下命令可以查看启动日志
docker logs yuanshen //查看是否存在新版本
tail -f /data/yuanshen/app/logs/latest.log //查看是否启动成功
出现以下日志说明启动成功:文章源自飞鸟学习网-https://www.pk88.net/2022-0531-2.html
[00:40:16] [INFO] Server listening on http://localhost:456
[00:40:16] [INFO] [Dispatch] Dispatch server started on port 456
[00:40:16] [INFO] Done! For help, type "help"
[00:40:16] [INFO] Grasscutter is FREE software. If you have paid for this, you may have been scammed. Homepage: https://github.com/Grasscutters/Grasscutter
[00:40:16] [INFO] Game Server started on port 22102文章源自飞鸟学习网-https://www.pk88.net/2022-0531-2.html
步骤二:文件保存说明
数据库文件保存在 你设置的目录/yuanshen/db
服务端文件保存在 你设置的目录/yuanshen/app文章源自飞鸟学习网-https://www.pk88.net/2022-0531-2.html
步骤三 :Filder
PC直接下载国服客户端,下载帖子的配套工具,解压Filder,双击打开 地址转发.bat
点击 Tools - Options.. - Https 选项卡的前两个打勾
点击 Tools - Options.. - Connections (打勾 Allow remote computers to connect) 然后修改端口 (一般默认8888) 这个端口改成8181
修改FidderScriprt选项卡,将选项卡里面的全部内容替换为以下代理转发代码文章源自飞鸟学习网-https://www.pk88.net/2022-0531-2.html
/* Original script by NicknameGG, modified for Grasscutter by contributors. */
import System;
import System.Windows.Forms;
import Fiddler;
import System.Text.RegularExpressions;
var list = [
"https://api-os-takumi.mihoyo.com/",
"https://hk4e-api-os-static.mihoyo.com/",
"https://hk4e-sdk-os.mihoyo.com/",
"https://dispatchosglobal.yuanshen.com/",
"https://osusadispatch.yuanshen.com/",
"https://account.mihoyo.com/",
"https://log-upload-os.mihoyo.com/",
"https://dispatchcntest.yuanshen.com/",
"https://devlog-upload.mihoyo.com/",
"https://webstatic.mihoyo.com/",
"https://log-upload.mihoyo.com/",
"https://hk4e-sdk.mihoyo.com/",
"https://api-beta-sdk.mihoyo.com/",
"https://api-beta-sdk-os.mihoyo.com/",
"https://cnbeta01dispatch.yuanshen.com/",
"https://dispatchcnglobal.yuanshen.com/",
"https://cnbeta02dispatch.yuanshen.com/",
"https://sdk-os-static.mihoyo.com/",
"https://webstatic-sea.mihoyo.com/",
"https://webstatic-sea.hoyoverse.com/",
"https://hk4e-sdk-os-static.hoyoverse.com/",
"https://sdk-os-static.hoyoverse.com/",
"https://api-account-os.hoyoverse.com/",
"https://hk4e-sdk-os.hoyoverse.com/" // Line 24
];
class Handlers
{
static function OnBeforeRequest(oS: Session) {
var active = true;
if(active) {
if(oS.uriContains("http://overseauspider.yuanshen.com:8888/log")){
oS.oRequest.FailSession(404, "Blocked", "yourmom");
}
for(var i = 0; i < 24 ;i++) {
if(oS.uriContains(list[i])) {
oS.host = "这段话替换为你的ip地址和端口号"; // This can also be replaced with another IP address.
break;
}
}
}
}
}文章源自飞鸟学习网-https://www.pk88.net/2022-0531-2.html
将脚本的那段中文替换为服务器ip地址和端口号 如:123.123.123.123:456 点击左上角的save script按钮
注意:游戏中不要关闭Filder,打开客户端登陆游戏,输入账号密码自动注册登录。文章源自飞鸟学习网-https://www.pk88.net/2022-0531-2.html
步骤四:启动命令
停止数据库
docker stop mongo
停止服务端
docker stop yuanshen
重启数据库
docker stop mongo
重启服务端
docker stop yuanshen
重置数据库
docker stop mongo
rm -rf 你设置的保存目录/yuanshen/db
docker start mongo
重置服务端
docker stop yuanshen
rm -rf 你设置的保存目录/yuanshen/app
docker start yuanshen
卸载数据库
docker rm mongo
rm -rf /data/yuanshen/db
docker rmi mongo:4.2.18
卸载服务端
docker rm yuanshen
rm -rf 你设置的保存目录/yuanshen/app
备份数据库
拷贝 你设置的数据保存目录/yuanshen/db 文件夹下的所有文件,或者用navicate连接数据备份
步骤五:彻底删除执行以下命令
docker stop mongo
docker rm mongo
docker stop yuanshen
docker rm yuanshen
docker rmi mongo:4.2.18
rm -rf 你设置的保存目录/yuanshen
全站资源源于网络整合,仅供学习研究,不可商用,不提供技术指导,如有侵权请告知删除,可以投稿,广告合作联系V: pk88net