fish-shell icon indicating copy to clipboard operation
fish-shell copied to clipboard

[fish_config] Listen on non-localhost interfaces

Open pwr22 opened this issue 11 years ago • 15 comments

I use fish on a lot of headless machines and for this usecase it would be a lot easier if I could configure fish_config to listen on a public interface

pwr22 avatar Jan 26 '15 18:01 pwr22

This could be a parameter to fish_config.

ridiculousfish avatar Jan 26 '15 22:01 ridiculousfish

Sounds sensible, I'm willing to look at adding this myself when I have time

pwr22 avatar Jan 27 '15 01:01 pwr22

Care will be required. At present fish_config binds to all interfaces but rejects non-localhost connections. The API allows the execution of arbitrary code and should be adequately protected.

zanchey avatar Jan 27 '15 15:01 zanchey

@zanchey I have no intention of changing the default behaviour

pwr22 avatar Jan 27 '15 15:01 pwr22

Being able to run fish_config on the server and connect to it with a web browser from the desktop/laptop might be a very user-friendly solution, yes.

I like it, but it has to also be made secure. Editing the shell settings via unencrypted HTTP without any authorisation doesn’t seems like a good idea.

A different solution to this issue is being discussed also in bug #3625.

silverhook avatar Dec 17 '16 01:12 silverhook

Editing the shell settings via unencrypted HTTP without any authorisation doesn’t seems like a good idea.

cf. CVE-2014-2914

zanchey avatar Dec 17 '16 01:12 zanchey

I think we should just agree to suggest something like ngrok for this use case. It's too much of a can of worms otherwise.

mqudsi avatar Sep 30 '18 20:09 mqudsi

I was able to do fish_config remotely by:

  • viewing the temp file fish creates to see what port the webserver is bound to (I had 8000)
  • opening a second ssh session and tunneling the port to localhost. example: ssh -L 8000:localhost:8000 user@host
  • opening my browser to the link referenced in the temp file.

t3kk avatar Aug 16 '20 03:08 t3kk

I was able to do fish_config remotely by:

* viewing the temp file fish creates to see what port the webserver is bound to (I had 8000)

* opening a second ssh session and tunneling the port to localhost.  example:
  `ssh -L 8000:localhost:8000 user@host`

* opening my browser to the link referenced in the temp file.

code 403, message Forbidden

alienzj avatar Sep 18 '20 03:09 alienzj

I see, we need http://localhost:8000/xxxxxx. The real url can get from rg href <file address returned by fish_config>. Now, worked. Thanks ~

alienzj avatar Sep 19 '20 03:09 alienzj

The trailing slash is apparently also required if you use the SSH tunnel.

But in all honestly, this configuration experience is really bad for headless machines.

LiSongMWO avatar Feb 27 '21 16:02 LiSongMWO

Is there a command line version of fish_config? Web ui is good, but CLI is also needed.

perkfly avatar Dec 06 '21 03:12 perkfly

On Sun, Dec 05, 2021 at 07:06:50PM -0800, Yifei Kong wrote:

Is there a command line version of fish_config? Web ui is good, but CLI is also needed.

Yes since 3.3.0. See fish_config -h

krobelus avatar Dec 06 '21 05:12 krobelus

Thanks, glad to see this. I've just updated to 3.3.1.

On Mon, Dec 6, 2021 at 1:43 PM Johannes Altmanninger < @.***> wrote:

On Sun, Dec 05, 2021 at 07:06:50PM -0800, Yifei Kong wrote:

Is there a command line version of fish_config? Web ui is good, but CLI is also needed.

Yes since 3.3.0. See fish_config -h

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/fish-shell/fish-shell/issues/1916#issuecomment-986457589, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAH4ZXY4E7C2KQ7IPWNC55TUPRER3ANCNFSM4A25KYTA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

-- Yifei Kong May the force be with you.

perkfly avatar Dec 06 '21 05:12 perkfly

Personally, I find the existence of the CLI command since 3.3.0 enough to not need the functionality that is described in this issue.

silverhook avatar Dec 30 '21 18:12 silverhook

I do not want to touch this with a ten foot pole, especially given that webconfig isn't all that loved (we need to get off angularjs!). For the headless use case we now have the fish_config CLI.

So I'm closing this.

faho avatar Sep 26 '22 14:09 faho