-
-
Notifications
You must be signed in to change notification settings - Fork 995
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
[FR] 5-Digit port #604
Comments
So I've added an option to specify the port number gallery-dl listens on during OAuth authorization (da0d5f6), and it should be possible to get it to work with some manual intervention, but it's not a "good" solution. You'll have to manually adjust the port number in your browser's address bar when being redirected, since all sites using OAuth will always redirect to localhost:6414, and it's generally not possible to use a different or even arbitrary port for the redirect address. (Most sites will raise an error when using an unknown redirect address) |
Here is a workaround, might require a reboot before using in case 6414 is already being used. Run this command in an elevated command prompt or elevated powershell: netsh int ipv4 add excludedportrange protocol=tcp startport=6414 numberofports=1 This will make Windows not reserve the port. This command is also useful for port ranges, for instance here's how to reserve all the ports Discord uses for its RPC server: netsh int ipv4 add excludedportrange protocol=tcp startport=6463 numberofports=10 To remove reserved ports, it's the same command but with netsh int ipv4 show excludedportrange tcp Needless to say, given how many projects use 4-digit ports and how aggressive Windows is when it comes to occupying 4-digit ports, this makes life a lot easier. |
Port conflicts are inevitable, especially as far as Windows is concerned. The OS can be incredibly picky about what 4-digit ports programs are allowed to be used, reserving such huge batches of them at a time, and so 5-digit ports are rapidly becoming the norm. Unfortunately I can't ever get port 6414 to open and I have to change the code and host my own version of the oauth-redirect.html page.
Offering an alternative or finding a way to shift users to the new port without breaking their setup if they're still using the old one would be nice. It's a pain to have to keep changing the code after I update gallery-dl. I thought of submitting a PR but was concerned my solution would be far too hacky.
The text was updated successfully, but these errors were encountered: