Skip to content

Feat server advertisement - #112

Merged
JacksonTheMaster merged 7 commits into
nightlyfrom
feat-server-advertisement
Sep 30, 2025
Merged

Feat server advertisement#112
JacksonTheMaster merged 7 commits into
nightlyfrom
feat-server-advertisement

Conversation

@akirilov

Copy link
Copy Markdown
Contributor

New features:

  • Added the ability to manually set the advertised server IP to allow "Server Visible" functionality with a reverse proxy
  • NOTE: this requires that ServerVisible is set to False, otherwise the game will ALSO advertise the (wrong) IP

Copilot AI review requested due to automatic review settings September 30, 2025 08:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds server advertisement functionality to allow the application to advertise servers behind reverse proxies. The feature introduces a new command-line flag --OverrideAdvertisedIp that sets a custom IP address for server advertisement while disabling the built-in server visibility to prevent conflicts.

  • Added OverrideAdvertisedIp configuration option with getter/setter functions and persistence
  • Implemented automatic server advertisement service that posts server info to a discovery endpoint
  • Added command-line flag support for setting the override IP address

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/core/loader/cmdargs.go Adds command-line flag parsing for override advertised IP
src/config/vars.go Declares new OverrideAdvertisedIp configuration variable
src/config/setters.go Implements setter function for the override IP configuration
src/config/getters.go Implements getter function for the override IP configuration
src/config/config.go Adds JSON serialization support and configuration loading for override IP
src/advertiser/advertiser.go New advertiser service that handles server advertisement functionality
server.go Integrates advertiser service startup in main application
.vscode/launch.json Adds debug configuration for testing the new override IP feature

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread src/core/loader/cmdargs.go Outdated
Comment thread src/advertiser/advertiser.go Outdated
Comment thread src/advertiser/advertiser.go Outdated
Comment thread src/advertiser/advertiser.go Outdated

@JacksonTheMaster JacksonTheMaster left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

See my comments

Comment thread src/advertiser/advertiser.go Outdated
Comment thread src/advertiser/advertiser.go Outdated
Comment thread src/advertiser/advertiser.go Outdated
Comment thread src/core/loader/cmdargs.go Outdated
Comment thread src/core/loader/cmdargs.go
Comment thread server.go Outdated
akirilov and others added 4 commits September 30, 2025 19:56
Co-authored-by: JLangisch <jakob.langisch@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.

Comments suppressed due to low confidence (1)

src/config/config.go:1

  • Typo in comment: 'secconds' should be 'seconds'.
package config

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread src/advertiser/advertiser.go
Comment thread src/advertiser/advertiser.go
Comment thread src/advertiser/advertiser.go
Comment thread src/advertiser/advertiser.go

@JacksonTheMaster JacksonTheMaster left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

reviewed, merged as discussed in VC

@JacksonTheMaster
JacksonTheMaster merged commit e39b3bc into nightly Sep 30, 2025
1 check passed
@JacksonTheMaster
JacksonTheMaster deleted the feat-server-advertisement branch September 30, 2025 18:04
JacksonTheMaster added a commit that referenced this pull request Oct 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants