Repository navigation
fix: stop one source from filling the directory or aiming players' pings elsewhere - #15
Merged
Merged
Conversation
A flood of requests from many IPv6 /64s filled the rate table, and every new visitor then got 503. Unused challenges from two /64s filled the challenge table, and no host could register. Count IPv6 sources by /64 for every quota, and let the oldest entry make room when either table is full.
…aces fairly A listing could name any public address, and players' games ping every listed address. A host on a public address now needs the operator's --address-host to name another one. A full listing table takes from the source with the most listings. One source holds at most a quarter of the connections when no proxy is in front. 192.0.0.0/16 is no longer refused whole, signatures are checked before the registry's lock, and the image's default command matches the README.
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.
A review of 0.3.1 found several ways for one party to make an instance refuse everyone, or to misuse its listings. This fixes them.
Full tables
Listed addresses
A listing could name any public address, and players' games ping every listed address. A host that publishes from a public address may now name another one only if the operator allows its key with the new
--address-host. Naming its own address is always allowed, and--allow-private-publishersworks as before.This changes behaviour for existing hosts. A host on a public address that sets
addressto a different one gets 403 until the operator adds its key.Smaller points
--trust-proxy, one source address holds at most a quarter of the connections, so eight idle connections from one address no longer keep everyone out.192.0.0.0/16is no longer refused whole. Only192.0.0.0/24and192.0.2.0/24are.Proof.verifiedreturns aVerified, and the registry only takes that.--bind 127.0.0.1:8080 --trust-proxy, as the README's example has it. A container started with a published port and no arguments is no longer reachable. It needs host networking and a proxy, or its own--bind.Checks
Unit tests (five new),
check-directory.pywith new cases for named addresses, and a local instance:check-relay.pywas not run locally, because Docker is not available on this machine. CI runs it.Closes #13
Closes #14