itzg / itzg/docker-minecraft-server

Allow multiple knock interfaces

Open
#2,084 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Shell
Stars
14.3k
Forks
1.9k
Avg merge
2d 10h
Merged PRs (30d)
31

Description

### Enhancement Type

Improve an existing feature

### Describe the enhancement

I'm running my minecraft container in a gluetun network with a port-forward configured on my VPN. The gluetun network provides two network interfaces: eth0 and tun0. Both can be used depending on if I want to connect locally or externally through the VPN, so both need to respond to knocks.

It would be nice if `AUTOPAUSE_KNOCK_INTERFACE` supported a comma separated list of interfaces. This currently results in the following error being logged:
```
Selected interface "eth0, tun0" does not exist!
```

A docker compose configuration with gluetun looks something like this:
```yaml
version: '3.5'

services:
gluetun:
image: qmcgaw/gluetun
restart: unless-stopped
cap_add:
- NET_ADMIN
environment:
- VPN_SERVICE_PROVIDER=mullvad
- VPN_TYPE=wireguard
- WIREGUARD_PRIVATE_KEY=[VPN Provided Private Key]
- WIREGUARD_ADDRESSES=10.68.0.124/32
- SERVER_CITIES=Brussels
- FIREWALL_VPN_INPUT_PORTS=[VPN Provided Port]
ports:
- 25565:12345
minecraft:
image: itzg/minecraft-server
restart: unless-stopped
environment:
EULA=TRUE
SERVER_PORT=[VPN Provided Port]
AUTOPAUSE_KNOCK_INTERFACE=eth0,tun0 # Proposed syntax
tty: true
stdin_open: true
network_mode: "service:gluetun"
```

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how AUTOPAUSE_KNOCK_INTERFACE is read and how the selected interface is validated in the container's knock handling. Use the provided eth0,tun0 configuration as the target case; done means both interfaces can respond to knocks without the current nonexistent-interface error.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, shell
Domain
infrastructure
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.