Fossil SCM

"fossil ui" network interface option

Closed

812379bd1ac5b2b… · opened 16 years, 6 months ago

Type
Feature_Request
Priority
Severity
Important
Resolution
Overcome_By_Events
Subsystem
Created
Sept. 25, 2009 8:49 a.m.

Currently there is "--port" option to set port number. To accomplish, there should be also --interface option to bind only to selected interface. To hide server from some networks. Or to start different instances on single port.


anonymous added on 2010-02-10 20:11:36:
Actually quite simple (at least for Unix). I'm just fiddling around with it. So far I added -IP parameter and parsing via
zIP = find_option("IP", 0, 1);
and changed call to
cgi_http_server(zIP, iPort, mxPort, zBrowserCmd)
Next step, change INADDR_ANY in cgi.c to
inaddr.sin_addr.s_addr = inet_addr(zIP);
So far so good. But now it's about dealing with defaults (ie no -IP parameter), dealing with "localhost" instead of "127.0.0.1", having a default in the global fossil db. That's where I am having troubles now.

Anyway, specifying an listening IP address is actually piece of cake :-)


anonymous added on 2010-02-10 20:14:07:
Ooops, I forgot: another step might be to default to 127.0.0.1 when invoking with "fossil ui" instead of "fossil server". That's at least the behaviour I prefer with those different invocations.


anonymous claiming to be ge added on 2010-02-11 01:41:54:
New code should really use the getaddrinfo call to convert the address and port information into one or more struct sockaddr values. It's a bit more involved but it gets you compatibility with IPv6 almost for free.

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button