Skip to content

Add internal port support#410

Closed
AWFX wants to merge 1 commit intolinuxserver:masterfrom
AWFX:master
Closed

Add internal port support#410
AWFX wants to merge 1 commit intolinuxserver:masterfrom
AWFX:master

Conversation

@AWFX
Copy link
Copy Markdown

@AWFX AWFX commented Feb 27, 2026

Hello. It is assumed that the container has a bridge type network interface. Its default internal port is 51820. If you use port forwarding, then everything works. Since this is a VPN, I would like to avoid network delays associated with the network adapter, so the host type is used as the network adapter. In this case, the wg0.conf configuration will have port 51820, not the one that was set via the SERVERPORT variable. My changes suggest using another environment variable that will help redefine the internal wireguard port.

P.S. This is my first PR, please don’t judge too harshly if possible.

Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for opening this pull request! Be sure to follow the pull request template!

@LinuxServer-CI
Copy link
Copy Markdown
Contributor

I am a bot, here is the pushed image/manifest for this PR:

ghcr.io/linuxserver/lspipepr-wireguard:1.0.20250521-r1-pkg-291ebaef-dev-b5c063d7fc97896ad39b951d8375462c9a3c54e4-pr-410

@j0nnymoe
Copy link
Copy Markdown
Member

We've had a couple requests for this and I suspect that their stance on this hasn't changed.

I'm curious to know though what delays you think get added with bridge Vs host?

Also, you can just manually edit this yourself within the template of the container, this PR would break existing installs.

@AWFX
Copy link
Copy Markdown
Author

AWFX commented Feb 27, 2026

The docker documentation says the following -

Host mode networking can be useful for the following use cases:
- To optimize performance

The docker bridge network uses a virtual switch, I suggest that in theory the performance may be lower (most likely not by much)

@aptalca
Copy link
Copy Markdown
Member

aptalca commented Feb 27, 2026

  1. We do not support host networking with this container
  2. You can edit the server conf template as you wish

The docker bridge network uses a virtual switch, I suggest that in theory the performance may be lower (most likely not by much)

That's just a theory. I do not observe a real world difference as it easily saturates my gigabit connection.

@AWFX
Copy link
Copy Markdown
Author

AWFX commented Feb 27, 2026

Well, I get it.

@AWFX AWFX closed this Feb 27, 2026
@LinuxServer-CI LinuxServer-CI moved this from PRs to Done in Issue & PR Tracker Feb 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

4 participants