homchom / recode

a utility-focused fabric mod to make DiamondFire development more fun
GNU Lesser General Public License v3.0
27 stars 28 forks source link

fix: register additional ips #43

Closed SamMan56 closed 1 year ago

SamMan56 commented 1 year ago

update the regex to match the following patterns:

mcdiamondfire.net luke.cash

both vanity urls with a sizeable userbase

homchom commented 1 year ago

Thanks for reminding me of this; you're right that it needs to be addressed. However, I got a second opinion and I think the best solution here is actually the opposite one, replacing the vanity IPs when detected. (On the chance the IPs ever fall through, this will result in false negatives instead of false positives, which is a good thing for security.) In any case, we can definitely get this resolved in some form in beta 7 (beta 6 has a relatively imminent release).

SamMan56 commented 1 year ago

ok i did it, it now parses these ips as mcdiamondfire.com instead. only one mixin needed, the server listing takes it from there & will send u to mcdiamondfire.com instead no it does not overwrite what u put in the server box

homchom commented 1 year ago

Sorry for the late response, I'm swamped right now.

This looks pretty solid, and I can merge it as soon as I finish what I'm working on at the moment, but in the meantime a question: @Reasonlesss mentioned potentially just checking for a numerical IP address instead (i.e. if the IP points to DF's proxy, it matches, regardless of the IP string); do you think this would be better and, if so, do you know how to implement it?

SamMan56 commented 1 year ago

TRU but its a bit potatoes potatoes at that point - what if the df ip ever changes? how can it reliably be checked that ur on df? with this method itll always go to mcdiamondfire.com which can be checked while connected most safely (ip HAS changed before - url has not)

homchom commented 1 year ago

Good point. So yeah I'll hopefully come back to this later today or tomorrow