Page MenuHomePhabricator

[mwcli mwdd] Automatic hosts file altering
Closed, ResolvedPublic

Description

Previous mwdd implementations managed the system hosts file in an automatic way for users.
Browsers already mainly resolve the *.localhost domains correctly.
Though command line tools etc do not, and need this extra system poke.

The sync file was https://github.com/addshore/mediawiki-docker-dev/blob/v1/hosts-sync in the v1 branch

Details

TitleReferenceAuthorSource BranchDest Branch
dev hosts: Also add other created hostsrepos/releng/cli!28addshorehosts-integrationmain
dev hosts: Also add other created hostsrepos/releng/cli!27addshorealso-other-created-hostsmain
dev hosts: command for altering hosts filerepos/releng/cli!25addshoreinternal-hosts-file-altering-cmdmain
dev: code to alter hosts file (not yet used)repos/releng/cli!24addshoreinternal-hosts-file-alteringmain
Customize query in GitLab

Event Timeline

Addshore triaged this task as Medium priority.May 22 2021, 9:42 PM

Browsers already mainly resolve the *.localhost domains correctly.
Though command line tools etc do not, and need this extra system poke.

Which command-line tools specifically? I believe some of them are starting to support this.

As a workaround, using Curl as example, one can use either of these to address the dev wiki:

curl http://localhost:8080 -H 'Host: default.mw.mwdd.localhost'
curl http://default.mw.mwdd.localhost:8080 --connect-to '::localhost'
Addshore moved this task from Backlog to In Progress on the mwcli board.

Browsers already mainly resolve the *.localhost domains correctly.
Though command line tools etc do not, and need this extra system poke.

Which command-line tools specifically? I believe some of them are starting to support this.

As a workaround, using Curl as example, one can use either of these to address the dev wiki:

curl http://localhost:8080 -H 'Host: default.mw.mwdd.localhost'
curl http://default.mw.mwdd.localhost:8080 --connect-to '::localhost'

This could be anything from cli tools like curl, to other random packages and components that folks may choose to run on their systems.
I'm going to try and keep this optional etc as we ended up doing with the old mediawiki-docker-dev