Skip to content

change the tryPort to use hostname.local (for wsl to work)#582

Open
thatgurkangurk wants to merge 4 commits intoreplugged-org:mainfrom
thatgurkangurk:main
Open

change the tryPort to use hostname.local (for wsl to work)#582
thatgurkangurk wants to merge 4 commits intoreplugged-org:mainfrom
thatgurkangurk:main

Conversation

@thatgurkangurk
Copy link
Contributor

when you try to use the --watch flag in wsl, it cannot connect since the networks are technically separated. if you use hostname.local however, the wsl "container" can connect to the main windows machine.

this should not break any other systems since i tested it in linux, linux in wsl and on windows without issue

Copy link
Member

@12944qwerty 12944qwerty left a comment

Choose a reason for hiding this comment

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

This unfortunately isn't supported on Mac devices. You may need to add a check to see if it's mac or not to choose to use .local or localhost.

@fedeericodl fedeericodl added bug Something isn't working semver: patch Requires a patch semver version bump addon development Relates to developing addons, eg APIs or scripts labels Oct 24, 2023
@yofukashino
Copy link
Contributor

yofukashino commented Jul 28, 2025

{
    find: "RPCServer:WSS",
    replacements: [
      {
        match: "127.0.0.1",
        replace: () => `0.0.0.0`,
      },
    ],
  }

Include this patch in replugged with a toggle for this.

Also if possible make it an argument or env variable.

process.env.REPLUGGED_ADDON_HOST ?? "localhost"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

addon development Relates to developing addons, eg APIs or scripts bug Something isn't working semver: patch Requires a patch semver version bump

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants