Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
fdba02faed | |||
b017fcd217 | |||
b3e636e36a | |||
57172a3609 | |||
87686bf4f7 |
@@ -1,6 +1,6 @@
|
|||||||
FROM node:lts-slim AS base
|
FROM node:lts-slim AS base
|
||||||
|
|
||||||
RUN npm install -g holesail@2.1.0
|
RUN npm install -g holesail@1.10.1
|
||||||
|
|
||||||
FROM base AS dev
|
FROM base AS dev
|
||||||
|
|
||||||
|
17
README.md
17
README.md
@@ -17,7 +17,7 @@ The following environment variables are available:
|
|||||||
- HOST: The hostname or IP address to use for the client or server mode.
|
- HOST: The hostname or IP address to use for the client or server mode.
|
||||||
- PUBLIC: A boolean value indicating whether the server should use a public connetor string. Only applicable in server mode.
|
- PUBLIC: A boolean value indicating whether the server should use a public connetor string. Only applicable in server mode.
|
||||||
- FORCE: A boolean value indicating whether to force a short connector string of less than 32 chars. Only applicable in server and filemanager modes.
|
- FORCE: A boolean value indicating whether to force a short connector string of less than 32 chars. Only applicable in server and filemanager modes.
|
||||||
- CONNECTOR: A connector string used to identify the connection. Can be used in client, server, and filemanager modes.
|
- KEY: A string used to identify the connection. Can be used in client, server, and filemanager modes.
|
||||||
- USERNAME: The username to use for authentication in filemanager mode.
|
- USERNAME: The username to use for authentication in filemanager mode.
|
||||||
- PASSWORD: The password to use for authentication in filemanager mode.
|
- PASSWORD: The password to use for authentication in filemanager mode.
|
||||||
- ROLE: The role to assign to the user in filemanager mode. Can be either admin or user.
|
- ROLE: The role to assign to the user in filemanager mode. Can be either admin or user.
|
||||||
@@ -41,7 +41,7 @@ docker run -d --name holesail \
|
|||||||
-e MODE=server \
|
-e MODE=server \
|
||||||
-e PORT=25565 \
|
-e PORT=25565 \
|
||||||
-e HOST=minecraft \
|
-e HOST=minecraft \
|
||||||
-e CONNECTOR=very-super-secret \
|
-e KEY=very-super-secret \
|
||||||
-e PUBLIC=false \
|
-e PUBLIC=false \
|
||||||
--network holesail \
|
--network holesail \
|
||||||
anaxios/holesail:latest
|
anaxios/holesail:latest
|
||||||
@@ -66,7 +66,7 @@ services:
|
|||||||
PORT: 25565
|
PORT: 25565
|
||||||
HOST: minecraft
|
HOST: minecraft
|
||||||
PUBLIC: false
|
PUBLIC: false
|
||||||
CONNECTOR: very-super-secret
|
KEY: very-super-secret
|
||||||
networks:
|
networks:
|
||||||
- holesail
|
- holesail
|
||||||
|
|
||||||
@@ -101,18 +101,17 @@ services:
|
|||||||
holesail:
|
holesail:
|
||||||
container_name: holesail
|
container_name: holesail
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
network_mode: "host"
|
ports:
|
||||||
|
- 8989:8989
|
||||||
image: anaxios/holesail:latest
|
image: anaxios/holesail:latest
|
||||||
environment:
|
environment:
|
||||||
MODE: client
|
MODE: client
|
||||||
PORT: 8989
|
PORT: 8989
|
||||||
HOST: 0.0.0.0
|
HOST: 0.0.0.0
|
||||||
PUBLIC: false
|
PUBLIC: false
|
||||||
CONNECTOR: very-super-secret
|
KEY: very-super-secret
|
||||||
```
|
```
|
||||||
|
|
||||||
**Note:** Client mode only works on Linux, and is incompatible with Windows and Mac.
|
|
||||||
|
|
||||||
### Filemanager Mode
|
### Filemanager Mode
|
||||||
|
|
||||||
In Filemanager mode, Holesail-docker serves a file manager interface. Example `docker-compose.yml` file:
|
In Filemanager mode, Holesail-docker serves a file manager interface. Example `docker-compose.yml` file:
|
||||||
@@ -131,7 +130,7 @@ services:
|
|||||||
ROLE: user
|
ROLE: user
|
||||||
USERNAME: admin
|
USERNAME: admin
|
||||||
PASSWORD: admin
|
PASSWORD: admin
|
||||||
CONNECTOR: very-super-secret
|
KEY: very-super-secret
|
||||||
volumes:
|
volumes:
|
||||||
- <host dir>:/data
|
- <host dir>:/data
|
||||||
```
|
```
|
||||||
@@ -153,7 +152,7 @@ services:
|
|||||||
PORT: 25565
|
PORT: 25565
|
||||||
HOST: minecraft
|
HOST: minecraft
|
||||||
PUBLIC: false
|
PUBLIC: false
|
||||||
CONNECTOR: very-super-secret
|
KEY: very-super-secret
|
||||||
networks:
|
networks:
|
||||||
- holesail
|
- holesail
|
||||||
|
|
||||||
|
28
run.sh
28
run.sh
@@ -25,9 +25,9 @@ success() {
|
|||||||
print "$GREEN" "$1"
|
print "$GREEN" "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
get_connector_my_mc() {
|
#get_connector_my_mc() {
|
||||||
KEY="$(/usr/local/bin/node /fetch-my-mc-connector.js)"
|
# KEY="$(/usr/local/bin/node /fetch-my-mc-connector.js)"
|
||||||
}
|
#}
|
||||||
|
|
||||||
cmd_argument_builder () {
|
cmd_argument_builder () {
|
||||||
local args="";
|
local args="";
|
||||||
@@ -36,15 +36,15 @@ cmd_argument_builder () {
|
|||||||
[[ "$PORT" ]] && args="$args --port $PORT";
|
[[ "$PORT" ]] && args="$args --port $PORT";
|
||||||
[[ "$HOST" ]] && args="$args --host $HOST";
|
[[ "$HOST" ]] && args="$args --host $HOST";
|
||||||
[[ "$KEY" ]] && args="$args $KEY";
|
[[ "$KEY" ]] && args="$args $KEY";
|
||||||
[[ "$UDP" = "true" ]] && args="$args --udp";
|
#[[ "$UDP" = "true" ]] && args="$args --udp";
|
||||||
;;
|
;;
|
||||||
"server")
|
"server")
|
||||||
[[ "$PORT" ]] && args="$args --live $PORT";
|
[[ "$PORT" ]] && args="$args --live $PORT";
|
||||||
[[ "$HOST" ]] && args="$args --host $HOST";
|
[[ "$HOST" ]] && args="$args --host $HOST";
|
||||||
[[ "$PUBLIC" = "true" ]] && args="$args --public";
|
[[ "$PUBLIC" = "true" ]] && args="$args --public";
|
||||||
[[ "$FORCE" = "true" ]] && args="$args --force";
|
[[ "$FORCE" = "true" ]] && args="$args --force";
|
||||||
[[ "$KEY" ]] && args="$args --key $KEY";
|
[[ "$KEY" ]] && args="$args --connector $KEY";
|
||||||
[[ "$UDP" = "true" ]] && args="$args --udp";
|
#[[ "$UDP" = "true" ]] && args="$args --udp";
|
||||||
;;
|
;;
|
||||||
"filemanager")
|
"filemanager")
|
||||||
args="--filemanager";
|
args="--filemanager";
|
||||||
@@ -56,14 +56,15 @@ cmd_argument_builder () {
|
|||||||
[[ "$ROLE" = "admin" ]] && args="$args --role admin";
|
[[ "$ROLE" = "admin" ]] && args="$args --role admin";
|
||||||
[[ "$ROLE" = "user" ]] && args="$args --role user";
|
[[ "$ROLE" = "user" ]] && args="$args --role user";
|
||||||
[[ "$KEY" ]] && args="$args --key $KEY";
|
[[ "$KEY" ]] && args="$args --key $KEY";
|
||||||
[[ "$UDP" = "true" ]] && args="$args --udp";
|
#[[ "$UDP" = "true" ]] && args="$args --udp";
|
||||||
;;
|
|
||||||
"my-mc")
|
|
||||||
[[ "$PORT" ]] && args="$args --port $PORT";
|
|
||||||
[[ "$HOST" ]] && args="$args --host $HOST";
|
|
||||||
[[ "$KEY" ]] && args="$args --connect $KEY";
|
|
||||||
[[ "$UDP" = "true" ]] && args="$args --udp";
|
|
||||||
;;
|
;;
|
||||||
|
# "my-mc")
|
||||||
|
# #if ! get_connector_my_mc; then exit 1; fi
|
||||||
|
# [[ "$PORT" ]] && args="$args --port $PORT";
|
||||||
|
# [[ "$HOST" ]] && args="$args --host $HOST";
|
||||||
|
# [[ "$KEY" ]] && args="$args --connect $KEY";
|
||||||
|
# #[[ "$UDP" = "true" ]] && args="$args --udp";
|
||||||
|
# ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
printf "%s" "$args";
|
printf "%s" "$args";
|
||||||
@@ -83,7 +84,6 @@ term_handler() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if ! get_connector_my_mc; then exit 1; fi
|
|
||||||
|
|
||||||
ARGS="$(cmd_argument_builder)"
|
ARGS="$(cmd_argument_builder)"
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user