Fix forcedHosts for Cloudflare proxy + SRV record.#1497
Closed
alchemyyy wants to merge 1 commit intoPaperMC:dev/3.0.0from
Closed
Fix forcedHosts for Cloudflare proxy + SRV record.#1497alchemyyy wants to merge 1 commit intoPaperMC:dev/3.0.0from
alchemyyy wants to merge 1 commit intoPaperMC:dev/3.0.0from
Conversation
|
Show CloudFlare settings to reproduce this situation |
Contributor
Member
|
having a means to diagnose vhost/forced host stuff is on the "would be nice but I have no idea how to cleanly pull it off" list; But, yeah, this PR doesn't implement expected behaviour, it just cuts down on the noise of a DNS service provider-specific mangling to mitigate a specific misconfiguration manageable on their platform. CFs hack is nice in that it allows you to pretend that all is fine, but it's not really properly solving the issue here and just furthers the unexpected behaviour vs how the client works |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.





Quick little patch that lets forcedHosts work when things like Cloudflare add extra junk to the HostString as they pass it along.
This is cool because now I can have an A record proxied over Cloudflare and an accompanying minecraft SRV record, which is a nice bit of hardening for no work or cost against random HTTP scrapes as they will all return the Cloudflare IP.
I haven't tested this with any other services. Obvious enhancements would be letting this be configurable with something like a user defined regex parsing string defined in the toml since I've seen other users talking about similar issues with other services. I feel like another enhancement on this concept would be a debug option to print out the HostString to console, so people could figure out what's going wrong on their own.