Pugmatt / BedrockConnect

Join any Minecraft Bedrock Edition server IP on Xbox One, Nintendo Switch, and PS4/PS5
GNU General Public License v3.0
1.37k stars 160 forks source link

Use adguardhome instead of bind9 #417

Closed lixiaolong2007 closed 1 year ago

lixiaolong2007 commented 1 year ago

优势

1、Bind9没有web或者gui进行管理,而Adguardhome具有web且十分的干净易于理解 2、AdGuardhome对于不同linux发行版与不同的cpu架构支持良好 3、Adguardhome是开源的(https://github.com/AdguardTeam/AdGuardHome

设备

这里我使用的是在网上购买的具有公网ip基于centos操作系统的云主机 网页捕获_22-6-2023_222656_starxn com

安装Adguardhome和java

java:

Ubuntu: sudo apt install openjdk-8-jre-headless CentOS: sudo yum install java-1.8.0-openjdk

Adguardhome:

这里官方提供了三种安装方法

curl -s -S -L https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh | sh -s -- -v
wget --no-verbose -O - https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh | sh -s -- -v
fetch -o - https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh | sh -s -- -v
安装完成后后台默认为:ip:3000(如果使用的是云主机则为主机的公网ip:3000,反之则为localip:3000) 进入后台后会有一个安装指导,其中有一项为选择网卡,请务必使用ifconfig查看网卡选择,类eth0 网页捕获_22-6-2023_223842_103 228 170 146 走完安装指导后进入后台点击过滤器-DNS重写填入以下,设置好后同时开启udp和tcp 53号和19132号端口 域名 应答
mco.mineplex.com ip
hivebedrock.network ip
play.mineplex.com ip
play.inpvp.net ip
mco.lbsg.net ip
play.lbsg.net ip
play.galaxite.net ip
mco.cubecraft.net ip

这里的ip有公网就用公网,非公网也行就是在外不能使用 网页捕获_22-6-2023_224841_103 228 170 146

最后一步

从Releases中下载BedrockConnect-1.0-SNAPSHOT.jar并运行 如像我一样使用的是云主机可使用nohup命令守护进程

xTITUSMAXIMUSX commented 1 year ago

I'm not sure if needing a web gui to manage the DNS records is really needed. If you already have adgaurd as a container somewhere else for your entire network then it would be simple enough to add the proper DNS entries for the minecraft IP's on that instance. bind9 is only there to provide the minecraft IP's and that is it. There wouldn't be any need to configure bind9 any further than that.

lixiaolong2007 commented 1 year ago

In fact, it is not difficult for linux users to learn and configure bind9, but if you are based on arm or mips architecture cpu, adguardhome's advantage is clear that its cross-platform support is excellent

lixiaolong2007 commented 1 year ago

Having an OpenWRT-based router and a public ip address can still provide dns resolution when you're out and about, and you don't have to leave your computer on 24 hours a day

lixiaolong2007 commented 1 year ago

The above content is based on Baidu translation, I am a Chinese high school student, my English is not good

xTITUSMAXIMUSX commented 1 year ago

Again, the reason we use bind9 is ONLY to serve DNS if someone doesn’t already have a DNS server or want to configure one. It’s not to be used to be configured any further than that. If you already have a DNS server then all you need to do is add the Minecraft IPs to the proper DNS name. If you rather use adguard then you can standup your own instance and configure it as needed.

Pugmatt commented 1 year ago

BIND9 is used typically for the reasons @xTITUSMAXIMUSX stated, but any DNS solution will really do if it works better for you. So thank you for posting this, for those that might prefer to use this method. Closing this for now, but I'll add a link directing to this in the wiki: https://github.com/Pugmatt/BedrockConnect/wiki/Other-Guides

TechGamer49 commented 5 months ago

Thanks for showing me how to do the rewrites in adguard and I appreciate it Very much!! This helps me get a step in the right direction at getting mine setup correctly.