Dockerfile and Docker image
schklom opened this issue ยท 4 comments
It would help a lot if you could at least add a Dockerfile, and at best also a Docker image :)
If you can produce and maintain a Dockerfile, I can make a PR to have GitHub automatically compile it and send it to DockerHub (you'll need to provide a password as a GitHub secret, but it's not complicated).
You can then select platforms for which you want to make your software available (amd64, arm, etc).
Knew that Docker knowledge would come in handy again from my Cryptofolio project!
I'll push an image to DockerHub soon.
Okay, so slight issue. Docker containers cannot be accessed by other devices on the network directly without quite a bit of trouble. Accessing it through the host's IP means that the server always sees the same IP (the host's) making requests to it. As such, FileDrop only ever sees one client since everyone is connecting through the host first.
There's two solutions to this, both are quite hacky: get the user's local IP address using WebRTC and take their word for it that they are providing their real IP (however many browsers don't support this due to WebRTC leaks), or randomly assign an IP to each client that connects if the server is running in a Docker container.
I've opted for the second option as IP addresses ultimately are only used on the server-side and spoofing them there doesn't matter, and usernames are used to let users identify each other anyway. I'll be pushing the image very soon, but thought I'd mention this. Other than that, everything works fine.
@Xtrendence Usually, one would put such a service behind a reverse-proxy, and have it pass X-Forwarded-For
to identify the IP.
Doesn't the header solve the issue?
PS: I think your project is really cool, thanks for making and sharing it
I haven't tried using a reverse-proxy to test it, but set it so it first checks whether the header exists, and if it's not empty, then its value gets used. Otherwise, a random unused IP is generated and assigned.
Here you go my good sir, hopefully it works: https://hub.docker.com/r/xtrendence/filedrop