Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore BungeeCord and Velocity support #3302

Merged
merged 4 commits into from Feb 23, 2021
Merged

Conversation

zml2008
Copy link
Member

@zml2008 zml2008 commented Feb 21, 2021

This restores IP forwarding from api-7, picking up from #3076.

Main changes from that PR are:

  • Use Sponge's networking API where possible
  • Merge the BungeeCord and Velocity mixin plugins into one toggle
  • Add a note before the vanilla offline mode warning listing out the active forwarding mode, and force offline mode when IP forwarding is enabled, since offline mode is required for IP forwarding to work.

The configuration is tweaked somewhat from that PR. Now, to configure Velocity support, the following steps are required:

  1. In the modules section of sponge.conf, set ip-forwarding to true.
  2. Update the ip-forwarding section of the same file to match the following:
ip-forwarding {
    # The IP forwarding mode to use with a proxy. Supported values:
    #  - NONE: Do not forward IP addresses
    #  - LEGACY: Use the BungeeCord/pre-1.13 protocol for IP forwarding (CAUTION: This protocol is insecure)
    #  - MODERN: Use the Velocity protocol for IP forwarding
    # When any forwarding mode but NONE is selected, the server will be put into offline mode and will only accept connections from proxies.
    mode=MODERN
    # The player info forwarding secret from your Velocity configuration.
    # Only used with 'MODERN' forwarding mode.
    secret="<velocity secret here>"
}

/cc @astei your review would be appreciated

astei and others added 4 commits February 21, 2021 14:24
Not yet fully tested due to other issues holding me back.

Resolve some issues zml had

Assume that if the BungeeCord module is enabled, the user wants IP forwarding

Get rid of this, I had to put this in to get the project imported locally...

Unroll these imports (no wildcards)

Another typo, yay

Correct shadow function name and placement
@zml2008 zml2008 self-assigned this Feb 21, 2021
@zml2008 zml2008 mentioned this pull request Feb 21, 2021
3 tasks
Copy link
Contributor

@astei astei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@zml2008 zml2008 changed the title Pick up restoring BungeeCord and Velocity support Restore BungeeCord and Velocity support Feb 23, 2021
@zml2008 zml2008 merged commit 4260d1f into api-8 Feb 23, 2021
@zml2008 zml2008 deleted the feature/ip-forwarding branch February 23, 2021 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants