PowerNukkitX / PowerNukkitX-Legacy

GNU General Public License v3.0
7 stars 4 forks source link

Add ProxyProtocol Support #43

Open BroccoliGG opened 1 year ago

BroccoliGG commented 1 year ago

Currently, there is already a setting to read the original IP header of the player from the WaterdogPE

As well as this, I would like to see support for proxy protocols added so that the original IP of the player can be retrieved via proxy as well

Here, execute this.racknet.useProxyProtocol(); https://github.com/PowerNukkitX/PowerNukkitX/blob/master/src/main/java/cn/nukkit/network/RakNetInterface.java#L55

And can access the real IP with RakNetSession#getRealAddress();