Skip to content

add CTOS_EXTERNAL_ADDRESS#2832

Merged
mercury233 merged 6 commits into
masterfrom
patch-add-hostname
Jun 29, 2025
Merged

add CTOS_EXTERNAL_ADDRESS#2832
mercury233 merged 6 commits into
masterfrom
patch-add-hostname

Conversation

@purerosefallen

@purerosefallen purerosefallen commented Jun 8, 2025

Copy link
Copy Markdown
Collaborator
/*
* CTOS_ExternalAddress
* uint32_t real_ip; (IPv4 address)
* uint16_t hostname[256]; (UTF-16 string)
*/

Identical to the Host and X-Forwarded-For header in HTTP.

Not used in YGOPro itself, but useful in some reverse proxy or something like nginx or bungeecord to route YGOPro traffic.

@purerosefallen purerosefallen changed the title add CTOS_HOSTNAME add CTOS_EXTERNAL_ADDRESS Jun 8, 2025
@purerosefallen purerosefallen added this to the Version 0x1362 milestone Jun 8, 2025
@purerosefallen purerosefallen requested review from Copilot, mercury233 and salix5 and removed request for mercury233 June 8, 2025 15:03

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 introduces a new message type, CTOS_EXTERNAL_ADDRESS, for routing YGOPro traffic through reverse proxies. Key changes include adding CTOS_EXTERNAL_ADDRESS definitions in network headers, a new case in netserver packet handling, and client logic for sending the external address data.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
gframe/network.h Added CTOS_EXTERNAL_ADDRESS structure documentation and LEN_HOSTNAME constant.
gframe/netserver.cpp Added a case for CTOS_EXTERNAL_ADDRESS with placeholder (commented) implementation.
gframe/duelclient.cpp Implemented sending of CTOS_EXTERNAL_ADDRESS data using manual buffer construction.

Comment thread gframe/netserver.cpp
Comment thread gframe/duelclient.cpp Outdated
@purerosefallen purerosefallen requested a review from mercury233 June 8, 2025 15:04
Comment thread gframe/duelclient.cpp Outdated
@purerosefallen

Copy link
Copy Markdown
Collaborator Author

Comment thread gframe/duelclient.cpp Outdated
@mercury233 mercury233 merged commit 632dd98 into master Jun 29, 2025
8 checks passed
@mercury233 mercury233 deleted the patch-add-hostname branch May 30, 2026 08:08
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