-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: Ability to specify port in -bind option #31
Comments
Hey @mcjon3z, I'm not sure if it's possible to support phantom inside Docker on macOS. phantom needs to always bind to 19132 (ideally with SO_REUSEADDR/PORT set) to listen for broadcast packets on the LAN. This differs from a traditional port forward into a Docker container because the broadcast packets have a destination of x.x.x.255 rather than your device's actual IP address, so I'm not sure how to forward those down to the container. If you have the time or patience and want to try to get it working and open a PR, I'm totally open to that. |
I’m definitely willing to help test. Unfortunately go is not a language I’m familiar with at all so I won’t be much help in actually writing the code. If you were writing in python I’d be all over it! Possibly refactoring the code to allow a port to be assigned as a parameter and go random otherwise, then I could give it a shot from the docker side on OSX and linux to see if there is a differing result. |
Hey @mcjon3z, a |
Sounds good. I'm on the road next couple of weeks but I think I brought my iPad with me and can test using that. I'll let you know how it works. Thank you sir! |
I finally got around to testing this some more and I was unable to get it working on docker without host networking (so no dice on docker for mac or with bind port forwarding). Works just fine inside of docker as long it is on a linux host using host networking which negates the need for a specifically defined bind port. I spun up a dedicated minecraft docker VM and have it working using docker-compose with multiple minecraft instances and phantom proxying back to them and they are showing up as LAN games now. Thanks for trying - possibly there will be another use case for the bind port flag that you added. |
In attempting to run phantom inside of docker on OSX (which does not have --net=host capabilities), not being able to specify a bind port which can be forwarded to the host prevents the application from running properly. Looking at the commit history, it appears that the static bind port functionality was removed in favor of a randomly generated port to provide for allowing multiple instances to run at once.
The text was updated successfully, but these errors were encountered: