Repository navigation
Conversation
ruvolof
force-pushed
the
allow-different-host-port-and-listener-port
branch
from
July 4, 2026 07:40
3b973a0 to
55ce159
Compare
ruvolof
force-pushed
the
allow-different-host-port-and-listener-port
branch
from
August 5, 2026 20:27
55ce159 to
c19250c
Compare
Previously the listener Host could not carry a port and the listener bind Port was effectively forced to match it. This allows the advertised host port and the listener bind port to differ: - validate_listener_address no longer rejects a port given in Host; the host address is built from the host-supplied port when present, falling back to the Port option otherwise (omitting it for the 80/http and 443/https defaults). - The malleable listener extracts the advertised port from Host via get_malleable_port for launcher and stager generation, and builds the stager request from server + path/query. - The malleable Stager only injects the default /init/ URI when the profile defines no http-stager block, instead of always. - Listener tests updated for the new normalization behaviour.
ruvolof
force-pushed
the
allow-different-host-port-and-listener-port
branch
from
October 11, 2026 08:13
c19250c to
3ece9c7
Compare
Member
|
Thanks @ruvolof! This was hand-ported onto the 7.0 listener layout (listeners moved to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe your changes
This merge request addresses the possibility to have a different host port and bind port (scenario when Empire runs behind a reverse proxy).
The merge requests maintains the old behavior of forcing the bind port into the host if the host port is not specified.
Additionally, while working on this issue I had already noticed another issue with the default uris for malleable profile when missing the stager block. My solution is a bit different than the one currently in main, adding the default uri only when the stager block is not found. During my tests, the original approach ended up creating this additional uri even when the stager block was present (and then it could be randomly selected when generating the launchers).
Issue ticket number and link (if there is one)
#808
Checklist before requesting a review
CHANGELOG.mddocs/(if applicable)