Skip to content

WebHost + MultiServer: Allow game clients to request datapackages through the HTTP API provided by the WebHost - #6448

Open
colin969 wants to merge 6 commits into
ArchipelagoMW:mainfrom
colin969:datapackage_url
Open

colin969 wants to merge 6 commits into
ArchipelagoMW:mainfrom
colin969:datapackage_url

Conversation

@colin969

@colin969 colin969 commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

What is this fixing or adding?

Adds an optional datapackage_url to RoomInfo to allow game clients to use HTTP requests to retrieve datapackages instead of using GetDataPackage commands.

PUBLIC_URL has been added to the app config, and datapackage_url is built inside get_static_server_data() for rooms using WebHost's customserver

This should help:

  • Clients to pull datapackages faster through multiple connections, and allow clients that can't reasonably support websocket compression an alternative to GetDataPackage
  • The server host to have more options with load balancing + CDN usage for datapackages, or choose to block uncompressed clients from using GetDataPackage in the future

How was this tested?

For a local server, add PUBLIC_URL: http://localhost to app config

Host a room through the webhost.

Get the datapackage checksum from the RoomInfo message

Append /<checksum> to the datapackage_url in RoomInfo and confirm you can retrieve from this url in a browser

@github-actions github-actions Bot added affects: core Issues/PRs that touch core and may need additional validation. affects: webhost Issues/PRs that touch webhost and may need additional validation. waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. labels Sep 15, 2026
@colin969 colin969 changed the title WebHost + MultiServer: datapackage_url in RoomInfo WebHost + MultiServer: Allow game clients to request datapackages through the HTTP API provided by the WebHost Sep 15, 2026

@duckboycool duckboycool left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Feedback of descending importance.

Comment thread docs/webhost configuration sample.yaml Outdated
#PORT: 80

# Public URL used to construct endpoints for game clients connecting to webhost'd multiservers
#PUBLIC_URL: https://archipelago.gg

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This (for good reason) isn't actually the default value like the comment at the top of here says. Using it as an example would probably be better in the comment above.

(Also HOST_ADDRESS gets this wrong currently as well I guess...)

@colin969 colin969 Sep 16, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed the value to be null, and reworded the comments around it to be more clear about how it's used.

It might be worth defaulting this to http://localhost for people doing apworld development that want to test against it? Unsure.

Comment thread docs/network protocol.md Outdated
Comment thread MultiServer.py Outdated
Comment thread WebHost.py

@duckboycool duckboycool left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Worked as expected from MultiServer, from WebHost without a URL set, and with one. I think maybe the default should be to match to HOST_ADDRESS (I guess with a value like "" to distinguish from specifically opting out with null?), but I'll leave that up to other reviewers.

@duckboycool duckboycool added the is: enhancement Issues requesting new features or pull requests implementing new features. label Sep 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

affects: core Issues/PRs that touch core and may need additional validation. affects: webhost Issues/PRs that touch webhost and may need additional validation. is: enhancement Issues requesting new features or pull requests implementing new features. waiting-on: peer-review Issue/PR has not been reviewed by enough people yet.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants