Fixed: Option to listen to localhost only

Is a function in RailControl missing or do you have any ideas?
Post Reply
User avatar
Mebus
Posts: 16
Joined: Sat May 08, 2021 2:25 pm

Fixed: Option to listen to localhost only

Post by Mebus »

Hey Teddy,

I don't want Railcontrol to be availible in my network to anybody. Is there a configuration option to make Railcontrol listen on localhost only? If not, would it be possible to add it?

Thanks

Mebus
User avatar
teddy
Site Admin
Posts: 199
Joined: Thu May 07, 2020 2:39 pm
Contact:

Re: Option to listen to localhost only

Post by teddy »

Hi Mebus

Unfortunately there is no such option. But it is a very interesting question and it definitely makes sense to implement such an option.

I moved the topic to "Wishes and Ideas" to not forget to implement it.

Regards
Teddy
User avatar
Mebus
Posts: 16
Joined: Sat May 08, 2021 2:25 pm

Re: Option to listen to localhost only

Post by Mebus »

Hi Teddy,

great!. While your already working on this topic, maybe HTTP Basic Auth would also be nice to have for the Web-UI. :D If that's not possible - if you at least implement the localhost thing - I could put an nginx proxy in front of it ;)

Mebus
User avatar
Mebus
Posts: 16
Joined: Sat May 08, 2021 2:25 pm

Re: Option to listen to localhost only

Post by Mebus »

Hallo Teddy,

I went through the source a little bit and added a configuration option to make it either listen to all addresses (::) or to localhost only (::1) :D !

https://github.com/teddych/railcontrol/pull/1

I have a little problem with the "LoggingServer". It is used before the configuration has been read :? How can we work around this :?: What is the LoggingServer used for?

At the moment it can only be restricted to localhost. Might be nice, if we could parse other IPv4 and IPv6 addresses there, too :?: .

Thanks

Greetings

Mebus
User avatar
teddy
Site Admin
Posts: 199
Joined: Thu May 07, 2020 2:39 pm
Contact:

Re: Option to listen to localhost only

Post by teddy »

Hi Mebus

Thanks a lot for your contribution!
I have added some comments to the merge request. Only minor issues, but I would like to have them fixed before I merge it to the source code.

Tanks
Teddy
User avatar
Mebus
Posts: 16
Joined: Sat May 08, 2021 2:25 pm

Re: Option to listen to localhost only

Post by Mebus »

Hey Teddy,

yes, that's no problem. I will probably look into it on the weekend.

Greetings

Mebus
User avatar
teddy
Site Admin
Posts: 199
Joined: Thu May 07, 2020 2:39 pm
Contact:

Re: Option to listen to localhost only

Post by teddy »

Hi Mebus

Thank you very much vor your contribution!

I have merged your contribution to the master. It is visible now on GitHub.

In the official Version 20 it is still missing, because I already started to build the official release. But I think for you this is not a problem you can build it on your own.

Thanks again
Teddy
Post Reply