-
-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add receive proxy protocol (#206)
* refactor: infrared tests * feat: add receive proxy protocol support * fix: docs * fix: send proxy protocol and tests * test: receive proxy protocol * docs: add community projects page * docs: fix typo
- Loading branch information
Showing
21 changed files
with
652 additions
and
231 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Community Projects | ||
|
||
> [!NOTE] | ||
> These projects are managed by the Infrared Community. | ||
> We do **not** provide official support for these projects. | ||
> Please use their dedicated issue trackers or support channels provided by the respective project. | ||
> Thanks for understanding. | ||
## Infrared for Pterodactyl | ||
|
||
An egg to run Infrared in Pterodactyl. \ | ||
Repo: [Shadowner/Infrared-Pterodactyl-egg](https://github.com/Shadowner/Infrared-Pterodactyl-egg) \ | ||
Owner: [Shadowner](https://github.com/Shadowner) |
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# PROXY Protocol | ||
|
||
Infrared supportes [PROXY Protocol v2](https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt). | ||
|
||
## Receive PROXY Protocol | ||
|
||
You can receive PROXY Protocol Headers, but you **need** to specify your trusted [CIDRs](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#IPv4_CIDR_blocks). | ||
To enable it in Infrared you just have to change this in you [global config](../config/index): | ||
|
||
```yml | ||
# This is for receiving PROXY Protocol Headers | ||
# | ||
proxyProtocol: | ||
# Set this to true to enable it. | ||
# You also need to set trusted CIDRs to use this feature. | ||
# You can only receive PROXY Protocol Headers from trusted CIDRs. | ||
# | ||
receive: false | ||
|
||
# List all your trusted CIDRs here. | ||
# A CIDR is basically a way to talk about a whole range of IPs | ||
# instead of just one. | ||
# | ||
trustedCIDRs: | ||
- 127.0.0.1/32 | ||
``` | ||
## Forward Player IPs | ||
You can forward the player IPs via PROXY Protocol. | ||
To enable it in Infrared you just have to change this in you [**proxy config**](../config/proxies): | ||
```yml | ||
# Send a PROXY Protocol Header to the server to | ||
# forward the players IP address. | ||
# | ||
#sendProxyProtocol: true // [!code --] | ||
sendProxyProtocol: true // [!code ++] | ||
``` | ||
## Paper | ||
In Paper you have to enable it also to work. | ||
See [the Paper documentation on PROXY Protocol](https://docs.papermc.io/paper/reference/global-configuration#proxies_proxy_protocol) for more. |
2 changes: 1 addition & 1 deletion
2
docs/features/rate-limit-ips.md → docs/features/rate-limiter.md
This file contains 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
Oops, something went wrong.