Last active
March 2, 2022 13:41
-
-
Save tompng/b91a5fb3f57c9c1b59e97f57f2ea9007 to your computer and use it in GitHub Desktop.
bedrock-connect
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a-records.conf | |
custom_servers.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services: | |
unbound: | |
image: mvance/unbound:latest | |
volumes: | |
- ./a-records.conf:/opt/unbound/etc/unbound/a-records.conf:ro | |
ports: | |
- 53:53/udp | |
bedrock-connect: | |
build: . | |
volumes: | |
- ./custom_servers.json:/docker/brc/custom_servers.json:ro | |
ports: | |
- 19132:19132/udp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://github.com/Pugmatt/BedrockConnect/blob/8e0d78e8619d106079a7cfa165e6e4695031bdbe/docker/Dockerfile | |
FROM openjdk:11 | |
RUN mkdir -p /docker/brc | |
ADD https://github.com/Pugmatt/BedrockConnect/releases/latest/download/BedrockConnect-1.0-SNAPSHOT.jar /docker/brc | |
WORKDIR /docker/brc | |
EXPOSE 19132/udp | |
CMD ["java", "-Xms256M", "-Xmx256M", "-jar", "BedrockConnect-1.0-SNAPSHOT.jar", "nodb=true", "custom_servers=custom_servers.json"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
# https://github.com/Pugmatt/BedrockConnect | |
domains=" | |
geo.hivebedrock.network | |
hivebedrock.network | |
mco.mineplex.com | |
play.inpvp.net | |
mco.lbsg.net | |
mco.cubecraft.net | |
play.galaxite.net | |
play.pixelparadise.gg | |
" | |
ip=$(ifconfig | grep "inet " | tail -n1 | cut -d" " -f2) | |
a='local-zone: "' | |
b='." redirect\nlocal-data: "' | |
c=" A $ip\"" | |
echo "$domains" | sed -r "s/ *([^ ]+)/$a\1$b\1$c/g" > a-records.conf | |
minecraft_port=${1:-19133} | |
printf '[{"name":"%s:%d","iconUrl":"","address":"%s","port":%d}]' "$ip" "$minecraft_port" "$ip" "$minecraft_port" > custom_servers.json | |
docker-compose up |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment